ObjectPosInfoList class
From Solid Graphics Wiki
| ||||||||||||
The ObjectPosInfoList class is a type used in SolidKit Library to specify describe hierarchical 3D object position (for example a wheel on a car, the first item in the array would specify position of the car's body, the second item the wheel position relative to teh car body). The ObjectPosInfoList class, or the ObjectPosInfo struct are the only types required to "connect" non-SolidKit-Library datamodel objects with the Window3D class, so the Window3D object can be used to manipulate the "outside datamodel" objects.
The class is defined as array of ObjectPosInfo struct pointers.
Constructors
Default constructor does initialize the instance to zero item length. Other constructors take ObjectPosInfo reference or pointer as an argument, these constructor initialize the array to length of one with the ObjectPosInfo pointer as the item value.
Fields
The ObjectPosInfoList class has no fields.
Methods
Note: Most of the below methods have two versions - one version uses the Visual-Studio-compiler-provided math floating point operations to perform calculations. The second version uses method name postfix OGL and uses OpenGL functions to perform the calculations - which potentially allows graphics card hardware acceleration for the calculations.
| Method name | Description |
| ObjectToWorld | Depending on the used parameter type - the method translates a point coordinates from coordinate system relative to the object to world (scene) coordinates, or modifies given matrix so it can be used to perform such translation later on. |
| WorldToObject | Depending on the used parameter type - the method translates a point coordinates from world (scene) coordinates to coordinate system relative to the object, or modifies given matrix so it can be used to perform such translation later on. |
| ObjectVectorToParentVector | Transforms a rotation vector from coordinate system relative to the object to rotation relative to object's parent. |
| ObjectVectorToWorldVector | Transforms a rotation vector from coordinate system relative to the object to rotation relative world/scene coordinate system. |
| WorldVectorToObjectVector | Transforms a rotation vector from world (scene) coordinate system to rotation in coordinate system relative to the object. |
| ObjectRotationToWorldRotation | Modifies given matrix so it can be used for transforming a rotation vector from coordinate system relative to the object to rotation in world (scene) coordinate system. |
| WorldRotationToObjectRotation | Modifies given matrix so it can be used to transform a rotation vector from world (scene) coordinate system to rotation in coordinate system relative to the object. |
| SetParent | Sets parent of last item in the object hierarchy to other parent. |
| MatchPoint | Changes translation of the last object hierarchy item so it's specified point moves to another point specified on another object. |
| MatchDirection | Changes rotation of the last object hierarchy item so it's specified vector matches direction of another vector specified on another ObjectPosInfoList object |
| Scale | Scales all object hierarchy items translation, centerPoint and boundingSphereRadius fields by given factor. |
| Clone | Makes and returns a copy of the instance. |
Operators
| = | Allows assignment to the object using ObjectPosInfo struct instance reference or pointer as the right-hand operand. |
See Also
SolidKit Library Documentation
