Realsoft 3D Coordinate System.
|
Coordinate system is analogous to Matrices in that it can be used for representing transformations and spaces. origin - vector defining origin hor, vert, norm - three axes For example:o = new r3Vect(0.2, 0, 0); x = new r3Vect(0.1, 0, 0); y = new r3Vect(0, 0.1, 0); z = new r3Vect(0, 0, 0.1); cs = new r3Coordsys(o, x, y, z); |
![]() |
r3Coordsys - constructor
v = new r3Coordsys()
vOrigin, vHor, vVert, vNorm - four vectors specifying origin and axes for the coordinate system.
cs - new coordinate system object
Creates a new coordinate system object. If you don't pass any parameters to the constructor, an indentity coordinate system is created. If the number of parameters is four, then the constructor assumes that the parameters are vectors defining oordinate system's origin, horizontal, vertical and normal axes.
// create an identity cs ;
identity - identity
cs.identity();
-
-
Reset coordinate system to identity state. This corresponds to the following code: cs.origin.set(0, 0, 0); cs.hor.set(1, 0, 0); cs.vert.set(0, 1, 0); cs.norm.set(0, 0, 1);
cs.identity();
normalize - normalize coordinate system axes
cs.normalize();
-
-
Normalize coordinate system axes to unit vectors.
cs.normalize();
print - dump current coordinate system values
cs.print();
-
-
Print current values of the coordinate system object. Useful for debugging purposes.
cs.print();