Unigine.Plugins.IG.Entity Class
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to- Sim
SDK edition to use it.
You should upgrade to
Entity Class
Enums
STATE#
Name | Description |
---|---|
STATE_INACTIVE = 0 | The entity is inactive. |
STATE_ACTIVE = 1 | The entity is active. |
STATE_DESTROYED = 2 | The entity is destroyed. |
CLAMP#
CLAMP_HEIGHT_MODE#
ANIMATION_DIRECTION#
Name | Description |
---|---|
ANIMATION_DIRECTION_FORWARD = 0 | Forward direction of the entity animation playback. |
ANIMATION_DIRECTION_BACKWARD = 1 | Backward direction of the entity animation playback. |
ANIMATION_LOOP#
Name | Description |
---|---|
ANIMATION_LOOP_ONESHOT = 0 | Oneshot mode of the entity animation playback. |
ANIMATION_LOOP_CONTINUOUS = 1 | Continuous mode of the entity animation playback. |
ANIMATION_STATE#
COORDINATE_SYSTEM#
Properties
vec3 AngularAcceleration#
The angular acceleration of the entity.
dvec3 LinearAcceleration#
The linear acceleration of the entity.
vec3 AngularVelocity#
The angular velocity of the entity.
dvec3 LinearVelocity#
The linear velocity of the entity.
Entity.COORDINATE_SYSTEM ExtrapolationCoordSystem#
The reference coordinate system to which the linear and angular velocity and acceleration are applied. If the reference coordinate system is set to WORLD, and the entity is a top-level (non-child) entity, the velocity and acceleration are defined relative to the database. Linear velocity and acceleration describe a path along and above the surface of the geoid. Angular velocity and acceleration describe a rotation relative to a reference plane. If the entity is a child entity, the velocity and acceleration are defined relative to the parent’s local coordinate system. If the reference coordinate system is set to LOCAL, the velocity and acceleration are defined relative to the entity’s local coordinate system.
bool Interpolation#
The a value indicating if interpolation and extrapolation are enabled.
Entity.ANIMATION_STATE AnimationState#
The entity's animation playback state.
Entity.ANIMATION_LOOP AnimationLoop#
The entity's animation playback mode.
Entity.ANIMATION_DIRECTION AnimationDirection#
The entity's animation playback direction.
Entity.CLAMP_HEIGHT_MODE GroundClampHeightMode#
The value of the clamp height mode parameter used for clamping. By default, the Ground Clamp Height Mode is set to RELATIVE — the entity is clamped to the ground and the height is calculated from the ground. With the mode set to IGNORE, the entity is clamped to the ground and the height is ignored.
Entity.CLAMP GroundClamp#
The value of the Ground/Ocean Clamp parameter.
bool InheritAlpha#
The value indicating if the entity uses the alpha value of its parent.
int Alpha#
The alpha value, that determines transparency of entity geometry.
int AttachState#
The value of the Attach State parameter. It specifies whether the entity is be attached as a child to a parent.
long ParentID#
The ID of the entity parent.
bool Collision#
The value indicating if collision detecton shall be enabled for the entity.
Entity.STATE State#
The entity state.
bool IsPrespawned#
The
long InternalType#
The internal type of the entity.
long Type#
The type of the entity. Entity type ID is defined in the entity definition section of the IG configuration file as follows:
<entity_types>
<entity id="111" name="b52">
</entity>
</entity_types>
NodeReference NodeReference#
The node reference assigned to the entity.
Node Node#
The node assigned to the entity.
long ID#
The unique ID of the entity instance.
Members
void SetParent ( Entity entity ) #
Attaches the entity as a child to the specified parent entity.Arguments
- Entity entity - Parent entity.
void unparent ( ) #
Detaches the entity from its parent.int getAttachState ( ) #
Returns the value of the Attach State parameter. It specifies whether the entity is be attached as a child to a parent.Return value
Attach State parameter value. 1 the entity shall be or remain attached to the entity specified by the Parent ID parameter; 0 — the entity shall be detached from its parent.dvec3 GetGroundClampPoint ( ) #
Returns the current ground clamping point coordinates for the entity. Clamping is performed relative to the ground and sea level.void SetVelocity ( dvec3 linear, vec3 angular_deg ) #
Sets linear and angular velocity for the entity.Arguments
- dvec3 linear - Linear velocity vector to be set.
- vec3 angular_deg - Angular velocity vector (roll, pitch, yaw), in degrees per second.
void SetAcceleration ( dvec3 linear, vec3 angular_deg ) #
Sets linear and angular acceleration for the entity.Arguments
- dvec3 linear - Linear acceleration vector to be set.
- vec3 angular_deg - Angular acceleration vector (roll, pitch, yaw), in degrees per second.
Component GetComponent ( int id, bool auto_create ) #
Returns the interface of the specified component.Arguments
- int id - ID of the component.
- bool auto_create - true to automatically create the component with the specified ID if it doesn't exist yet; false - to return nullptr in case the component doesn't exist.
Return value
Component interface if it exists, or nullptr otherwise.ArticulatedPart GetArticulatedPart ( int id, bool auto_create ) #
Returns the interface of the specified articulated part.Arguments
- int id - ID of the articulated part.
- bool auto_create - true to automatically create the articulated part with the specified ID if it doesn't exist yet; false - to return nullptr in case the articulated part doesn't exist.
Return value
Articulated part interface if it exists, or nullptr otherwise.CollisionSegment GetCollisionSegment ( int id, bool auto_create ) #
Returns the interface of the specified collision segment.Arguments
- int id - ID of the collision segment.
- bool auto_create - true to automatically create the collision segment with the specified ID if it doesn't exist yet; false - to return nullptr in case the collision segment doesn't exist.
Return value
Collision segment interface if it exists, or nullptr otherwise.CollisionVolume GetCollisionVolume ( int id, bool auto_create ) #
Returns the interface of the specified collision volume.Arguments
- int id - ID of the collision volume.
- bool auto_create - true to automatically create the collision volume with the specified ID if it doesn't exist yet; false - to return nullptr in case the collision volume doesn't exist.
Return value
Collision volume interface if it exists, or nullptr otherwise.string GetTypeName ( ) #
Returns the name of the entity type (defined in the entity definition section).Return value
Entity type name.bool IsPrespawned ( ) #
Last update:
2021-12-13
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)