Maria GDK 5.0.0.738
Documentation of native code in develop branch
Loading...
Searching...
No Matches
STK::Mesh Class Reference

#include <StkMesh.h>

Public Types

enum  MeshFlags { HiglightFlag = 0 , TransparentFlag = 1 , NumFlags = 2 }
 

Public Member Functions

 Mesh (GLenum primitive_type=GL_TRIANGLES, const std::string &name="")
 
GLenum getPrimitiveType () const
 
void setName (const std::string &name)
 
const std::string & getName () const
 
std::vector< uint32_t > & getIndexArray ()
 
const std::vector< uint32_t > & getIndexArray () const
 
void setIndexArray (const std::vector< uint32_t > &idx)
 
void setIndexArray (const std::vector< uint16_t > &idx)
 
void setColors (const std::shared_ptr< MeshColors > &colors)
 
std::shared_ptr< const MeshColorsgetColors () const
 
std::shared_ptr< MeshColorsgetColors ()
 
const std::vector< STK::Bone > & getBones () const
 
void setBones (const std::vector< STK::Bone > &bones)
 
const STK::Matrix4x4fgetBoneRootTransform () const
 
void setBoneRootTransform (const STK::Matrix4x4f &m)
 
void setMeshGroupId (int id)
 
int getMeshGroupId () const
 
int getNumTriangles () const
 
void redraw (ShaderProgram &shader, const bool wireframe)
 
void setHighlight (const bool highlight)
 
bool getHighlight () const
 
void setTransparent (const bool transparent)
 
bool getTransparent () const
 
bool verifyMesh (VertexBuffer *vertex_buffer)
 
void getBounds (STK::Vector3f &min, STK::Vector3f &max) const
 
void calcBounds (const VertexBuffer &vtx)
 Calculate bounding box.
 
std::shared_ptr< MeshrefCopy ()
 

Detailed Description

Mesh - Indexed geometry mesh

Member Function Documentation

◆ getNumTriangles()

int Mesh::getNumTriangles ( ) const

Return number of triangles in mesh.

Note
only works for triangles, triangle strips and fans.

◆ setMeshGroupId()

void STK::Mesh::setMeshGroupId ( int  id)
inline

Set Mesh Group ID. Set the ID of the material mesh group in the graphics model this mesh belongs to.


The documentation for this class was generated from the following files: