This class will compute the bounding box of the primitive. The bounding box is an imaginary box that tightly encloses the entire primitive inside.
More...
List of all members.
Public Member Functions |
| PrimBounds (Primitive inPrim, Primitive inParent) |
| The default constructor of the class Must be given a valid primitive as an input. The bounds will be calculated here.
|
void | Update (TerseObjectUpdateEventArgs primUpdate) |
Vector3 | GetBoundsMin () |
Vector3 | GetBoundsMax () |
Quaternion | GetGlobalRotation () |
Static Public Member Functions |
static Vector3 | GetGlobalPos (Primitive inPrim, Primitive inParent) |
| The coordinates of the linked primitives (children) are specified relative to the parent prim. Use this metod to get the global position.
|
static Vector3 | Rotate (Vector3 vec, Quaternion quat) |
| Rotates a point using the input rotation.
|
static bool | IsCollisionDetectionRequired (Primitive inPrim, Primitive inParent, GridClient inClient) |
| Detects if the object requires collision detection.
|
static float | GetPrimTopPos (Primitive prim, Primitive parent) |
| Returns the Z position of the highest primitive point.
|
static float | GetPrimLowest (Primitive prim, Primitive parent) |
Protected Member Functions |
bool | IsUpdateNeeded () |
| Determines if the bounds have to be recalculated or not.
|
Detailed Description
This class will compute the bounding box of the primitive. The bounding box is an imaginary box that tightly encloses the entire primitive inside.
Constructor & Destructor Documentation
VIAgents.PrimBounds.PrimBounds |
( |
Primitive |
inPrim, |
|
|
Primitive |
inParent | |
|
) |
| | |
The default constructor of the class Must be given a valid primitive as an input. The bounds will be calculated here.
- Parameters:
-
| inPrim | The primitive itself A Primitive
- Parameters:
-
| inParentPos | The position of the root prim in the linkset. A Vector3 |
|
Member Function Documentation
Vector3 VIAgents.PrimBounds.GetBoundsMax |
( |
|
) |
|
Returns the top righ vertex coordinate of the primitive's bounding box. Returns Vector3.Zero in case of an error
Vector3 VIAgents.PrimBounds.GetBoundsMin |
( |
|
) |
|
Returns the bottom left vertex coordinate of the primitive's bounding box. Returns Vector3.Zero in case of an error
static Vector3 VIAgents.PrimBounds.GetGlobalPos |
( |
Primitive |
inPrim, |
|
|
Primitive |
inParent | |
|
) |
| | [static] |
The coordinates of the linked primitives (children) are specified relative to the parent prim. Use this metod to get the global position.
- Parameters:
-
| inPrim | A child primitive Primitive |
| inParent | A parent of the child prim or null for the root primPrimitive |
- Returns:
- Global position of the primitive as Vector3
Quaternion VIAgents.PrimBounds.GetGlobalRotation |
( |
|
) |
|
Rotation combination of parent and the current prim, resulting the global rotation of the prim
static float VIAgents.PrimBounds.GetPrimLowest |
( |
Primitive |
prim, |
|
|
Primitive |
parent | |
|
) |
| | [static] |
static float VIAgents.PrimBounds.GetPrimTopPos |
( |
Primitive |
prim, |
|
|
Primitive |
parent | |
|
) |
| | [static] |
Returns the Z position of the highest primitive point.
static bool VIAgents.PrimBounds.IsCollisionDetectionRequired |
( |
Primitive |
inPrim, |
|
|
Primitive |
inParent, |
|
|
GridClient |
inClient | |
|
) |
| | [static] |
Detects if the object requires collision detection.
- Parameters:
-
| inPrim | A Primitive Primitive |
| inParent | A root prim of the object or null Primitive |
| inClientt | A reference to the functional grid client GridClient |
- Returns:
- true if collision detection is needed and false otherwise
bool VIAgents.PrimBounds.IsUpdateNeeded |
( |
|
) |
[protected] |
Determines if the bounds have to be recalculated or not.
static Vector3 VIAgents.PrimBounds.Rotate |
( |
Vector3 |
vec, |
|
|
Quaternion |
quat | |
|
) |
| | [static] |
Rotates a point using the input rotation.
- Parameters:
-
| vec | The original point Vector3 |
| quat | The rotation Quaternion |
- Returns:
- The resulting (rotated) point Vector3
void VIAgents.PrimBounds.Update |
( |
TerseObjectUpdateEventArgs |
primUpdate |
) |
|
Recalculates the bounding box. The ObjectUpdate event represents the updated properties of the primitive i.e. new position and rotation. If the primitive is moving it will also contain the velocity related data.
The documentation for this class was generated from the following file: