Object are basics entities in NRG and can represent anything from a camera, static geometry, dynamic geometry, skeletal mesh, sounds, lights, occluders, 3d texts, particle system etc...
This is a simple example but this concept can be used to create much more complicated object structures that can manipulate in code (or using Nodes) dynamically at runtime.
Name | Description |
priority | Custom priority assigned to the current Object. |
Declaration - Note
- Controlling the object priority can be used to create multiple different types of classifications for optimization purposed, or simply to mark a specific type of Object, states etc... Priority can also be used to manually sort objects and to adjust their draw sequence, see RenderLayer SortingMethod for more information.
|
model_matrix | World space transformation of the Object. |
Declaration - Warning
world_matrix is now deprecated use model_matrix instead.
|
acceleration | Acceleration vector calculated from the transformation motion from one frame to another. |
Declaration
|
name | A unique name assigned to the Object to identify it within the Scene is associated to. |
Declaration
|
flags | Bit mask of options and tags assigned to the current Object. |
Declaration
Cap | Value | Description |
OBJ_FLAG_STICKY | bit.lshift(1,0) | Tag the Object transformation to be static. |
OBJ_FLAG_VISIBLE | bit.lshift(1,1) | Toggle the visibility of the Object On/Off. |
OBJ_FLAG_SELECTED | bit.lshift(1,2) | Mark the Object as selected. |
OBJ_FLAG_MIRROR | bit.lshift(1,3) | Tag the Object as a mirror, allowing you to reverse the cull face method to use. |
OBJ_FLAG_LOCK_LOCX | bit.lshift(1,4) | Prevents changes to the the location X axis (editor only). |
OBJ_FLAG_LOCK_LOCY | bit.lshift(1,5) | Prevents changes to the the location Y axis (editor only). |
OBJ_FLAG_LOCK_LOCZ | bit.lshift(1,6) | Prevents changes to the the location Z axis (editor only). |
OBJ_FLAG_LOCK_ROTX | bit.lshift(1,7) | Prevents changes rotational X axis (editor only). |
OBJ_FLAG_LOCK_ROTY | bit.lshift(1,8) | Prevents changes rotational Y axis (editor only). |
OBJ_FLAG_LOCK_ROTZ | bit.lshift(1,9) | Prevents changes rotational Z axis (editor only). |
OBJ_FLAG_LOCK_ROTW | bit.lshift(1,10) | Prevents changes rotational W axis (quaternion rotation only), (editor only). |
OBJ_FLAG_LOCK_SCLX | bit.lshift(1,11) | Lock the scale X axis (editor only). |
OBJ_FLAG_LOCK_SCLY | bit.lshift(1,12) | Lock the scale X axis (editor only). |
OBJ_FLAG_LOCK_SCLZ | bit.lshift(1,13) | Lock the scale X axis (editor only). |
OBJ_FLAG_AUTO_SPACE | bit.lshift(1,14) | Automatically select the transformation space, either local or world based on the Object root (editor only). |
OBJ_FLAG_AUTO_BONE_SPACE | bit.lshift(1,15) | Automatically select the transformation space for bones, either local or world based on the Bone root (editor only). |
OBJ_FLAG_LOCK_VARIABLES | bit.lshift(1,16) | Prevent member Variable values to be modified by the user. |
OBJ_FLAG_ROT_MODE_QUAT | bit.lshift(1,17) | Force the use of quaternion instead of Euler angle to represent rotation (editor only). |
OBJ_FLAG_LOCK_ROT_MODE | bit.lshift(1,18) | Prevent regular user to change the rotation mode of the Object (editor only). |
OBJ_FLAG_RUNTIME | bit.lshift(1,19) | Determine wether or not the current Object have been created at runtime (such as object emitted by a particle system). |
OBJ_FLAG_FORCE_UPATE | bit.lshift(1,20) | Force the Object to update regardless of its current state. |
OBJ_FLAG_VIRTUAL | bit.lshift(1,22) | Determine if the curent Object is virtual; such as Camera created by Sequence. |
OBJ_FLAG_DRAW_MESH | bit.lshift(1,23) | Enable for disable mesh drawing in the viewport (editor only). |
OBJ_FLAG_DRAW_SKELETON | bit.lshift(1,24) | Enable for disable skeleton drawing in the viewport (editor only). |
OBJ_FLAG_DEBUG_DRAW | bit.lshift(1,25) | Enable for disable debug drawing of the current Object in the viewport (editor only). |
OBJ_FLAG_GEOMETRY_NO_CLEAR | bit.lshift(1,26) | Prevent the Mesh Geometry vertex and element to be cleared automatically. |
OBJ_FLAG_SKIP_DRAW | bit.lshift(1,27) | Skip drawing the Object and move on to the next (during RenderLayer draw calls). |
OBJ_FLAG_GRID_VIEWER | bit.lshift(1,28) | Flag used internally to mark the the active Object is used as viewer by an ObjectGrid. |
OBJ_FLAG_INITIALIZED | bit.lshift(1,29) | Determine if the Object have been initialized. |
OBJ_FLAG_DETACH_ATTACHMENTS | bit.lshift(1,30) | Internal flag used by the system to force attachments to be detached when the Object is about to be removed. |
OBJ_FLAG_DELETE | bit.lshift(1,31) | The Object have been marked to be remove by the Scene garbage collector. |
|
renderlayer_mask | Bit mask controlling on which RenderLayer the current Object will be displayed. |
Declaration
|
sticky | Freezes the transformation of the Object by preventing it to be updated. |
Declaration - Note
- This is recommended for all StaticMesh since their transformation will not change over time; only a single transformation update is necessary. This option can also be controlled by the setting the
OBJ_FLAG_STICKY flag.
|
visible | Toggle the visibility of the active Object On/Off. |
Declaration - Note
- Same as
OBJ_FLAG_VISIBLE flag.
|
selected | Mark the Object as selected. |
Declaration - Note
- Same as
OBJ_FLAG_SELECTED flag.
|
mirror | Tag the Object to be mirrored. |
Declaration - Note
- Same as
OBJ_FLAG_MIRROR flag.
|
location | Directly access the Object basis_matrix location. |
Declaration - Note
- The location property is basically just a shortcut to change an object basis matrix location which is equivalent as:
obj.basis_matrix=Mat4:SetLoc(obj.basis_matrix,Vec3:Set(x,y,z));
|
rotation | Directly access the basis_matrix rotation of the current Object. |
Declaration
- Note
- The rotation property is basically just a shortcut to change an object basis matrix rotation which is equivalent as:
obj.basis_matrix=Mat4:SetRot(obj.basis_matrix,Vec4:Set(x,y,z,0));
|
scale | Directly access the scale of the Object basis_matrix . |
Declaration - Note
- The scale property is basically just a shortcut to change an object basis matrix scale which is equivalent as:
obj.basis_matrix=Mat4:SetScl(obj.basis_matrix,Vec3:Set(x,y,z));
|
basis_matrix | 4x4 matrix representing the local transformation of the Object. |
Declaration - Note
- The root of the Object is determined by the
root property; if none is specified (set to nil ) the Scene is then considered to be the root of the Object. By default, the basis_matrix coordinate system is global and aligned to the world axis. However, if the object is an attachment the coordinate changes to be in local space and is aligned with the local axis of the root. Once the object gets detached the coordinate system will automatically come back to world space.
|
Name | Description |
AddPhysics | Add physics to the current Object. |
Declaration PhysicObject *AddPhysics( void ) Return Value
A new PhysicObject reference pointer.
- Note
- If the object already have a reference to a PhysicObject this function call have no effect and the active PhysicObject reference will be returned.
|
RemovePhysics | Completely remove all physics behaviors from the object (if any). |
Declaration bool RemovePhysics( void ) Return Value
true if the PhysicObject have been successfully removed else return false if the Object did not have any prior reference to a PhysicObject.
- Note
- If the physic object was added to a physic World it will be removed automatically when this function is called.
|
AddAttachment | Create a new attachment Object of a specific ObjectType. |
Declaration Object *AddAttachment( const char *name, const ObjectType type, const int sub_type ) Parameters
name : Name to identify the Object within its associated Scene.
type : The ObjectType of the attachment.
sub_type : The sub. type of the attachment; see ObjectData for more information.
Return Value
A new Object reference attached to the current Object.
- Note
- The maximum amount of attachment on a per object basis is 65535 regardless of the the ObjectType.
|
AddEmpty | Helper function that creates a empty Object attachment. |
Declaration Object *AddEmpty( const char *name ) Parameters
name : A name to identify the empty Object.
Return Value
Reference to the newly created empty Object attached to the current Object.
|
AddCamera | Helper that creates a new Camera and attach it to the active Object. |
Declaration Camera *AddCamera( const char *name, const LensType type ) Parameters
name : The name to use to create the new camera object.
type : The LensType to use for the new Camera; in other words the ObjectData sub type.
Return Value
The new Camera Object attachment reference.
|
AddStaticMesh | Creates a new StaticMesh Object and it to the active Object. |
Declaration StaticMesh *AddStaticMesh( const char *name ) Parameters
Return Value
Reference to a new StaticMesh Object.
|
AddDynamicMesh | Helper that creates a DynamicMesh attachment. |
Declaration DynamicMesh *AddDynamicMesh( const char *name ) Parameters
Return Value
A new DynamicMesh reference.
|
AddAdaptiveMesh | Function that creates an AdaptiveMesh and attach it to the current Object. |
Declaration AdaptiveMesh *AddAdaptiveMesh( const char *name ) Parameters
Return Value
A valid AdaptiveMesh reference.
|
AddSkeletalMesh | Creates a new SkeletalMesh Object and attach it to the active Object. |
Declaration SkeletalMesh *AddSkeletalMesh( const char *name ) Parameters
Return Value
A new SkeletalMesh reference.
|
AddSoundSource | Create a new SoundSource and parent it to the active Object. |
Declaration SoundSource *AddSoundSource( const char *name, const SpeakerType type ) Parameters
Return Value
A reference to the new SoundSource.
|
AddLightSource | Create a new LightSource and attach it to the active Object. |
Declaration LightSource *AddLightSource( const char *name, const LightType type ) Parameters
Return Value
Valid reference to a new LightSource Object.
|
AddOccluder | Helper function that creates and attach a new Occluder to the active Object. |
Declaration Occluder *AddOccluder( const char *name ) Parameters
name : A unique name to identify the new Occluder.
Return Value
Reference to a new Occluder Object.
|
AddText | Function that help you create a new Text Object and parent it to the active Object. |
Declaration Text *AddText( const char *name ) Parameters
name : A name to identify the Text Object attachment.
Return Value
Reference to a new Text Object.
|
AddParticleSystem | Create a new ParticleSystem and attach it to the current Object. |
Declaration ParticleSystem *AddParticleSystem( const char *name, const SystemType type ) Parameters
Return Value
A valid ParticleSystem reference parented to the active Object.
|
AddEnergyField | Creates a new EnergyField Object and attach it to the active Object. |
Declaration EnergyField *AddEnergyField( const char *name, const FieldType type ) Parameters
Return Value
Reference to the new EnergyField attached to the current Object.
|
AddRoute | Append a new Route Object to the current Object calling this function. |
Declaration Route *AddRoute( const char *name ) Parameters
Return Value
A new reference to a valid Route Object.
|
AddRay | Function to create and attach a new Ray Object to the active Object. |
Declaration Ray *AddRay( const char *name, const RayType type ) Parameters
name : String identifier to use for the new Ray Object.
type : Specify the type of ray (RayType) to create.
Return Value
A valid reference to a new Ray Object.
|
AddProbe | Helper that creates and attach a new Probe to the active Object. |
Declaration Probe *AddProbe( const char *name, const ProbeType type ) Parameters
Return Value
Reference to the newly parented Probe Object.
|
AddRegion | Creates and attach a new Region to the active Object calling this helper. |
Declaration Region *AddRegion( const char *name, const CollisionBounds bounds ) Parameters
Return Value
New Region Object reference.
- Note
- The type of CollisionBounds supported are
kBox , kSphere and kCylinder (defaulted to kBox if the bounds specified is invalid).
|
GetAttachment | Get a specific Object attachment using its name as key. |
Declaration Object *GetAttachment( const char *name ) Parameters
name : The name of the attachment to retrieve.
Return Value
The attachment Object reference; nil if the name received in parameter does not match to any of the Object name that are currently attached to the base Object.
|
GetAttachmentAt | Retrieve an attachment using its internal index as key. |
Declaration Object *GetAttachmentAt( unsigned short index ) Parameters
index : Index of the attachment Object to retrieve.
Return Value
The reference of the Object pointed by index; nil if the index is greater or equal than the number of attachments of the base Object contains.
|
GetAttachmentIndex | Get the index of a specific attachment. |
Declaration int GetAttachmentIndex( const Object *attachment ) Parameters
attachment : A valid Object attachment reference
Return Value
The internal attachment Object index value on success; else return -1 if the attachment reference is invalid.
|
RemoveAttachment | Remove a specific attachment from the active base Object. |
Declaration bool RemoveAttachment( Object *attachment ) Parameters
attachment : Reference to an Object currently attached to the Object calling this function.
Return Value
true if the function have actually remove something; else return false .
- Warning
- Not only the attachment will be detached but it will also be deleted from the its active Scene.
|
RemoveAttachmentAt | Remove a specific attachment Object using its index as key. |
Declaration bool RemoveAttachmentAt( int index ) Parameters
index : Index of the attachment to remove.
Return Value
true if the function have actually remove the attachment; else return false .
- Warning
- Not only the attachment will be detached but it will also be deleted from the its active Scene.
|
SwapAttachments | Swap an existing attachment Object to a new index. |
Declaration bool SwapAttachments( unsigned short index0, unsigned short index1 ) Parameters
index0 : Index of the first attachment to swap.
index1 : The location index to swap the source attachment to.
Return Value
true if swapped succesffully; return false if one or both index received in parameter is invalid.
|
AddVariable | Add a new member Variable to the current Object. |
Declaration Variable *AddVariable( const char *name, VariableType type ) Parameters
name : The name to use for the new variable.
type : Specify the VariableType to create.
Return Value
A new Variable reference if there is still some variable slot available else return nil .
- Note
- Adding a variable to an Object can be anything you want from the current HP and MP of a player to the number of laps until a race is over. In addition take note that each Object can have up to 65535 unique variables; which should be plenty for all cases scenarios. Additionally, it is up to the user to manage the uniqueness of each variable name, since the internal variable system is built for speed and flexibility. Multiple variables using the same name might cause conflict while retreiving by name.
|
GetVariable | Retrieve an existing Variable by name. |
Declaration Variable *GetVariable( const char *name ) Parameters
name : The name of the Variable to retrieve.
Return Value
If the Variable exists its reference will be returned; if not the function will return nil .
|
GetVariableIndex | Retrieve the internal index of a specific Variable reference. |
Declaration int GetVariableIndex( const Variable *variable ) Parameters
Return Value
-1 upon failure (the variable reference is invalid); else return the position of the Variable from the list of variables maintained by the active Object.
|
GetVariableAt | Retrieve an existing Variable reference using its index. |
Declaration Variable *GetVariableAt( unsigned short index ) Parameters
index : Index of the Variable you wish to retrieve the reference for.
Return Value
If found the Variable reference will be returned, else nil if the index is out of bounds.
|
RemoveVariable | Remove a specific variable from the object. |
Declaration bool RemoveVariable( Variable *variable ) Parameters
variable : The Variable reference to remove from the Object member variables list.
Return Value
true if the function actually remove the Variable from the list; else return false .
|
RemoveVariableAt | Remove a specific Variable located at the index passed to this function. |
Declaration bool RemoveVariableAt( int index ) Parameters
index : The index of the variable to remove.
Return Value
true if the function actually remove the Variable from the Object member variables list; else return false if the index is invalid.
|
AddConstraint | Add a new transformation Constraint to the active Object. |
Declaration Constraint *AddConstraint( const char *name, const ConstraintType type ) Parameters
Return Value
A reference to the newly created Constraint.
|
GetConstraint | Helper to retrieve an existing Constraint using its name as key. |
Declaration Constraint *GetConstraint( const char *name ) Parameters
Return Value
A valid reference to an existing Constraint maintained by the base Object; else return nil if the name does not correspond to any Constraint managed by the base Object.
|
GetConstraintAt | Retrieve a Constraint by index. |
Declaration Constraint *GetConstraintAt( unsigned char index ) Parameters
Return Value
nil if the index is out of bounds; else return the reference of the Constraint pointed by the index.
|
GetConstraintIndex | Get the index of an exsiting Constraint maintained by the active Object. |
Declaration int GetConstraintIndex( const Constraint *constraint ) Parameters
constraint : Valid reference to an exising Constraint.
Return Value
-1 if the reference does not correspond to any Constraint maintained by the base Object; else return the Constraint internal list index.
|
SetConstraintIndex | Change the priority of an exsiting Constraint. |
Declaration bool SetConstraintIndex( Constraint *constraint, const unsigned char index ) Parameters
constraint : Reference to the Constraint you need to the change the priority for (lower index have a higher priority since each Constraint are evaluated based on their position)
Return Value
true if the Constraint have been moved sucessfully; else return false if the Constraint reference does not match any Constraint maintained by the active Object.
|
RemoveConstraint | Remove a specific Constraint. |
Declaration bool RemoveConstraint( Constraint *constraint ) Parameters
constraint : A valid reference to an existing Constraint.
Return Value
true if the Constraint have been removed sucessfully; else return false if the Constraint reference is invalid.
|
RemoveConstraintAt | Remove a specific Constraint using its internal index as key. |
Declaration bool RemoveConstraintAt( int index ) Parameters
Return Value
true if the function was able to remove the Constraint; false if the index received in parameter is out of bounds.
|
SwapConstraints | Exchange the location of two Constraint. |
Declaration bool SwapConstraints( unsigned char index0, unsigned char index1 ) Parameters
index0 : Index of the first Constraint to move.
index1 : The destination index to move the source Constraint. to.
Return Value
false if one or both index is invalid; else return true if the swap actually occur.
|
AddSensor | Create and attach a new Sensor to the active Object. |
Declaration Sensor *AddSensor( const char *name ) Parameters
name : Unique name to identify the Sensor.
Return Value
A new Sensor reference.
|
GetSensor | Retrieve the reference of an existing Sensor by name. |
Declaration Sensor *GetSensor( const char *name ) Parameters
name : Name of the Sensor to retrieve.
Return Value
nil upon failure; else return the Sensor reference.
|
GetSensorAt | Retrieve an existing Sensor reference by index. |
Declaration Sensor *GetSensorAt( unsigned char index ) Parameters
index : Index of the Sensor reference to retrieve.
Return Value
nil if the index is invalid; else return the existing Sensor reference.
|
GetSensorIndex | Get the index of a specific Sensor. |
Declaration int GetSensorIndex( const Sensor *sensor ) Parameters
sensor : Reference to the Sensor to get the index for.
Return Value
-1 if the Sensor reference received in parameter is invalid; else return the Sensor index.
|
SetSensorIndex | Move an existing Sensor to a specific index. |
Declaration bool SetSensorIndex( Sensor *sensor, const unsigned char index ) Parameters
sensor : Reference to the Sensor to move.
index : The new list location to use for the Sensor.
Return Value
true if both the sensor reference and the index pass down the function are valid; else return false on failure.
|
RemoveSensor | Remove a specific Sensor. |
Declaration bool RemoveSensor( Sensor *sensor ) Parameters
sensor : Reference to the Sensor to remove.
Return Value
true on success; false if the sensor reference is not maintained by the active Object.
|
RemoveSensorAt | Remove a Sensor located at a specific index. |
Declaration bool RemoveSensorAt( int index ) Parameters
index : Index of the Sensor to remove.
Return Value
true if the Sensor have successfully been removed; else return false .
|
SwapSensors | Exchange the location index of two existing Sensor. |
Declaration bool SwapSensors( unsigned char index0, unsigned char index1 ) Parameters
index0 : Index of the source Sensor.
index1 : The new destination index to apply.
Return Value
true on success; false either of the index are out of bounds.
|
DetectRootLoop | Helper function that detect cyclic redundency in parent/child (root/attachment) relation of the active Object. |
Declaration bool DetectRootLoop( const Object *object ) Parameters
object : The Object reference to test against the base Object.
Return Value
true if the function detect a root loop; false if the Object tested in parameter can be safely attached to the current Object.
|
Attach | Attach the active Object to another existing Object to create a parent child relationship. |
Declaration bool Attach( Object *root ) Parameters
root : The root Object reference to attach the object to.
Return Value
true if the object attach itself to the root. false if a root loop is detected; or if the root is invalid and does not not belong to the same Scene as the base Object calling this function.
- Note
- If the object is attached a previous object it will automatically be detached and re-attached to the new
root .
|
Detach | Detach the active Object from its root (if any). |
Declaration Return Value
true if the Object have successfully been detached; else return false .
|
Duplicate | Clone the active Object. |
Declaration Object *Duplicate( const int save_flags ) Parameters
save_flags : Bit mask of ObjectSaveFlags that specified what type of data should be duplicated.
Return Value
Reference to the new clone.
|
Update | Force the current Object to be updated. |
Declaration void Update( bool physics, bool bounds ) Parameters
physics : Wether or not the PhysicObject attached to the current Object should be updated as well.
bounds : Specify if the current Object Bounds should be updated.
- Note
- The function will return immediately if the object is
sticky or if the PhysicObject type is kStatic . Calling this function will also trigger a manual OnUpdate event.
|
UpdateBounds | Manually force the Object Bounds to be updated. |
Declaration bool UpdateBounds( bool physics, bool data ) Parameters
Return Value
true if the current Object have been updated; else return false .
|
Convert | Convert the current Object to another ObjectType. |
Declaration bool Convert( cobnst ObjectType type ) Parameters
Return Value
true if the object data have been converted successfully else return false .
- Warning
- Only work back and forth between data that contains geometry: StaticMesh, DynamicMesh, AdaptiveMesh SkeletalMesh and \ Occluder.
|
GetVariable | Retrieve an existing member Variable using its name as key. |
Declaration Variable *GetVariable( const char *name ) Parameters
Return Value
A valid member Variable reference pointer; else return nil .
|
GetVariableAt | Retrieve an Object member Variable using its index as key. |
Declaration Variable *GetVariableAt( unsigned char index ) Parameters
index : Index of the Variable to retrieve.
Return Value
A valid member Variable reference pointer; else return nil if the index is invalid.
|
GetVariableIndex | Get the internal index of an existing member Variable maintained by the active Object. |
Declaration int GetVariableIndex( const Variable *variable ) Parameters
variable : Reference to an existing member Variable.
Return Value
-1 if the variable reference is not associated to the current Object; else return the variable index from the internal list maintained by the thread.
|
GetVariableBool | Retrieve the value of an existing boolean member Variable. |
Declaration bool GetVariableBool( const char *name ) Parameters
name : The name of the boolean Variable to retrieve the value from.
Return Value
false if the member Variable does not exist or if its value is actually set to false ; else return true .
- Note
- This function is simply a helper function. Always verify that the Variable actually exists using the
GetVariable function.
|
SetVariableBool | Set the value of an existing boolean member Variable. |
Declaration bool SetVariableBool( const char *name, const bool value ) Parameters
name : The name of the member Variable to update.
value : The value to update.
Return Value
true if the Variable have been successfully updated; return false if the variable does not exists or if its not a boolean.
|
GetVariableInt | Retrieve the value of an existing integer member Variable associated to the current Object. |
Declaration int GetVariableInt( const char *name ) Parameters
name : The name of the integer Variable to retrieve the value from.
Return Value
0 if the member Variable does not exist or if its value is actually set to 0 ; else returns the variable actual value.
- Note
- This function is simply a helper function. Always verify that the member Variable actually exists using the
GetVariable function.
|
SetVariableInt | Set the value of an existing integer Variable. |
Declaration bool SetVariableInt( const char *name, const int value ) Parameters
name : The name of the member Variable to update.
value : The value to update.
Return Value
true if the member variable have been successfully updated; return false if the Variable does not exists or if its not an integer.
|
GetVariableFloat | Retrieve the value of an existing float member Variable. |
Declaration float GetVariableFloat( const char *name ) Parameters
name : The name of the float Variable to retrieve the value from.
Return Value
0.0 if the Variable does not exist or if its value is actually set to 0.0 ; else returns the member variable actual value.
- Note
- This function is simply a helper function. Always verify that the Variable actually exists using the
GetVariable function.
|
SetVariableFloat | Set the value of an existing float member Variable. |
Declaration bool SetVariableFloat( const char *name, const float value ) Parameters
name : The name of the member Variable to update.
value : The value to update it with.
Return Value
true if the Variable have been successfully updated; return false if the variable does not exists or if its not a floating point.
|
GetVariableVec2 | Retrieve the value of an existing 2d vector member Variable. |
Declaration vec2 GetVariableVec2( const char *name ) Parameters
name : The name of the vec2 Variable to retrieve the value from.
Return Value
A zeroed vector if the member Variable does not exist or if its values are actually set to 0.0 ; else returns the variable actual value.
- Note
- This function is simply a helper function. Always verify that the Variable actually exists using the
GetVariable function.
|
SetVariableVec2 | Set the value of an existing vec2 member Variable. |
Declaration bool SetVariableVec2( const char *name, const vec2 value ) Parameters
name : The name of the Variable to update.
value : The vector value to update it with.
Return Value
true if the member Variable have been successfully updated; return false if the variable does not exists or if its not a 2d vector.
|
GetVariableVec3 | Retrieve the value of an existing tri-dimensional vector Variable. |
Declaration vec3 GetVariableVec3( const char *name ) Parameters
name : The name of the vec3 member variable to retrieve the value from.
Return Value
A zeroed vector if the Variable does not exist or if its values are actually set to 0.0 ; else returns the variable actual value.
- Note
- This function is simply a helper function. Always verify that the Variable actually exists using the
GetVariable function.
|
SetVariableVec3 | Set the value of an existing 3d vector member Variable. |
Declaration bool SetVariableVec3( const char *name, const vec3 value ) Parameters
name : The name of the member Variable to update.
value : The vector value to update to.
Return Value
true if the Variable have been successfully updated; return false if the member Variable does not exists or if its not a 3d vector.
|
GetVariableVec4 | Retrieve the value of an existing vec4 member Variable. |
Declaration vec4 GetVariableVec4( const char *name ) Parameters
name : The name of the vec4 member variable to retrieve the value from.
Return Value
A zeroed vector if the Variable does not exist or if its values are actually set to 0.0 ; else returns the member variable actual value.
- Note
- This function is simply a helper function. Always verify that the member Variable actually exists using the
GetVariable function.
|
SetVariableVec4 | Set the value of an existing vec4 Variable. |
Declaration bool SetVariableVec4( const char *name, const vec4 value ) Parameters
name : The name of the member Variable to update.
value : The vector value to update it with.
Return Value
true if the variable have been successfully updated; return false if the member variable does not exists or if its not a 4d vector.
|
GetVariableString | Retrieve the character set of an existing string member Variable. |
Declaration char *GetVariableString( const char *name ) Parameters
name : The name of the char variable to retrieve the value from.
Return Value
nil if the Variable does not exist; else returns the current string value set for the Variable.
|
SetVariableString | Set the value of an existing string member Variable. |
Declaration bool SetVariableString( const char *name, const char *value ) Parameters
name : The name of the member Variable to update.
value : The new string value to update the Variable to.
Return Value
true if the string value of the variable have been successfully updated; else return false .
|
MoveToScene | Transfer the active Object to another Scene currently loaded. |
Declaration bool MoveToScene( Scene *scene ) Parameters
scene : Reference to the Scene the Object should be transfered to.
Return Value
true if the operation is successfull; false if the Scene reference is invalid.
|
Flags that determine the type of data that should be cloned when duplicating or when an Object is manually saved.
Constant values used to define an object data type.
A structure that allows you to manipulate the active object data. Using the associated data type that is represented by the ObjectType of your object you will gain access to its variables, methods, and functions specific to that data class.
Name | Description |
type | Return the object data ObjectType. |
Declaration
|
lens_type | Sub data type used by Camera Object that determine the LensType to use. |
Declaration
|
speaker_type | Sub data type used by SoundSource Object that determine the SpeakerType to use. |
Declaration
|
light_type | Sub data type used by LightSource Object that determine the LightType to use. |
Declaration
|
system_type | Sub data type used by ParticleSystem Object that determine the SystemType to use. |
Declaration
|
field_type | Sub data type used by EnergyField Object that determine the FieldType to use. |
Declaration
|
route_type | Sub data type used by Route Object that determine the RouteType to use. |
Declaration
|
ray_type | Sub data type used by Ray Object that determine the RayType to use. |
Declaration
|
probe_type | Sub data type used by Probe Object that determine the ProbeType to use. |
Declaration <tr class="outline_row" style="background:none">
<td><a class="el" id="ObjectData.empty" href="javascript:onclick=show_hide('empty');">`empty`</a></td>
<td>An empty \ref Object will always return itself; `nil` if the object data type is not `kEmpty`.</td>
</tr>
<tr style="display: none;" class="display_open" id="empty">
<td colspan="2">
<b>Declaration</b>
|
camera | Access the Camera data attached to the object; nil if the object data type is not kCamera . |
Declaration
|
staticmesh | Access the StaticMesh data attached to the object; nil if the object data type is not kStaticMesh . |
Declaration
|
dynamicmesh | Access the DynamicMesh data attached to the object; nil if the object data type is not kDynamicMesh . |
Declaration
|
adaptivemesh | Access the AdaptiveMesh data attached to the object; nil if the object data type is not kAdaptiveMesh . |
Declaration AdaptiveMesh *adaptivemesh
|
skeletalmesh | Access the SkeletalMesh data attached to the object; nil if the object data type is not kSkeletalMesh . |
Declaration SkeletalMesh *skeletalmesh
|
fracturedmesh | Access the FracturedMesh data attached to the object; nil if the object data type is not kFracturedMesh . |
Declaration FracturedMesh *fracturedmesh
|
soundsource | Access the SoundSource data attached to the object; nil if the object data type is not kSoundSource . |
Declaration
|
lightsource | Access the LightSource data attached to the object; nil if the object data type is not kLightSource . |
Declaration
|
occluder | Access the Occluder data attached to the object; nil if the object data type is not kOccluder . |
Declaration
|
text | Access the Text data attached to the object; nil if the object data type is not kText . |
Declaration
|
particlesystem | Access the ParticleSystem data attached to the object; nil if the object data type is not kParticleSystem . |
Declaration ParticleSystem *particlesystem
|
energyfield | Access the EnergyField data attached to the object; nil if the object data type is not kEnergyField . |
Declaration
|
route | Access the Route data attached to the object; nil if the object data type is not kRoute . |
Declaration
|
ray | Access the Ray data attached to the object; nil if the object data type is not kRay . |
Declaration
|
probe | Access the Probe data attached to the object; nil if the object data type is not kProbe . |
Declaration
|
region | Access the Region data attached to the object; nil if the object data type is not kRegion . |
Declaration
|