This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Version Control
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
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::MeshStatic Class

Header: #include <UnigineMeshStatic.h>

This class is used to procedurally create static meshes (i.e. triangles, lines or points) and modify them at run time.

MeshStatic Class

Members


static MeshStaticPtr create ( ) #

Constructor. Creates an empty static mesh.

int info ( const char * path ) #

Returns an information about the given mesh.

Arguments

  • const char * path - Path to the mesh.

Return value

int load ( const char * path ) #

Loads the mesh using the specified path.

Arguments

  • const char * path - Path to the mesh.

Return value

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

int save ( const char * path ) const#

Saves the mesh to the specified location.

Arguments

  • const char * path - Path to the mesh.

Return value

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

int setMesh ( const Ptr<Mesh> & mesh ) #

Copies a given source mesh into the current mesh.

Arguments

  • const Ptr<Mesh> & mesh - Source mesh to be copied.

Return value

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

int getMesh ( Ptr<Mesh> & mesh ) const#

Copies the current mesh into the destination mesh.

Arguments

  • Ptr<Mesh> & mesh - Destination mesh.

Return value

true if the mesh is copied successfully; otherwise, false.

void clear ( ) #

Clears the mesh (including its surfaces and bounds).

void bind ( ) #

Binds static mesh data (index and vertex buffers) to the input assembler stage.

void unbind ( ) #

Unbinds static mesh data (index and vertex buffers).

int renderSurface ( int mode, int surface, int target = 0 ) #

Renders the surface.

Arguments

  • int mode - Rendering mode. One of the MODE_* variables.
  • int surface
  • int target - Surface target number. The default value is 0.

Return value

Number of primitives rendered. Primitive type is determined by the rendering mode.

int renderInstancedSurface ( int mode, int num, int surface, int target = 0 ) #

Renders the specified number of instances of the surface.

Arguments

  • int mode - Rendering mode. One of the MODE_* variables.
  • int num - Number of instances to be rendered.
  • int surface
  • int target - Surface target number. The default value is 0.

Return value

Number of primitives rendered. Primitive type is determined by the rendering mode.

int render ( int mode, int surface = -1, int target = 0 ) #

Renders the static mesh with the specified settings and mode.

Arguments

  • int mode - Rendering mode. One of the MODE_* variables.
  • int surface - Surface number (use -1 for all surfaces).
  • int target - Surface target number. The default value is 0.

int renderInstanced ( int mode, int num, int surface = -1, int target = 0 ) #

Renders the specified number of instances of the surface.

Arguments

  • int mode - Rendering mode. One of the MODE_* variables.
  • int num - Number of instances to be rendered.
  • int surface - Surface number (use -1 for all surfaces).
  • int target - Surface target number. The default value is 0.

Return value

Number of primitives rendered. Primitive type is determined by the rendering mode.

size_t getSystemMemoryUsage ( ) const#

Returns the current amount of system memory used by the static mesh, in bytes.

Return value

System memory amount used by the static mesh, in bytes.

size_t getVideoMemoryUsage ( ) const#

Returns the current amount of video memory used by the static mesh.

Return value

Video memory amount used by the static mesh, in bytes.

int getNumSurfaces ( ) const#

Returns the total number of mesh surfaces.

Return value

Number of mesh surfaces.

const char * getSurfaceName ( int surface ) const#

Returns the name of the given surface.

Arguments

  • int surface - Mesh surface number.

Return value

Surface name.

void setSurfaceLightmapUVChannel ( int surface, char uv_channel ) #

Sets a new UV channel to be used for lightmaps of the surface with the specified number.

Arguments

  • int surface - Mesh surface number.
  • char uv_channel - UV channel to be used for lightmaps of the surface with the specified number.

char getSurfaceLightmapUVChannel ( int surface ) const#

Returns the current UV channel used for lightmaps of the surface with the specified number.

Arguments

  • int surface - Mesh surface number.

Return value

UV channel currently used for lightmaps of the surface with the specified number.

void setSurfaceLightmapResolution ( int surface, Mesh::LIGHTMAP_RESOLUTION resolution ) #

Sets a new lightmap resolution for the surface with the specified number.

Arguments

  • int surface - Mesh surface number.
  • Mesh::LIGHTMAP_RESOLUTION resolution - Lightmap resolution to be used for the surface with the specified number.

Mesh::LIGHTMAP_RESOLUTION getSurfaceLightmapResolution ( int surface ) const#

Returns the current lightmap resolution for the surface with the specified number.

Arguments

  • int surface - Mesh surface number.

Return value

Current lightmap resolution for the surface with the specified number.

int findSurface ( const char * name ) const#

Searches for the surface number by its name.

Arguments

  • const char * name - Mesh surface name.

Return value

Mesh surface number, if it is found; otherwise, -1.

int getNumSurfaceTargets ( int surface ) const#

Returns the number of surface targets for the given surface.

Arguments

  • int surface - Mesh surface number.

Return value

Number of surface targets.

const char * getSurfaceTargetName ( int surface, int target ) const#

Returns the name of the given surface target.

Arguments

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

Return value

Surface target name.

int findSurfaceTarget ( const char * name, int surface ) const#

Searches for the target number by the target name.

Arguments

  • const char * name - The name of the target.
  • int surface - Mesh surface number.

Return value

Target number, if exists; otherwise, -1.

void updateSurfaceBounds ( int surface = -1 ) #

Updates mesh bounds. This method is to be called to recalculate bounds after changing a mesh surface (e.g. modifying positions of coordinate vertices).

Arguments

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

void setSurfaceTransform ( const Math::mat4 & transform, int surface, int target = -1 ) #

Sets the transformation matrix for the given surface target.

Arguments

  • const Math::mat4 & transform - Transformation matrix to be set.
  • int surface - Mesh surface number.
  • int target - Surface target number. The default value is -1 (apply to all of the surface targets).

int addMeshSurface ( const char * name, const Ptr<Mesh> & mesh, int surface, int target = -1 ) #

Appends a surface of the source mesh to the current mesh as a new surface.

Arguments

  • const char * name - Name of the new surface added to the current mesh.
  • const Ptr<Mesh> & mesh - Source mesh to copy a surface from.
  • int surface - Number of the source mesh surface to copy.
  • int target - Number of the target of the source mesh surface. The default value is -1 (all of the surface targets).

Return value

Number of the last added surface.

int addMeshSurface ( const char * name, const Ptr<MeshStatic> & mesh, int surface, int target = -1 ) #

Appends a new mesh surface to the current mesh.

Arguments

  • const char * name - Name of the new surface added to the current mesh.
  • const Ptr<MeshStatic> & mesh - Source mesh to copy a surface from.
  • int surface - Number of the source mesh surface to copy.
  • int target - Number of the target of the source mesh surface. The default value is -1 (all of the surface targets).

Return value

Number of the last added surface.

int addMeshSurface ( int dest_surface, const Ptr<MeshStatic> & mesh, int surface, int target = -1 ) #

Appends a new mesh surface to the current mesh.

Arguments

  • int dest_surface - Number of the surface to copy the mesh to.
  • const Ptr<MeshStatic> & mesh - Source mesh to copy a surface from.
  • int surface - Number of the source mesh surface to copy.
  • int target - Number of the target of the source mesh surface. The default value is -1 (all of the surface targets).

Return value

Number of the last added surface.

int getMeshSurface ( Ptr<Mesh> & mesh, int surface, int target = -1 ) const#

Copies the specified mesh surface into the destination mesh.

Arguments

  • Ptr<Mesh> & mesh - Destination mesh pointer to copy a surface into.
  • int surface - Number of the source mesh surface to be copied.
  • int target - Number of the target of the source mesh surface. The default value is -1 (all targets).

Return value

Number of the added mesh surface.

int addEmptySurface ( const char * name, int num_vertex, int num_indices ) #

Appends a new empty surface to the current mesh.
Notice
This function allocates only vertex and index arrays. Texture coordinates, tangent basis, weights and color arrays must be allocated manually.

Arguments

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

Return value

Number of the mesh surfaces.

int addSurfaceTarget ( int surface, const char * name ) #

Appends a target with the given name to the given surface.

Arguments

  • int surface - Mesh surface number.
  • const char * name - Name of the surface target.

Return value

Number of surface targets.

int getCollision ( const Math::vec3 & p0, const Math::vec3 & p1, Vector<int> & surfaces ) #

Performs the search for the collision of the given surfaces with the given traced line.
Notice
Mesh local space coordinates are used for this method.

Arguments

  • const Math::vec3 & p0 - Start point coordinates.
  • const Math::vec3 & p1 - End point coordinates.
  • Vector<int> & surfaces - Mesh surfaces.

Return value

1 if the collision is found; otherwise, 0.

int getCollision ( const Math::vec3 & p0, const Math::vec3 & p1, Vector<int> & triangles, int surface ) #

Arguments

  • const Math::vec3 & p0 - Start point coordinates.
  • const Math::vec3 & p1 - End point coordinates.
  • Vector<int> & triangles
  • int surface - Mesh surface number.

Return value

1 if the collision is found; otherwise, 0.

int getCollision ( const Math::BoundBox & bb, Vector<int> & surfaces ) #

Performs the search for the collision of the given surfaces with the given bounding box.

Arguments

  • const Math::BoundBox & bb - Bounding box.
  • Vector<int> & surfaces - Mesh surfaces.

Return value

1 if the collision is found; otherwise, 0.

int getCollision ( const Math::BoundBox & bb, Vector<int> & triangles, int surface ) #

Arguments

  • const Math::BoundBox & bb - Bounding box.
  • Vector<int> & triangles
  • int surface - Mesh surface number.

Return value

1 if the collision is found; otherwise, 0.

int getCollision ( const Math::BoundFrustum & bf, Vector<int> & surfaces ) #

Performs the search for the collision of the given surfaces with the given bounding frustum.

Arguments

Return value

1 if the collision is found; otherwise, 0.

int getCollision ( const Math::BoundFrustum & bf, Vector<int> & triangles, int surface ) #

Arguments

  • const Math::BoundFrustum & bf - Bounding frustum.
  • Vector<int> & triangles
  • int surface - Mesh surface number.

Return value

1 if the collision is found; otherwise, 0.

Vector<char> & getEdges ( int surface ) #

Returns the edges that are edges of the mesh geometry, i.e. the neighboring triangles that form these edges are lying in different planes.

Arguments

  • int surface - Mesh surface number.

Return value

Edges that are edges of the mesh geometry.

int getIntersection ( const Math::vec3 & p0, const Math::vec3 & p1, Math::vec3 * ret_point, Math::vec3 * ret_normal, Math::vec4 * ret_texcoord, int * ret_index, int surface, int target = 0 ) #

Performs the search for the intersection of the given surface target with the given traced line.
Notice
Mesh local space coordinates are used for this method.

Arguments

  • const Math::vec3 & p0 - Start point coordinates.
  • const Math::vec3 & p1 - End point coordinates.
  • Math::vec3 * ret_point - Return array to write the intersection point coordinates into.
  • Math::vec3 * ret_normal - Return array to write the intersection point normal into.
  • Math::vec4 * ret_texcoord - Return array to write the texture coordinates into.
  • int * ret_index - Return array to write the intersection point indices into.
  • int surface - Mesh surface number.
  • int target - Surface target number. The default value is 0.

Return value

1 if the intersection is found; otherwise, 0.

int getIntersection ( const Math::dvec3 & p0, const Math::dvec3 & p1, Math::dvec3 * ret_point_, Math::vec3 * ret_normal, Math::vec4 * ret_texcoord, int * ret_index, int surface, int target = 0 ) #

Performs the search for the intersection of the given surface target with the given traced line.
Notice
Mesh local space coordinates are used for this method.

Arguments

  • const Math::dvec3 & p0 - Start point coordinates.
  • const Math::dvec3 & p1 - End point coordinates.
  • Math::dvec3 * ret_point_ - Return array to write the intersection point coordinates into.
  • Math::vec3 * ret_normal - Return array to write the intersection point normal into.
  • Math::vec4 * ret_texcoord - Return array to write the texture coordinates into.
  • int * ret_index - Return array to write the intersection point indices into.
  • int surface - Mesh surface number.
  • int target - Surface target number. The default value is 0.

Return value

1 if the intersection is found; otherwise, 0.

void setBoundBox ( const Math::BoundBox & bb ) #

Sets the bounding box for the mesh.

Arguments

  • const Math::BoundBox & bb - Bounding box to be set.

void setBoundBox ( const Math::BoundBox & bb, int surface ) #

Sets the bounding box for the given mesh surface.

Arguments

  • const Math::BoundBox & bb - Bounding box to be set.
  • int surface - Mesh surface number.

Math::BoundBox getBoundBox ( ) const#

Returns the bounding box of the mesh.

Return value

Bounding box.

Math::BoundBox getBoundBox ( int surface ) const#

Returns the bounding box of the given mesh surface.

Arguments

  • int surface - Mesh surface number.

Return value

Bounding box.

void setBoundSphere ( const Math::BoundSphere & bs ) #

Sets the bounding sphere for the mesh.

Arguments

  • const Math::BoundSphere & bs - Bounding sphere to be set.

void setBoundSphere ( const Math::BoundSphere & bs, int surface ) #

Sets the bounding sphere for the given mesh surface.

Arguments

  • const Math::BoundSphere & bs - Bounding sphere to be set.
  • int surface - Mesh surface number.

Math::BoundSphere getBoundSphere ( ) const#

Returns the bounding sphere of the mesh.

Return value

Bounding sphere.

Math::BoundSphere getBoundSphere ( int surface ) const#

Returns the bounding sphere of the given mesh surface.

Arguments

  • int surface - Mesh surface number.

Return value

Bounding sphere.

Vector< Math::hvec4> & getTangents ( int surface, int target = 0 ) #

Returns tangents for the given surface target.

Arguments

  • int surface - Mesh surface number.
  • int target - Surface target number. The default value is 0.

Return value

Tangents of the surface target.

Vector< Math::vec2> & getTexCoords0 ( int surface ) #

Returns the first UV map texture coordinates of the given surface.

Arguments

  • int surface - Mesh surface number.

Return value

First UV map texture coordinates.

Vector< Math::vec2> & getTexCoords1 ( int surface ) #

Returns the second UV map texture coordinates of the given surface.

Arguments

  • int surface - Mesh surface number.

Return value

Second UV map texture coordinates.

Vector< Math::bvec4> & getColors ( int surface ) #

Returns the vertex colors of the given surface.

Arguments

  • int surface - Mesh surface number.

Return value

Vertex colors.

Vector<int> & getCIndices ( int surface ) #

Returns the coordinate indices of all vertices of the given surface.

Arguments

  • int surface - Mesh surface number.

Return value

Coordinate indices.

Vector<int> & getTIndices ( int surface ) #

Returns the triangle indices of the given surface.

Arguments

  • int surface - Mesh surface number.

Return value

Triangle indices.

void setDebugName ( const char * name ) #

Sets a friendly name for GPU debugging (RenderDoc, NVIDIA Nsight). It can be used to help you determine if the corresponding object interface pointer caused the leak. Memory leaks are reported by the debug software layer by outputting a list of object interface pointers along with their friendly names.

Arguments

  • const char * name - Friendly debug name to be set.

const char * getDebugName ( ) const#

Returns the currently used friendly name for GPU debugging (RenderDoc, NVIDIA Nsight). It can be used to help you determine if the corresponding object interface pointer caused the leak. Memory leaks are reported by the debug software layer by outputting a list of object interface pointers along with their friendly names.

Return value

Friendly debug name.

void updateDebugName ( ) #

Updates the friendly name for GPU debugging (RenderDoc, NVIDIA Nsight).

void createNodes ( ) #

Forced creation of the Mesh Static internal tree for quick calculation of collisions and intersections.

bool isLoadedRAM ( ) const#

Returns a value indicating if the mesh is loaded to memory (RAM) (i.e. the mesh contains geometry).

Return value

true if the mesh is loaded to RAM; otherwise, false.

bool isLoadedVRAM ( ) const#

Returns a value indicating if the mesh is loaded to video memory (VRAM).

Return value

true if the mesh is loaded to VRAM; otherwise, false.

void loadVRAM ( ) #

Loads the mesh to video memory (VRAM). The method can be used to implement custom streaming logic for static meshes.
Notice
It is recommended NOT to call the method for static meshes obtained from a mesh-based objects (such as ObjectMeshStatic, ObjectMeshClutter, DecalMesh and so on).

void clearVRAM ( ) #

Unloads the mesh from video memory (VRAM). The method can be used to implement custom streaming logic for static meshes.
Notice
It is recommended NOT to call the method for static meshes obtained from a mesh-based objects (such as ObjectMeshStatic, ObjectMeshClutter, DecalMesh and so on).

void reloadVRAM ( ) #

Reloads the mesh in video memory (VRAM) (deletes the mesh from VRAM and loads a new one). This method must be called after the mesh has been modified to load the changes to VRAM for further rendering.
Notice
It is recommended NOT to call the method for static meshes obtained from a mesh-based objects (such as ObjectMeshStatic, ObjectMeshClutter, DecalMesh and so on).

bool getRandomPoint ( Math::vec3 & ret_point, Math::vec3 & ret_normal, Math::vec3 & ret_velocity, int surface ) #

Returns a random point from the given mesh surface.

Arguments

  • Math::vec3 & ret_point - Random point coordinates.
  • Math::vec3 & ret_normal - Random point normal vector.
  • Math::vec3 & ret_velocity - Random point velocity vector.
  • int surface - Mesh surface number.

Return value

Returns true if the random point is valid.

void setVertex ( int num, const Math::vec3 & vertex, int surface, int target = 0 ) #

Sets the coordinates of the given coordinate vertex of the given surface target.

Arguments

  • int num - Coordinate vertex number in the range from 0 to the total number of coordinate vertices for the given surface.
    Notice
    To get the total number of coordinate vertices for the given surface, use the getNumCVertex() method.
  • const Math::vec3 & vertex - Vertex coordinates to be set.
  • int surface - Mesh surface number.
  • int target - Surface target number. The default value is 0.

Math::vec3 getVertex ( int num, int surface, int target = 0 ) const#

Returns coordinates of the given coordinate vertex of the given surface and surface target.

Arguments

  • int num - Coordinate vertex number in the range from 0 to the total number of coordinate vertices for the given surface.
    Notice
    To get the total number of coordinate vertices for the given surface, use the getNumCVertex() method.
  • int surface - Mesh surface number.
  • int target - Surface target number. The default value is 0.

Return value

Vertex coordinates.

Vector< Math::vec3 > getVertices ( int surface, int target = 0 ) #

Returns coordinates of all coordinate vertices of the given surface and surface target.

Arguments

  • int surface - Mesh surface number.
  • int target - Surface target number. The default value is 0.

Return value

Vertex coordinates.

int getNumVertices ( int surface ) const#

Returns the number of coordinate vertices for the given mesh surface.

Arguments

  • int surface - Mesh surface number.

Return value

Number of the surface vertices.

void setTangent ( int num, const Math::quat & tangent, int surface, int target = 0 ) #

Sets the new tangent for the given triangle vertex of the given surface target.

Arguments

  • int num - Triangle vertex number in the range from 0 to the total number of vertex tangent entries of the given surface.
    Notice
    To get the total number of vertex tangent entries for the surface, call the getNumTangents() method.
  • const Math::quat & tangent - Tangent to be set.
  • int surface - Mesh surface number.
  • int target - Surface target number. The default value is 0.

Math::quat getTangent ( int num, int surface, int target = 0 ) const#

Returns the tangent for the given triangle vertex of the given surface target.

Arguments

  • int num - Triangle vertex number in the range from 0 to the total number of vertex tangent entries of the given surface.
    Notice
    To get the total number of vertex tangent entries for the surface, call the getNumTangents() method.
  • int surface - Mesh surface number.
  • int target - Surface target number. The default value is 0.

Return value

Vertex tangent.

Math::vec3 getNormal ( int num, int surface, int target = 0 ) const#

Returns the normal for the given triangle vertex of the given surface target.

Arguments

  • int num - Triangle vertex number in the range from 0 to the total number of vertex tangent entries of the given surface target.
    Notice
    Vertex normals are calculated using vertex tangents. To get the total number of vertex tangent entries for the surface target, call the getNumTangents() method.
  • int surface - Mesh surface number.
  • int target - Surface target number. The default value is 0.

Return value

Vertex normal.

int getNumTangents ( int surface ) const#

Returns the number of vertex tangent entries of the given mesh surface.
Notice
Tangents are specified for triangle vertices.

Arguments

  • int surface - Mesh surface number.

Return value

Number of surface tangent vectors.

void setTexCoord0 ( int num, const Math::vec2 & texcoord, int surface ) #

Sets first UV map texture coordinates for the given triangle vertex of the given surface.

Arguments

  • int num - Triangle vertex number in the range from 0 to the total number of first UV map texture coordinate entries of the given surface.
    Notice
    To get the total number of first UV map texture coordinate entries for the surface, call the getNumTexCoords0() method.
  • const Math::vec2 & texcoord - First UV map texture coordinates to be set.
  • int surface - Mesh surface number.

Math::vec2 getTexCoord0 ( int num, int surface ) const#

Returns first UV map texture coordinates for the given triangle vertex of the given surface.

Arguments

  • int num - Triangle vertex number in the range from 0 to the total number of first UV map texture coordinate entries of the given surface.
    Notice
    To get the total number of first UV map texture coordinate entries for the surface, call the getNumTexCoords0() method.
  • int surface - Mesh surface number.

Return value

First UV map texture coordinates.

int getNumTexCoords0 ( int surface ) const#

Returns the number of the first UV map texture coordinates for the given mesh surface.
Notice
First UV map texture coordinates are specified for triangle vertices.

Arguments

  • int surface - Mesh surface number.

Return value

Number of the first UV map texture coordinates.

void setTexCoord1 ( int num, const Math::vec2 & texcoord, int surface ) #

Sets second UV map texture coordinates for the given triangle vertex of the given surface.

Arguments

  • int num - Triangle vertex number in the range from 0 to the total number of second UV map texture coordinate entries of the given surface.
    Notice
    To get the total number of second UV map texture coordinate entries for the surface, call the getNumTexCoords1() method.
  • const Math::vec2 & texcoord - Second UV map texture coordinates to be set.
  • int surface - Mesh surface number.

Math::vec2 getTexCoord1 ( int num, int surface ) const#

Returns second UV map texture coordinates for the given triangle vertex of the given surface.

Arguments

  • int num - Triangle vertex number in the range from 0 to the total number of second UV map texture coordinate entries of the given surface.
    Notice
    To get the total number of second UV map texture coordinate entries for the surface, call the getNumTexCoords1() method.
  • int surface - Mesh surface number.

Return value

Second UV map texture coordinates.

int getNumTexCoords1 ( int surface ) const#

Returns the number of the second UV map texture coordinates for the given mesh surface.
Notice
Second UV map texture coordinates are specified for triangle vertices.

Arguments

  • int surface - Mesh surface number.

Return value

Number of the second UV map texture coordinates.

void setColor ( int num, const Math::vec4 & color, int surface ) #

Sets the color for the given triangle vertex of the given surface.

Arguments

  • int num - Triangle vertex number in the range from 0 to the total number of vertex color entries of the given surface.
    Notice
    To get the total number of vertex color entries for the surface, call the getNumColors() method.
  • const Math::vec4 & color - Vertex color to be set.
  • int surface - Mesh surface number.

Math::vec4 getColor ( int num, int surface ) const#

Returns the color of the given triangle vertex of the given surface.

Arguments

  • int num - Triangle vertex number in the range from 0 to the total number of vertex color entries of the given surface.
    Notice
    To get the total number of vertex color entries for the surface, call the getNumColors() method.
  • int surface - Mesh surface number.

Return value

Vertex color.

int getNumColors ( int surface ) const#

Returns the total number of vertex color entries for the given surface.
Notice
Colors are specified for triangle vertices.

Arguments

  • int surface - Surface number.

Return value

Number of vertex color entries.

void setCIndex ( int num, int index, int surface ) #

Sets the new coordinate index for the given vertex of the given surface.

Arguments

  • int num - Vertex number in the range from 0 to the total number of coordinate indices for the given surface.
    Notice
    To get the total number of coordinate indices for the given surface, use the getNumCIndices() method.
  • int index - Coordinate index to be set in the range from 0 to the total number of coordinate vertices for the given surface.
    Notice
    To get the total number of coordinate vertices for the given surface, use the getNumVertices() method.
  • int surface - Mesh surface number.

int getCIndex ( int num, int surface ) const#

Returns the coordinate index for the given vertex of the given surface.

Arguments

  • int num - Vertex number in the range from 0 to the total number of coordinate indices for the given surface.
    Notice
    To get the total number of coordinate indices for the given surface, use the getNumCIndices() method.
  • int surface - Mesh surface number.

Return value

Coordinate index.

int getNumCIndices ( int surface ) const#

Returns the number of coordinate indices for the given mesh surface.

Arguments

  • int surface - Mesh surface number.

Return value

Number of coordinate indices.

void setTIndex ( int num, int index, int surface ) #

Sets the new triangle index for the given vertex of the given surface.

Arguments

int getTIndex ( int num, int surface ) const#

Returns the triangle index for the given surface by using the index number.

Arguments

Return value

Triangle index.

int getNumTIndices ( int surface ) const#

Returns the number of triangle indices for the given mesh surface.

Arguments

  • int surface - Mesh surface number.

Return value

Number of triangle indices.
Last update: 2023-06-23
Build: ()