This page has been translated automatically.
Getting Started
Migrating to UNIGINE 2.0
C++ API Migration
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::ObjectMeshSkinned Class

Interface for object mesh skinned handling. See also the UnigineScript analog.

To use this class, include the UnigineObjectMeshSkinned.h file.

Unigine::ObjectMeshSkinned Class

Members


static int type ()

ObjectMeshSkinned type.

Return value

ObjectMeshSkinned type identifier.

static Ptr< ObjectMeshSkinned > create (const NodePtr & node)

ObjectMeshSkinned constructor.

Arguments

  • const NodePtr & node - Node smart pointer.

static Ptr< ObjectMeshSkinned > create (const ObjectPtr & object)

ObjectMeshSkinned constructor.

Arguments

  • const ObjectPtr & object - Object smart pointer.

static Ptr< ObjectMeshSkinned > create (const MeshPtr & mesh)

ObjectMeshSkinned constructor.

Arguments

  • const MeshPtr & mesh - Mesh smart pointer.

static Ptr< ObjectMeshSkinned > create (const char * name, int dynamic)

ObjectMeshSkinned constructor.

Arguments

  • const char * name - Path to the skinned mesh file.
  • int dynamic - Dynamic mesh flag.

virtual int createMesh (const char * name, int dynamic) const =0

Creates a mesh.

Arguments

  • const char * name - Path to the mesh file.
  • int dynamic - Create dynamic mesh.

Return value

Returns 1 if the mesh is loaded successfully; otherwise, 0.

virtual int loadMesh (const char * name) const =0

Loads a mesh file.

Arguments

  • const char * name - Mesh file name.

Return value

Returns 1 if the mesh is loaded successfully; otherwise, 0.

virtual int saveMesh (const char * name) const =0

Saves the dynamic mesh into a file.

Arguments

  • const char * name - Mesh file name.

Return value

Returns 1 if the mesh is saved successfully; otherwise, 0.

virtual int setMesh (const MeshPtr & mesh) const =0

Copies the source mesh into the current mesh.

Arguments

  • const MeshPtr & mesh - The source mesh to be copied.

Return value

1 if the mesh is copied successfully; otherwise, 0.

virtual int getMesh (const MeshPtr & mesh) const =0

Copies the current mesh into the source mesh.

Arguments

  • const MeshPtr & mesh - Source mesh.

Return value

1 if the mesh is copied successfully; otherwise, 0.

virtual void flushMesh () const =0

Flushes the mesh geometry into the video memory.

virtual void setMeshName (const char * name) const =0

Sets the mesh name.

Arguments

  • const char * name - The name of the mesh.

virtual const char * getMeshName () const =0

Returns the mesh name.

Return value

Name of the mesh.

virtual void setAnimName (const char * name) const =0

Sets the animation name.

Arguments

  • const char * name - The name of the animation.

virtual const char * getAnimName () const =0

Returns the name of the current animation.

Return value

The name of the animation.

virtual void setQuaternion (int quaternion) const =0

Sets the quaternion skinning mode.

Arguments

  • int quaternion - Quaternion flag.

virtual int isQuaternion () const =0

Returns the value indicating if the quaternion skinning mode is used.

Return value

1 if the quaternion skinning mode is used; otherwise, 0.

virtual void setControlled (int c) const =0

Sets a value indicating if the animation should be controlled by a parent ObjectMeshSkinned (useful for attaching clothes to a character body).

Arguments

  • int c - Control flag

virtual int isControlled () const =0

Returns a value indicating if the animation is controlled by a parent ObjectMeshSkinned.

Return value

1 if the animation is controlled by a parent ObjectMeshSkinned; otherwise, 0.

virtual void updateSurfaceBounds (int surface) const =0

Updates mesh bounds.

Arguments

  • int surface - Surface number (use -1 for all surfaces).

virtual void setSurfaceTransform (const mat4 & transform, int surface, int target) const =0

Transforms the mesh surface.

Arguments

  • const mat4 & transform - Transformation matrix.
  • int surface - Surface number.
  • int target - Target number.

virtual int addMeshSurface (const char * name, const MeshPtr & mesh, int surface, int target) const =0

Appends a new mesh surface to the current mesh.

Arguments

  • const char * name - Name of the new surface of the current mesh.
  • const MeshPtr & mesh - Mesh pointer to copy a surface from.
  • int surface - Mesh surface number to copy.
  • int target - Mesh target number to copy.

Return value

Number of the added mesh surface.

virtual int addMeshSurface (const char * name, const Ptr< ObjectMeshSkinned > & mesh, int surface, int target) const =0

Appends a new mesh surface to the current mesh.

Arguments

  • const char * name - Name of the new surface of the current mesh.
  • const Ptr< ObjectMeshSkinned > & mesh - Mesh pointer to copy a surface from.
  • int surface - Mesh surface number to copy.
  • int target - Mesh target number to copy.

Return value

Number of the added mesh surface.

virtual int addMeshSurface (int dest_surface, const Ptr< ObjectMeshSkinned > & mesh, int surface, int target) const =0

Appends a new mesh surface to the current mesh.

Arguments

  • int dest_surface - Destination surface number.
  • const Ptr< ObjectMeshSkinned > & mesh - Mesh pointer to copy a surface from.
  • int surface - Mesh surface number to copy.
  • int target - Mesh target number to copy.

Return value

Number of the added mesh surface.

virtual int getMeshSurface (const MeshPtr & mesh, int surface, int target) const =0

Gets the mesh surface from the current mesh

Arguments

  • const MeshPtr & mesh - Mesh pointer to copy a surface into.
  • int surface - Mesh surface number to copy.
  • int target - Mesh target number to copy.

Return value

Number of the added mesh surface.

virtual int addEmptySurface (const char * name, int num_vertex, int num_indices) const =0

Appends a new surface into the mesh.

Arguments

  • const char * name - New surface name.
  • int num_vertex - Number of surface vertices.
  • int num_indices - Number of surface indices.

Return value

Appended surface number.

virtual int addSurfaceTarget (int surface, const char * name) const =0

Appends a surface target into the mesh.

Arguments

  • int surface - Surface number.
  • const char * name - New target name.

Return value

Appended target number.

virtual int getNumVertex (int surface) const =0

Returns the number of vertices in a given mesh surface.

Arguments

  • int surface - Surface number.

Return value

Number of the surface vertices.

virtual void setVertex (int num, const vec3 & vertex, int surface, int target) const =0

Updates coordinate of a given vertex.

Arguments

  • int num - Vertex number.
  • const vec3 & vertex - Vertex position coordinate.
  • int surface - Surface number.
  • int target - Target number.

virtual vec3 getVertex (int num, int surface, int target) const =0

Returns coordinate of a given vertex.

Arguments

  • int num - Vertex number.
  • int surface - Surface number.
  • int target - Target number.

Return value

Vertex coordinate.

virtual vec3 getSkinnedVertex (int num, int surface) const =0

Returns skinned coordinate of a given vertex.

Arguments

  • int num - Vertex number.
  • int surface - Surface number.

Return value

Vertex coordinate.

virtual int getNumTangents (int surface) const =0

Returns the number of tangents in a given mesh surface.

Arguments

  • int surface - Surface number.

Return value

Number of the surface vertices.

virtual void setTangent (int num, const quat & tangent, int surface, int target) const =0

Updates tangent of a given vertex.

Arguments

  • int num - Vertex number.
  • const quat & tangent - Vertex tangent.
  • int surface - Surface number.
  • int target - Target number.

virtual quat getTangent (int num, int surface, int target) const =0

Returns tangent of a given vertex.

Arguments

  • int num - Vertex number.
  • int surface - Surface number.
  • int target - Target number.

Return value

Tangent vector.

virtual vec3 getNormal (int num, int surface, int target) const =0

Returns normal of a given vertex.

Arguments

  • int num - Vertex number.
  • int surface - Surface number.
  • int target - Target number.

Return value

Normal vector.

virtual quat getSkinnedTangent (int num, int index, int surface) const =0

Returns skinned tangent of a given vertex.

Arguments

  • int num - Vertex number.
  • int index - Coordinate index.
  • int surface - Surface number.

Return value

Skinned tangent.

virtual vec3 getSkinnedNormal (int num, int index, int surface) const =0

Returns the skinned normal for the given vertex.

Arguments

  • int num - Vertex number.
  • int index - Coordinate index.
  • int surface - Surface number.

Return value

Skinned normal.

virtual void setNumTexCoords0 (int num, int surface) const =0

Sets the number of first texture coordinates.

Arguments

  • int num - Number of first texture coordinates.
  • int surface - Surface number.

virtual int getNumTexCoords0 (int surface) const =0

Returns the number of first texture coordinates.

Arguments

  • int surface - Surface number.

Return value

Number of first texture coordinates.

virtual void setTexCoord0 (int num, const vec2 & texcoord, int surface) const =0

Updates first texture coordinate.

Arguments

  • int num - Vertex number.
  • const vec2 & texcoord - Second texture coordinate.
  • int surface - Surface number.

virtual vec2 getTexCoord0 (int num, int surface) const =0

Returns first texture coordinate.

Arguments

  • int num - Vertex number.
  • int surface - Surface number.

Return value

Vertex first texture coordinate.

virtual void setNumTexCoords1 (int num, int surface) const =0

Sets the number of second texture coordinates.

Arguments

  • int num - Number of second texture coordinates.
  • int surface - Surface number.

virtual int getNumTexCoords1 (int surface) const =0

Returns the number of second texture coordinates.

Arguments

  • int surface - Surface number.

Return value

Number of second texture coordinates.

virtual void setTexCoord1 (int num, const vec2 & texcoord, int surface) const =0

Updates second texture coordinate.

Arguments

  • int num - Vertex number.
  • const vec2 & texcoord - Second texture coordinate.
  • int surface - Surface number.

virtual vec2 getTexCoord1 (int num, int surface) const =0

Returns second texture coordinate.

Arguments

  • int num - Vertex number.
  • int surface - Surface number.

Return value

Vertex second texture coordinate.

virtual int getNumColors (int surface) const =0

Returns the number of vertex colors.

Arguments

  • int surface - Surface number.

Return value

Number of vertex colors.

virtual void setColor (int num, const vec4 & color, int surface) const =0

Updates vertex color.

Arguments

  • int num - Vertex number.
  • const vec4 & color - Vertex color.
  • int surface - Surface number.

virtual vec4 getColor (int num, int surface) const =0

Returns vertex color.

Arguments

  • int num - Vertex number.
  • int surface - Surface number.

Return value

Vertex color.

virtual int getNumCIndices (int surface) const =0

Returns the number of coordinate indices.

Arguments

  • int surface - Surface number.

Return value

Number of coordinate indices.

virtual void setCIndex (int num, int index, int surface) const =0

Updates an coordinate index.

Arguments

  • int num - Index number in the index buffer.
  • int index - Coordinate index.
  • int surface - Surface number.

virtual int getCIndex (int num, int surface) const =0

Returns an coordinate index.

Arguments

  • int num - Index number in the index buffer.
  • int surface - Surface number.

Return value

Coordinate index.

virtual int getNumTIndices (int surface) const =0

Returns the number of triangle indices.

Arguments

  • int surface - Surface number.

Return value

Number of triangle indices.

virtual void setTIndex (int num, int index, int surface) const =0

Updates a triangle index.

Arguments

  • int num - Index number in the index buffer.
  • int index - Triangle index.
  • int surface - Surface number.

virtual int getTIndex (int num, int surface) const =0

Returns a triangle index.

Arguments

  • int num - Index number in the index buffer.
  • int surface - Surface number.

Return value

Triangle index.

virtual int addTarget (int surface) const =0

Adds an animation target.

Arguments

  • int surface - Surface number.

Return value

Number of the added target.

virtual void removeTarget (int Target, int surface) const =0

Removes an animation target.

Arguments

  • int Target - Target number in range from 0 to the total number of animation targets.
  • int surface - Surface number.

virtual void setNumTargets (int num, int surface) const =0

Sets the number of animation targets.

Arguments

  • int num - Number of animation targets.
  • int surface - Surface number.

virtual int getNumTargets (int surface) const =0

Returns the number of animation targets.

Arguments

  • int surface - Surface number.

Return value

Number of animation targets.

virtual void setTarget (int target, int enable, int index, float weight, int surface) const =0

Sets all parameters to a given animation target.

Arguments

  • int target - Target number.
  • int enable - Target enabled.
  • int index - Target index.
  • float weight - Target weight.
  • int surface - Surface number.

virtual void setTargetEnabled (int target, int enable, int surface) const =0

Enables or disables a given animation target.

Arguments

  • int target - Target number.
  • int enable - 1 to enable the animation target, 0 to disable it.
  • int surface - Surface number.

virtual int isTargetEnabled (int target, int surface) const =0

Returns a value indicating if a given animation target is enabled.

Arguments

  • int target - Target number.
  • int surface - Surface number.

Return value

Returns 1 if the given surface is disabled; otherwise, 0.

virtual void setTargetIndex (int target, int index, int surface) const =0

Sets an index for the animation target.

Arguments

  • int target - Target number.
  • int index - Target index.
  • int surface - Surface number.

virtual int getTargetIndex (int target, int surface) const =0

Returns the weight of the animation target.

Arguments

  • int target - Target number.
  • int surface - Surface number.

Return value

Index of the animation target.

virtual void setTargetWeight (int target, float weight, int surface) const =0

Sets a weight for the animation target.

Arguments

  • int target - Target number.
  • float weight - Target weight.
  • int surface - Surface number.

virtual float getTargetWeight (int target, int surface) const =0

Returns the weight of the animation target.

Arguments

  • int target - Target number.
  • int surface - Surface number.

Return value

Weight of the animation target.

virtual int addLayer () const =0

Adds an animation layer.

Return value

Number of the added layer.

virtual void removeLayer (int layer) const =0

Removes an animation layer.

Arguments

  • int layer - Layer number in range from 0 to the total number of animation layers.

virtual void setNumLayers (int num) const =0

Sets the number of animation layers for blending. For example, when two layers are blended, bone transformations in between the layers are interpolated, and vertex positions can be calculated using the interpolated results. For more details, see the article on Skinned Mesh.

Arguments

  • int num - Number of animation layers (must be greater than 0).

virtual int getNumLayers () const =0

Returns the number of animation layers set for blending. For more details, see the article on Skinned Mesh.

Return value

Number of animation layers.

virtual void setLayer (int layer, int enable, float weight) const =0

Sets all parameters to a given animation layer.

Arguments

  • int layer - Layer number.
  • int enable - Layer enabled.
  • float weight - Layer weight.

virtual void setLayerEnabled (int layer, int enable) const =0

Enables or disables a given animation layer.

Arguments

  • int layer - Layer number.
  • int enable - 1 to enable the animation layer, 0 to disable it.

virtual int isLayerEnabled (int layer) const =0

Returns a value indicating if a given animation layer is enabled.

Arguments

  • int layer - Layer number.

Return value

Returns 1 if the given surface is disabled; otherwise, 0.

virtual void setLayerWeight (int layer, float weight) const =0

Sets a weight for the animation layer.

Arguments

  • int layer - Layer number.
  • float weight - Layer weight.

virtual float getLayerWeight (int layer) const =0

Returns the weight of the animation layer.

Arguments

  • int layer - Layer number.

Return value

Weight of the animation layer.

virtual void clearLayer (int layer) const =0

Clears a given animation layer.

Arguments

  • int layer - Layer number.

virtual void importLayer (int layer) const =0

Imports a given animation layer.

Arguments

  • int layer - Layer number.

virtual void copyLayer (int layer, int layer_0) const =0

Copies transformations of bones from the source layer to the destination one.
  • If the destination layer has more bones than the source one, those bones will have old transformations.
  • If the source layer has more bones than destination one, those bones will be added to the destination layer.

Arguments

  • int layer - Number of the destination layer in range from 0 to the total number of animation layers.
  • int layer_0 - Number of the source layer in range from 0 to the total number of animation layers.

virtual void inverseLayer (int layer, int layer_0) const =0

Copies inverse transformations of bones from the source layer to the destination one. Note that the destination layer is not cleared before writing to it.

Arguments

  • int layer - Number of the destination layer in range from 0 to the total number of animation layers.
  • int layer_0 - Number of the source layer in range from 0 to the total number of animation layers.

virtual void lerpLayer (int layer, int layer_0, int layer_1, float weight) const =0

Copies interpolated bone transformations from two source layers to the destination layer. If there is no bone in a source layer, the bone transformation from another one will be copied to the destination layer without interpolation.

Arguments

  • int layer - Number of the destination layer in range from 0 to the total number of animation layers.
  • int layer_0 - Number of the first source layer in range from 0 to the total number of animation layers.
  • int layer_1 - Number of the second source layer in range from 0 to the total number of animation layers.
  • float weight - Interpolation weight.

virtual void mulLayer (int layer, int layer_0, int layer_1, float weight) const =0

Copies multiplied bone transformations from two source layers to the destination layer.

Arguments

  • int layer - Number of the destination layer in range from 0 to the total number of animation layers.
  • int layer_0 - Number of the first source layer in range from 0 to the total number of animation layers.
  • int layer_1 - Number of the second source layer in range from 0 to the total number of animation layers.
  • float weight - Interpolation weight.

virtual int getNumBones () const =0

Returns the number of bones taking part in animation.

Return value

Number of bones.

virtual const char * getBoneName (int bone) const =0

Returns name of a given bone.

Arguments

  • int bone - Bone number.

Return value

Bone name.

virtual int findBone (const char * name) const =0

Searches for a bone with a given name.

Arguments

  • const char * name - Bone name.

Return value

Returns bone number if found; otherwise, -1.

virtual int getBoneParent (int bone) const =0

Returns the number of the parent bone.
Warning
The function is deprecated. It is provided to keep your code working until the next release. Please, replace it with getNumBoneChildren().

Arguments

  • int bone - Bone number.

Return value

Parent bone number.

virtual int getNumBoneChildren (int bone) const =0

Returns the number of child bones.

Arguments

  • int bone - Bone number.

Return value

Number of child bones.

virtual int getBoneChild (int bone, int child) const =0

Returns the number of a child of a given bone.

Arguments

  • int bone - Bone number.
  • int child - Child number.

Return value

Number of the child in the collection of all bones.

virtual mat4 getBoneBindTransform (int bone) const =0

Returns bind pose bone transformation matrix.

Arguments

  • int bone - Bone number.

Return value

Bind pose transformation matrix.

virtual mat4 getIBoneBindTransform (int bone) const =0

Returns inverse bind pose bone transformation matrix.

Arguments

  • int bone - Bone number.

Return value

Inverse bind pose transformation matrix.

virtual void setBoneTransform (int bone, const mat4 & transform) const =0

Sets a transformation matrix for a given bone.

Arguments

  • int bone - Bone number.
  • const mat4 & transform - Transformation matrix.

virtual void setBoneChildsTransform (int bone, const mat4 & transform) const =0

Sets a transformation matrix for a given bone. All child bones will recalculate their matrices.
Warning
The function is deprecated. It is provided to keep your code working until the next release. Please, replace it with setBoneChildrenTransform().

Arguments

  • int bone - Bone number.
  • const mat4 & transform - Transformation matrix.

virtual void setBoneChildrenTransform (int bone, const mat4 & transform) const =0

Sets a transformation matrix for a given bone. All child bones will recalculate their matrices.

Arguments

  • int bone - Bone number.
  • const mat4 & transform - Transformation matrix.

virtual void setBoneTransforms (const int * bones, const mat4 * transforms, int num_bones) const =0

Sets a transformation matrix for a given bones.

Arguments

  • const int * bones - Bone numbers.
  • const mat4 * transforms - Transformation matrices.
  • int num_bones - Number of bones.

virtual mat4 getBoneTransform (int bone) const =0

Returns a transformation matrix for a given bone relatively to the parent object.

Arguments

  • int bone - Bone number.

Return value

Transformation matrix.

virtual mat4 getIBoneTransform (int bone) const =0

Returns an inverse transformation matrix for a given bone relatively to the parent object.

Arguments

  • int bone - Bone number.

Return value

Inverse transformation matrix.

virtual void setWorldBoneTransform (int bone, const UNIGINE_MAT4 & transform) const =0

Applies transformation to a given bone in the world space coordinates.

Arguments

  • int bone - Bone number.
  • const UNIGINE_MAT4 & transform - Transformation matrix in the world space.

virtual void setWorldBoneChildsTransform (int bone, const UNIGINE_MAT4 & transform) const =0

Applies transformation to a given bone in the world space coordinates. All child bones will recalculate their matrices.
Warning
The function is deprecated. It is provided to keep your code working until the next release. Please, replace it with setWorldBoneChildrenTransform().

Arguments

  • int bone - Bone number.
  • const UNIGINE_MAT4 & transform - Transformation matrix in the world space.

virtual void setWorldBoneChildrenTransform (int bone, const UNIGINE_MAT4 & transform) const =0

Applies transformation to a given bone in the world space coordinates. All child bones will recalculate their matrices.

Arguments

  • int bone - Bone number.
  • const UNIGINE_MAT4 & transform - Transformation matrix in the world space.

virtual UNIGINE_MAT4 getWorldBoneTransform (int bone) const =0

Returns the current transformation matrix applied to the bone in the world space coordinate.

Arguments

  • int bone - Bone number.

Return value

World transformation matrix in the world space.

virtual void setLayerBoneTransformEnabled (int layer, int bone, int enable) const =0

Sets a layer transformation enabled flag for a given bone.

Arguments

  • int layer - Layer number.
  • int bone - Bone number.
  • int enable - Enabled flag.

virtual void setLayerBoneTransform (int layer, int bone, const mat4 & transform) const =0

Sets a transformation matrix for a given bone. The difference from the setBoneTransform() function is that this method takes into account only the transformation in the animation layer (no blending is done). Take notice that a bone can be scaled only uniformly.

Arguments

  • int layer - Layer number.
  • int bone - Bone number.
  • const mat4 & transform - Transformation matrix.

virtual mat4 getLayerBoneTransform (int layer, int bone) const =0

Returns a transformation matrix of a given bone relatively to the parent object. The difference from getBoneTransform() is that this method takes into account only the transformation in the animation layer (no blending is done).

Arguments

  • int layer - Layer number.
  • int bone - Bone number.

Return value

Transformation matrix.

virtual int isLayerBoneTransform (int layer, int bone) const =0

Returns a value indicating if the bone transformation is applied only to the animation layer (no blending is done).

Arguments

  • int layer - Layer number.
  • int bone - Bone number.

Return value

Bone transformation flag: 1 if the bone transformation is applied only to the animation layer; otherwise, 0.

virtual int addAnimation (const char * name, const char * animation) const =0

Loads the additional animation from an external file.

Arguments

  • const char * name - Path to the animation file.
  • const char * animation - Animation name.

Return value

Animation identifier.

virtual int addAnimation (const MeshPtr & mesh, const char * animation) const =0

Loads the additional animation from the Mesh.

Arguments

  • const MeshPtr & mesh - Mesh smart pointer.
  • const char * animation - Animation name.

Return value

Animation identifier.

virtual void removeAnimation (int animation) const =0

Removes animation.

Arguments

  • int animation - Animation identifier.

virtual int getNumAnimations () const =0

Returns the number of loaded animations.

Return value

Number of loaded animations.

virtual int getAnimationID (int num) const =0

Returns the identifier of the animation at the specified position.

Arguments

  • int num - Animation number.

Return value

Animation identifier.

virtual const char * getAnimationName (int animation) const =0

Returns the animation name.

Arguments

  • int animation - Animation identifier.

Return value

Animation name.

virtual int getNumAnimationBones (int animation) const =0

Returns the number of animation bones.

Arguments

  • int animation - Number of the animation.

Return value

Number of animation bones.

virtual int getNumAnimationFrames (int animation) const =0

Returns the number of animation frames.

Arguments

  • int animation - Number of the animation.

Return value

Number of animation frames.

virtual int findAnimation (const char * name) const =0

Searches for an animation with a given name.

Arguments

  • const char * name - Animation name.

Return value

Returns animation identifier if found; otherwise, -1.

virtual int setAnimation (int layer, const char * name) const =0

Sets the animation name on the given animation layer.

Arguments

  • int layer - Layer number.
  • const char * name - Animation name.

virtual int setAnimation (int layer, int animation) const =0

Sets the animation identifier on the given animation layer.

Arguments

  • int layer - Layer number.
  • int animation - Animation identifier.

virtual int getAnimation (int layer) const =0

Returns the animation identifier from the given animation layer.

Arguments

  • int layer - Layer number.

Return value

Animation identifier.

virtual int getNumFrames () const =0

Returns the number of animation frames in the layer.

Return value

Number of animation frames.

virtual float setFrame (int layer, float time, int from, int to) const =0

Sets a frame of the animation layer.

Arguments

  • int layer - Layer number.
  • float time - Frame number in the
  • int from - Start frame. -1 means the first frame of animation.
  • int to - End frame. -1 means the last frame of animation.

virtual float getFrame (int layer) const =0

Returns the frame number (time value passed to the last setFrame() call).

Arguments

  • int layer - Layer number.

Return value

Frame number.

virtual int getFrameFrom (int layer) const =0

Returns the start frame passed to the last setFrame() call.

Arguments

  • int layer - Layer number.

Return value

Start frame.

virtual int getFrameTo (int layer) const =0

Returns the end frame passed to the last setFrame() call.

Arguments

  • int layer - Layer number.

Return value

End frame.

virtual int getNumSurfaceTargets (int surface) const =0

Returns the number of surface targets.

Arguments

  • int surface - Surface number.

Return value

Number of surface targets.

virtual const char * getSurfaceTargetName (int surface, int target) const =0

Returns the name of a given surface target.

Arguments

  • int surface - Surface number.
  • int target - Target number.

Return value

Target name.

virtual int findSurfaceTarget (const char * name, int surface) const =0

Searches for an surface target with a given name.

Arguments

  • const char * name - Target name.
  • int surface - Surface number.

Return value

Target number if it is exists; otherwise, -1.
Last update: 2017-07-03
Build: ()