Shapes 3D  3.0
 All Classes Functions Variables Pages
shapes3d.utils.Orientation Class Reference
Inheritance diagram for shapes3d.utils.Orientation:

Public Member Functions

 Orientation (PVector origin, PVector up)
 
 Orientation (PVector origin, PVector v0, PVector v1)
 
 Orientation ()
 
Vector3D origin ()
 
Rotation rotation ()
 
Vector3D applyRTto (final Vector3D vector)
 
Vector3D applyTRto (final Vector3D vector)
 
Vector3D applyRto (final Vector3D vector)
 
Vector3D applyTto (final Vector3D vector)
 
PVector applyRTto (final PVector vector)
 
PVector applyTRto (final PVector vector)
 
PVector applyRto (final PVector vector)
 
PVector applyTto (final PVector vector)
 

Protected Attributes

Vector3D origin = null
 
Rotation rotation = null
 

Additional Inherited Members

- Public Attributes inherited from shapes3d.utils.SConstants
int WIRE = 0x00000011
 
int SOLID = 0x00000012
 
int TEXTURE = 0x00000014
 
int DRAWALL = WIRE | SOLID | TEXTURE
 
int WHITE = 0xFFFFFFFF
 
int BLACK = 0xFF000000
 
int GREY = 0xFFC0C0C0
 
int RED = 0xFFFF0000
 
int GREEN = 0xFF00FF00
 
int BLUE = 0xFF0000FF
 
int YELLOW = 0xFFFFFF00
 
int PURPLE = 0xFFFF00FF
 
int CYAN = 0xFF00FFFF
 
int ORANGE = 0xFFFFC000
 
int CW = 1
 
int CCW = 2
 
int ALL = 0b11111111
 
int BOTTOM = 0b00000001
 
int TOP = 0b00000010
 
int FRONT = 0b00000100
 
int BACK = 0b00001000
 
int LEFT = 0b00010000
 
int RIGHT = 0b00100000
 
int BODY = 0b00000001
 
int END0 = 0b00000010
 
int END1 = 0b00000100
 
float ONE_DEG_T = (float) (Math.PI / 180.0)
 
PathOrthogonal ORTHO_X = new PathOrthogonal.PathNormalX()
 
PathOrthogonal ORTHO_Y = new PathOrthogonal.PathNormalY()
 
PathOrthogonal ORTHO_Z = new PathOrthogonal.PathNormalZ()
 
PathOrthogonal ORTHO_A = new PathOrthogonal.PathNormalAMC()
 
TransformUV ROT_0 = TransformUV.ROT0
 
TransformUV ROT_90 = TransformUV.ROT90
 
TransformUV ROT_180 = TransformUV.ROT180
 
TransformUV ROT_270 = TransformUV.ROT270
 
TransformUV FLIP_H = TransformUV.FLIPH
 
TransformUV FLIP_V = TransformUV.FLIPV
 
Rotation ROTATION_ZERO = new Rotation()
 
int T_BOX = 0x1001
 
int T_DOME = 0x1002
 
int T_CONE = 0x1003
 
int T_ELLIPSOID = 0x1004
 
int T_EXTRUSION = 0x1005
 
int T_LATHESTOCK = 0x1006
 
int T_MD2 = 0x1007
 
int T_SKYBOX = 0x1008
 
int T_SKYDOME = 0x1009
 
int T_TERRAIN = 0x100A
 
int T_TUBE = 0x100B
 
int C_LATHESURFACE = 0x2001
 
int C_OVAL = 0x2002
 
int C_POLYGON = 0x2003
 
int P_BCURVE2D = 0x3001
 
int P_BCURVE3D = 0x3002
 
int P_BSPLINE2D = 0x3003
 
int P_BSPLINE3D = 0x3004
 
int P_LINEAR = 0x3005
 
int P_LISSAJOUS = 0x3006
 
int P_RING = 0x3007
 
int P_SPIRAL = 0x3008
 

Detailed Description

Objects of this class can be used to change the origin [0,0,0] and UP vector for the model-view coordinates.

Author
Peter Lager

Constructor & Destructor Documentation

shapes3d.utils.Orientation.Orientation ( PVector  origin,
PVector  up 
)

Specify a new origin and a new UP vector for the model view coordinate system.
if either is unchanged then pass null as the parameter e.g.

 ... new Orientation(null, new PVector(0,1,1));


would change the UP vector but leave the origin unchanged and

 ... new Orientation(new PVector(50, -10, 25), null);


would change the MV origin but leave the UP vector unchanged.
Note: The original origin was [0,0,0] and the original UP vector was [0,1,0]

Parameters
originnew origin for model-view coordinates.
upnew UP vector.
shapes3d.utils.Orientation.Orientation ( PVector  origin,
PVector  v0,
PVector  v1 
)

Specify a new origin and a new orientation for the model view coordinate system.
If you do not wish to alter the model-view origin pass null as the first parameter.
Rotate the model coordinates such that a vector v0 will now be v1. You must not pass null for either of these vectors.
Note: The origin center of rotation was [0,0,0]

Parameters
originnew origin for model-view coordinates.
v0original vector in model coordinates
v1the desired vector after rotation
shapes3d.utils.Orientation.Orientation ( )

A unit orientation leaving the coordinates unchanged.

Member Function Documentation

Vector3D shapes3d.utils.Orientation.applyRto ( final Vector3D  vector)

Apply a rotation to a vector.

Parameters
vectorthe vector to transform
Returns
the transformed vector
PVector shapes3d.utils.Orientation.applyRto ( final PVector  vector)

Apply a rotation to a vector.

Parameters
vectorthe vector to transform
Returns
the transformed vector
Vector3D shapes3d.utils.Orientation.applyRTto ( final Vector3D  vector)

Apply rotation followed by translation to a vector.

Parameters
vectorthe vector to transform
Returns
the transformed vector
PVector shapes3d.utils.Orientation.applyRTto ( final PVector  vector)

Apply rotation followed by translation to a vector.

Parameters
vectorthe vector to transform
Returns
the transformed vector
Vector3D shapes3d.utils.Orientation.applyTRto ( final Vector3D  vector)

Apply translation followed by rotation to a vector.

Parameters
vectorthe vector to transform
Returns
the transformed vector
PVector shapes3d.utils.Orientation.applyTRto ( final PVector  vector)

Apply translation followed by rotation to a vector.

Parameters
vectorthe vector to transform
Returns
the transformed vector
Vector3D shapes3d.utils.Orientation.applyTto ( final Vector3D  vector)

Apply a translation to a vector.

Parameters
vectorthe vector to transform
Returns
the transformed vector
PVector shapes3d.utils.Orientation.applyTto ( final PVector  vector)

Apply a translation to a vector.

Parameters
vectorthe vector to transform
Returns
the transformed vector
Vector3D shapes3d.utils.Orientation.origin ( )

Get the center of rotation

Returns
the new origin for this orientation
Rotation shapes3d.utils.Orientation.rotation ( )

Get the rotation to be applied to the model coordinates

Returns
the rotation for this orientation

The documentation for this class was generated from the following file: