C++ Java Unity
C++ Reference
Mesh Class Referenceabstract

Detailed Description

A triangular mesh with support for optional vertex positions, UVs, and normals.

Public Member Functions

virtual int getNumVertices () const =0
 Get the number of vertices. More...
 
virtual bool hasPositions () const =0
 Returns true if the mesh contains positions. More...
 
virtual const Vec3FgetPositions () const =0
 Provides access to the array of positions. More...
 
virtual const float * getPositionCoordinates () const =0
 Provides access to the array of positions. More...
 
virtual bool hasNormals () const =0
 Returns true if the mesh contains surface normals. More...
 
virtual const Vec3FgetNormals () const =0
 Provides access to the array of surface normals. More...
 
virtual const float * getNormalCoordinates () const =0
 Provides access to the array of surface normals. More...
 
virtual bool hasUVs () const =0
 Returns true if the mesh contains texture coordinates. More...
 
virtual const Vec2FgetUVs () const =0
 Provides access to the array of texture coordinates. More...
 
virtual const float * getUVCoordinates () const =0
 Provides access to the array of texture coordinates. More...
 
virtual int getNumTriangles () const =0
 Returns the number of triangles. More...
 
virtual const unsigned short * getTriangles () const =0
 Provides access to the array triangle indices. More...
 

Member Function Documentation

virtual int getNumVertices ( ) const
pure virtual

Get the number of vertices.

virtual bool hasPositions ( ) const
pure virtual

Returns true if the mesh contains positions.

virtual const Vec3F* getPositions ( ) const
pure virtual

Provides access to the array of positions.

virtual const float* getPositionCoordinates ( ) const
pure virtual

Provides access to the array of positions.

virtual bool hasNormals ( ) const
pure virtual

Returns true if the mesh contains surface normals.

virtual const Vec3F* getNormals ( ) const
pure virtual

Provides access to the array of surface normals.

virtual const float* getNormalCoordinates ( ) const
pure virtual

Provides access to the array of surface normals.

virtual bool hasUVs ( ) const
pure virtual

Returns true if the mesh contains texture coordinates.

virtual const Vec2F* getUVs ( ) const
pure virtual

Provides access to the array of texture coordinates.

virtual const float* getUVCoordinates ( ) const
pure virtual

Provides access to the array of texture coordinates.

virtual int getNumTriangles ( ) const
pure virtual

Returns the number of triangles.

virtual const unsigned short* getTriangles ( ) const
pure virtual

Provides access to the array triangle indices.