This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
编程
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
应用程序接口
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
CIGI Client Plugin
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

IG::IEntity Class

Header: #include <plugins/IGInterface.h>

This class represents the IG Entity interface.

Notice
IG plugin must be loaded.

IEntity Class

Members


int getID ( ) #

Returns the entity ID.

Return value

Entity ID.

const Ptr<Node> & getNode ( ) #

Returns the node assigned to the entity.

Return value

Node assigned to the entity.

const Ptr<NodeReference> & getNodeReference ( ) #

Returns the node reference assigned to the entity.

Return value

NodeReference assigned to the entity.

void setGeoPosition ( const Math::Vec3 & position ) #

Sets the entity position in geo-coordinates (lat, lon, alt).

Arguments

  • const Math::Vec3 & position - New geo-coordinates of entity position to be set.

Math::Vec3 getGeoPosition ( ) #

Returns the current entity position in geo-coordinates (lat, lon, alt).

Return value

Entity position coordinates.
Notice
Geo-coordinates will be returned if there is no parent entity assigned, otherwise - local coordinates will be returned.

void setRotationEuler ( const Math::vec3 & euler ) #

Sets the entity rotation.

Arguments

  • const Math::vec3 & euler - Entity rotation euler angles to set.

void setRotationEuler ( const Math::vec3 & euler, double timestamp ) #

Sets the entity rotation at the specified time.

Arguments

  • const Math::vec3 & euler - Entity rotation euler angles to set.
  • double timestamp - Timestamp, indicating the time when rotation is to be set.

Math::vec3 getRotationEuler ( ) #

Returns the current entity rotation euler angles.

Return value

Entity rotation euler angles.

void setType ( int id ) #

Sets the type of the entity.

Arguments

  • int id - Entity type to be set.

int getType ( ) #

Returns the current entity type.

Return value

Entity type.

void setState ( int id ) #

Sets the state of the entity.

Arguments

  • int id - Entity state to be set. One of the CIGI_STATE_* values.

int getState ( ) #

Returns the current entity state.

Return value

Current entity state. One of the CIGI_STATE_* values.

void setCollision ( int enabled ) #

Sets the value indicating if collision detecton shall be enabled for the entity.

Arguments

  • int enabled - 1 to enable collision detecton for the entity; 0 - to disable.

int getCollision ( ) #

Returns the value indicating if collision detecton shall be enabled for the entity.

Return value

Collision Detection Enable parameter value. 1 collision detecton for the entity shall be enabled; 0 - collision detecton for the entity shall be enabled.

void setParent ( IEntity * entity ) #

Attaches the entity as a child to the specified parent entity.

Arguments

  • IEntity * entity - Parent entity.

void unparent ( ) #

Detaches the entity from its parent.

int getParentID ( ) #

Returns the ID of the entity parent.

Return value

Entity parent ID.

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.

void setAlpha ( int byte_value ) #

Sets the alpha value, that determines transparency of entity geometry.

Arguments

  • int byte_value - Alpha value to be set.

int getAlpha ( ) #

Returns the current alpha value, that determines transparency of entity geometry.

Return value

Alpha value.

void setInheritAlpha ( int enabled ) #

Sets the value indicating if the entity uses the alpha value of its parent.

Arguments

  • int enabled - 1 the entity shall use the alpha value of its parent; 0 - the entity shall use its own alpha value.

int isInheritAlpha ( ) #

Returns the value indicating if the entity uses the alpha value of its parent.

Return value

1 if the entity uses the alpha value of its parent; otherwise, 0.

void setGround ( Ptr<ObjectTerrainGlobal> terrain ) #

Sets the terrain to be used by the entity for ground clamping.

Arguments

  • Ptr<ObjectTerrainGlobal> terrain - Global terrain to be used by the entity for ground clamping.

void setGroundClamp ( int clamp ) #

Sets the value of the Ground/Ocean Clamp parameter.

Arguments

  • int clamp - Ground/Ocean Clamp parameter value. One of the CIGI_ENTITY_* values.

int getGroundClamp ( ) #

Returns the value of the Ground/Ocean Clamp parameter.

Return value

Ground/Ocean Clamp parameter value. One of the CIGI_ENTITY_* values.

void setAnimationDirection ( int animation_direction ) #

Returns the entity's animation playback direction.

Arguments

  • int animation_direction - Direction of the entity's animation playback. One of the ANIM_DIR_* values.

int getAnimationDirection ( ) #

Returns the current entity's animation playback direction.

Return value

Direction of the entity's animation playback. One of the ANIM_DIR_* values.

void setAnimationLoop ( int animation_loop ) #

Returns the entity's animation playback mode.

Arguments

  • int animation_loop - Mode of the entity's animation playback. One of the ANIM_LOOP_* values.

int getAnimationLoop ( ) #

Returns the current entity's animation playback mode.

Return value

Mode of the entity's animation playback. One of the ANIM_LOOP_* values.

void setAnimationState ( int animation_state ) #

Returns the entity's animation playback state.

Arguments

  • int animation_state - State of the entity's animation playback. One of the ANIM_STATE_* values.

int getAnimationState ( ) #

Returns the current entity's animation playback state.

Return value

State of the entity's animation playback. One of the ANIM_STATE_* values.

void setInterpolation ( int id ) #

Sets a value indicating if interpolation and extrapolation are enabled.

Arguments

  • int id - 1 to enable interpolation and extrapolation; 0 - to disable.

int isInterpolation ( ) #

Returns a value indicating if interpolation and extrapolation are enabled.

Return value

1 if interpolation and extrapolation are enabled; otherwise, 0.

void setRate ( const Math::Vec3 & linear, const Math::vec3 & angular, int coord_system ) #

Sets linear and angular rates for the entity in the specified coordinate system.

Arguments

  • const Math::Vec3 & linear - Linear velocity vector to be set.
  • const Math::vec3 & angular - Angular rate vector (roll, pitch, yaw), in degrees per second.
  • int coord_system - Coordinate system:
    • 0 - world
    • 1 - local

IComponent * getComponent ( int id ) #

Returns the interface of the specified component.

Arguments

  • int id - ID of the component.

Return value

Component interface.

IArticulatedPart * getArticulatedPart ( int id ) #

Returns the interface of the specified articulated part.

Arguments

  • int id - ID of the articulated part.

Return value

Articulated part interface.

ICollisionSegment * getCollisionSegment ( int id ) #

Returns the interface of the specified collision segment.

Arguments

  • int id - ID of the collision segment.

Return value

Collision segment interface.

ICollisionVolume * getCollisionVolume ( int id ) #

Returns the interface of the specified collision volume.

Arguments

  • int id - ID of the collision volume.

Return value

Collision volume interface.

const Unigine::Vector< Ptr<Node> > & getObjects ( ) #

Returns the vector of all nodes, that constitute the entity.

Return value

Vector of nodes, that constitute the entity.
Last update: 2019-08-16
Build: ()