This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine.Plugins.IG.Entity Class

Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Sim SDK edition to use it.

This class represents the IG Entity interface.

Notice
IG plugin must be loaded.

Entity Class

Enums

STATE#

NameDescription
STATE_INACTIVE = 0The entity is inactive.
STATE_ACTIVE = 1The entity is active.
STATE_DESTROYED = 2The entity is destroyed.

CLAMP#

NameDescription
CLAMP_NO_CLAMP = 0Altitude clamping for entity is disabled.
CLAMP_NON_CONFORMAL = 1Altitude parameter specifies an offset of the entity above the ground level.
CLAMP_CONFORMAL = 2Altitude parameter specifies an offset of the entity above the sea level.

CLAMP_HEIGHT_MODE#

NameDescription
CLAMP_HEIGHT_MODE_RELATIVE = 0Clamp height mode that makes the entity to be clamped to the ground and the height be calculated from the ground.
CLAMP_HEIGHT_MODE_IGNORE = 1Clamp height mode that makes the entity to be clamped to the ground and the height be ignored.

ANIMATION_DIRECTION#

NameDescription
ANIMATION_DIRECTION_FORWARD = 0Forward direction of the entity animation playback.
ANIMATION_DIRECTION_BACKWARD = 1Backward direction of the entity animation playback.

ANIMATION_LOOP#

NameDescription
ANIMATION_LOOP_ONESHOT = 0Oneshot mode of the entity animation playback.
ANIMATION_LOOP_CONTINUOUS = 1Continuous mode of the entity animation playback.

ANIMATION_STATE#

NameDescription
ANIMATION_STATE_STOP = 0Stop entity animation playback.
ANIMATION_STATE_PAUSE = 1Pause entity animation playback.
ANIMATION_STATE_PLAY = 2Start entity animation playback.
ANIMATION_STATE_CONTINUE = 3Resume entity animation playback.

COORDINATE_SYSTEM#

NameDescription
COORDINATE_SYSTEM_WORLD = 0If the reference coordinate system is set to this value, 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.
COORDINATE_SYSTEM_LOCAL = 1If the reference coordinate system is set to this value, the velocity and acceleration are defined relative to the entity’s local 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:
Source code (XML)
<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: 2022-12-14
Build: ()