Vec3D Object

The Vec3D objects represents a three dimensional vector. It can be used either for vertices or control points.

Properties
Number x,y,z


Constructor

Vec3D(Number x, Number y, Number z)
Creates a three dimensional vector.


Methods

Vec3D add(Vec3D a)
Adds the vector a.


Vec3D cross(Vec3D a)
Returns the cross product of this x a.


Number dot(Vec3D a)
Returns the dot product of <this,a>.


BOOL isEqual(Vec3D a)
Returns true if this vector and vector a are equal.


Vec3D inverse(Vec3D a)
Returns the inverse of vecotr a.


Vec3D multiply(Number a)
Vec3D multiply(Vec3D a)
Multiplys the vector with a.


Number norm()
Returns the vector norm of the x,y and z components.


Vec3D copy()
Creates a copy of the vector.


void set(Number x, Number y, Number z)
Sets the values of the vector all at once.


Vec3D sub(Vec3D)
Substracts the vector a.
© 2001-2004 Martin Wengenmayer. All rights reserved.