Realsoft 3D Axis.
|
Axis object consists of two attributes: position and direction. It can be used, for example, for representing vertices and associated vertex normals. |
![]() |
pos - vector defining origin (position) dir - vector defining direction For example:
o = new r3Vect(0.2, 0, 0); d = new r3Vect(1, 0, 0); a = new r3Axis(o, d);
r3Axis - constructor
a = new r3Axis()
vPos, vDir - two vectors specifying origin and direction
new axis object
Creates a new axis object. If no parameters are passed to the constructor, a null axis system is created (both attributes will be null vectors). If the number of parameters is two, then the constructor assumes that the parameters are vectors defining position and direction.
// create an identity axis
identity - identity
a.identity();
-
-
Reset axis to identity state. This corresponds to the following code: a.pos.set(0, 0, 0); a.dir.set(0, 0, 0);
cs.identity();
normalize - normalize dir vector
a.normalize();
-
-
Normalize dir vector to unit vector. This corresponds to the following code: a.dir.norm();
a.normalize();
print - dump values
a.print();
-
-
Print current values of the axis object. Useful for debugging purposes.
a.print();