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
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::Cigi::IEntity Class

Header:#include <CigiClientInterface.h>

This class represents the CIGI Entity interface.

Notice
CIGI 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 setTransform(const Ptr<GeodeticPivot> & geo_pivot, int curved_terrain, const Math::Vec3 & position, const Math::vec3 & rotation_euler)

Sets the entity transformation using the specified parameters.

Arguments

  • const Ptr<GeodeticPivot> & geo_pivot - GeodeticPivot object used to curve the terrain.
  • int curved_terrain - 1 if the terrain is curved by a GeodeticPivot; 0 - if the terrain is flat.
  • const Math::Vec3 & position - Entity position coordinates to set.
    Notice
    Geo-coordinates are used if there is no parent entity assigned, otherwise - local coordinates are used.
  • const Math::vec3 & rotation_euler - Entity rotation euler angles to set.

Math::Vec3 getPosition()

Returns the current entity position.

Return value

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

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.

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.

virtual ~IEntity()

Virtual destructor.

int CIGI_ENTITY_NO_CLAMP

Description

Altitude clamping for entity is disabled.

int CIGI_ENTITY_NON_CONFORMAL

Description

Altitude parameter specifies an offset of the entity above the ground level.

int CIGI_ENTITY_CONFORMAL

Description

Altitude parameter specifies an offset of the entity above the sea level.

int ANIM_STATE_STOP

Description

Stop entity animation playback.

int ANIM_STATE_PAUSE

Description

Pause entity animation playback.

int ANIM_STATE_PLAY

Description

Start entity animation playback.

int ANIM_STATE_CONTINUE

Description

Resume entity animation playback.

int ANIM_DIR_FORWARD

Description

Forward direction of the entity animation playback.

int ANIM_DIR_BACKWARD

Description

Backward direction of the entity animation playback.

int ANIM_LOOP_ONESHOT

Description

Oneshot mode of the entity animation playback.

int ANIM_LOOP_CONTINUOUS

Description

Continuous mode of the entity animation playback.
Last update: 10.08.2018
Build: ()