This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Animations-Related Classes
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
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

Unigine.MeshStatic Class

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

MeshStatic Class

Properties

bool IsLoadedVRAM#

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

bool IsLoadedRAM#

The value indicating if the mesh is loaded to memory (RAM).

Members


MeshStatic ( ) #

Constructor. Creates an empty static mesh.

int Info ( string path ) #

Returns an information about the given mesh.

Arguments

  • string path - Path to the mesh.

Return value

int Load ( string path ) #

Loads the mesh using the specified path.

Arguments

  • string path - Path to the mesh.

Return value

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

int Save ( string path ) #

Saves the mesh to the specified location.

Arguments

  • string path - Path to the mesh.

Return value

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

int SetMesh ( Mesh mesh ) #

Copies a given source mesh into the current mesh.

Arguments

  • Mesh mesh - Source mesh to be copied.

Return value

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

int GetMesh ( Mesh mesh ) #

Copies the current mesh into the destination mesh.

Arguments

  • 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.

uint GetSystemMemoryUsage ( ) #

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.

uint GetVideoMemoryUsage ( ) #

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 ( ) #

Returns the total number of mesh surfaces.

Return value

Number of mesh surfaces.

string GetSurfaceName ( int surface ) #

Returns the name of the given surface.

Arguments

  • int surface - Mesh surface number.

Return value

Surface name.

void SetSurfaceLightmapUVChannel ( int surface, byte 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.
  • byte uv_channel - UV channel to be used for lightmaps of the surface with the specified number.

byte GetSurfaceLightmapUVChannel ( int surface ) #

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 ) #

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 ( string name ) #

Searches for the surface number by its name.

Arguments

  • string name - Mesh surface name.

Return value

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

int GetNumSurfaceTargets ( int surface ) #

Returns the number of surface targets for the given surface.

Arguments

  • int surface - Mesh surface number.

Return value

Number of surface targets.

string GetSurfaceTargetName ( int surface, int target ) #

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 ( string name, int surface ) #

Searches for the target number by the target name.

Arguments

  • string 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 ( mat4 transform, int surface, int target = -1 ) #

Sets the transformation matrix for the given surface target.

Arguments

  • 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 ( string name, Mesh mesh, int surface, int target = -1 ) #

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

Arguments

  • string name - Name of the new surface added to the current mesh.
  • 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 ( string name, MeshStatic mesh, int surface, int target = -1 ) #

Appends a new mesh surface to the current mesh.

Arguments

  • string name - Name of the new surface added to the current mesh.
  • 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, 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.
  • 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 ( Mesh mesh, int surface, int target = -1 ) #

Copies the specified mesh surface into the destination mesh.

Arguments

  • Mesh mesh - Destination mesh to copy the 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 ( string 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

  • string 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, string name ) #

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

Arguments

  • int surface - Mesh surface number.
  • string name - Name of the surface target.

Return value

Number of surface targets.

int GetCollision ( vec3 p0, vec3 p1, int[] OUT_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

  • vec3 p0 - Start point coordinates.
  • vec3 p1 - End point coordinates.
  • int[] OUT_surfaces - Mesh surfaces.
    Notice
    This output buffer is to be filled by the Engine as a result of executing the method.

Return value

1 if the collision is found; otherwise, 0.

int GetCollision ( vec3 p0, vec3 p1, int[] OUT_triangles, int surface ) #

Arguments

  • vec3 p0 - Start point coordinates.
  • vec3 p1 - End point coordinates.
  • int[] OUT_triangles
  • int surface - Mesh surface number.

Return value

1 if the collision is found; otherwise, 0.

int GetCollision ( BoundBox bb, int[] OUT_surfaces ) #

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

Arguments

  • BoundBox bb - Bounding box.
  • int[] OUT_surfaces - Mesh surfaces.
    Notice
    This output buffer is to be filled by the Engine as a result of executing the method.

Return value

1 if the collision is found; otherwise, 0.

int GetCollision ( BoundBox bb, int[] OUT_triangles, int surface ) #

Arguments

  • BoundBox bb - Bounding box.
  • int[] OUT_triangles
  • int surface - Mesh surface number.

Return value

1 if the collision is found; otherwise, 0.

int GetCollision ( BoundFrustum bf, int[] OUT_surfaces ) #

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

Arguments

  • BoundFrustum bf - Bounding frustum.
  • int[] OUT_surfaces - Mesh surfaces.
    Notice
    This output buffer is to be filled by the Engine as a result of executing the method.

Return value

1 if the collision is found; otherwise, 0.

int GetCollision ( BoundFrustum bf, int[] OUT_triangles, int surface ) #

Arguments

  • BoundFrustum bf - Bounding frustum.
  • int[] OUT_triangles
  • int surface - Mesh surface number.

Return value

1 if the collision is found; otherwise, 0.

byte[] 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 ( vec3 p0, vec3 p1, vec3[] OUT_ret_point, vec3[] OUT_ret_normal, vec4[] OUT_ret_texcoord, int[] OUT_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

  • vec3 p0 - Start point coordinates.
  • vec3 p1 - End point coordinates.
  • vec3[] OUT_ret_point - Return array to write the intersection point coordinates into.
    Notice
    This output buffer is to be filled by the Engine as a result of executing the method.
  • vec3[] OUT_ret_normal - Return array to write the intersection point normal into.
    Notice
    This output buffer is to be filled by the Engine as a result of executing the method.
  • vec4[] OUT_ret_texcoord - Return array to write the texture coordinates into.
    Notice
    This output buffer is to be filled by the Engine as a result of executing the method.
  • int[] OUT_ret_index - Return array to write the intersection point indices into.
    Notice
    This output buffer is to be filled by the Engine as a result of executing the method.
  • 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 ( dvec3 p0, dvec3 p1, dvec3[] OUT_ret_point_, vec3[] OUT_ret_normal, vec4[] OUT_ret_texcoord, int[] OUT_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

  • dvec3 p0 - Start point coordinates.
  • dvec3 p1 - End point coordinates.
  • dvec3[] OUT_ret_point_ - Return array to write the intersection point coordinates into.
    Notice
    This output buffer is to be filled by the Engine as a result of executing the method.
  • vec3[] OUT_ret_normal - Return array to write the intersection point normal into.
    Notice
    This output buffer is to be filled by the Engine as a result of executing the method.
  • vec4[] OUT_ret_texcoord - Return array to write the texture coordinates into.
    Notice
    This output buffer is to be filled by the Engine as a result of executing the method.
  • int[] OUT_ret_index - Return array to write the intersection point indices into.
    Notice
    This output buffer is to be filled by the Engine as a result of executing the method.
  • 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 ( BoundBox bb ) #

Sets the bounding box for the mesh.

Arguments

void SetBoundBox ( BoundBox bb, int surface ) #

Sets the bounding box for the given mesh surface.

Arguments

  • BoundBox bb - Bounding box to be set.
  • int surface - Mesh surface number.

BoundBox GetBoundBox ( ) #

Returns the bounding box of the mesh.

Return value

Bounding box.

BoundBox GetBoundBox ( int surface ) #

Returns the bounding box of the given mesh surface.

Arguments

  • int surface - Mesh surface number.

Return value

Bounding box.

void SetBoundSphere ( BoundSphere bs ) #

Sets the bounding sphere for the mesh.

Arguments

void SetBoundSphere ( BoundSphere bs, int surface ) #

Sets the bounding sphere for the given mesh surface.

Arguments

  • BoundSphere bs - Bounding sphere to be set.
  • int surface - Mesh surface number.

BoundSphere GetBoundSphere ( ) #

Returns the bounding sphere of the mesh.

Return value

Bounding sphere.

BoundSphere GetBoundSphere ( int surface ) #

Returns the bounding sphere of the given mesh surface.

Arguments

  • int surface - Mesh surface number.

Return value

Bounding sphere.

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.

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.

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.

bvec4[] GetColors ( int surface ) #

Returns the vertex colors of the given surface.

Arguments

  • int surface - Mesh surface number.

Return value

Vertex colors.

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.

int[] GetTIndices ( int surface ) #

Returns the triangle indices of the given surface.

Arguments

  • int surface - Mesh surface number.

Return value

Triangle indices.

void SetDebugName ( string 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

  • string name - Friendly debug name to be set.

string GetDebugName ( ) #

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.

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 ( out vec3 ret_point, out vec3 ret_normal, out vec3 ret_velocity, int surface ) #

Returns a random point from the given mesh surface.

Arguments

  • out vec3 ret_point - Random point coordinates.
  • out vec3 ret_normal - Random point normal vector.
  • out 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, 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.
  • vec3 vertex - Vertex coordinates to be set.
  • int surface - Mesh surface number.
  • int target - Surface target number. The default value is 0.

vec3 GetVertex ( int num, int surface, int target = 0 ) #

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.

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 ) #

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, 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.
  • quat tangent - Tangent to be set.
  • int surface - Mesh surface number.
  • int target - Surface target number. The default value is 0.

quat GetTangent ( int num, int surface, int target = 0 ) #

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.

vec3 GetNormal ( int num, int surface, int target = 0 ) #

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 ) #

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, 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.
  • vec2 texcoord - First UV map texture coordinates to be set.
  • int surface - Mesh surface number.

vec2 GetTexCoord0 ( int num, int surface ) #

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 ) #

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, 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.
  • vec2 texcoord - Second UV map texture coordinates to be set.
  • int surface - Mesh surface number.

vec2 GetTexCoord1 ( int num, int surface ) #

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 ) #

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, 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.
  • vec4 color - Vertex color to be set.
  • int surface - Mesh surface number.

vec4 GetColor ( int num, int surface ) #

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 ) #

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 ) #

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 ) #

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 ) #

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

Arguments

Return value

Triangle index.

int GetNumTIndices ( int surface ) #

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: 19.04.2024
Build: ()