igor::iMesh Class Reference

#include <iMesh.h>

Public Member Functions

void bind ()
 
bool isValid () const
 
void setBoundingBox (const iAABoxd &bbox)
 
const iAABoxdgetBoundingBox () const
 
uint32 getIndexCount () const
 
void setIndexCount (uint32 count)
 
uint32 getVertexCount () const
 
void setVertexCount (uint32 count)
 
uint32 getTrianglesCount () const
 
void setTrianglesCount (uint32 count)
 
bool hasColors () const
 
bool hasNormals () const
 
void setTexture (int texunit, bool active)
 
bool hasTextures () const
 
uint32 getTextureUnitCount () const
 
bool hasTextureUnit (uint32 unit) const
 
void setTextureCoordinatesCount (uint32 texCoord)
 
uint32 getTextureCoordinatesCount () const
 
void setHasNormals (bool hasNormals)
 
void setHasColors (bool hasColors)
 
void setData (const void *indexData, uint32 indexDataSize, const void *vertexData, uint32 vertexDataSize, const iBufferLayout &layout, bool keepRawData=false)
 
void setKeepRawData (bool keepRawData=true)
 
bool isKeepingRawData () const
 
bool hasRawData () const
 
const iBufferLayoutgetLayout () const
 
void getRawData (void *&indexData, uint32 &indexDataSize, void *&vertexData, uint32 &vertexDataSize)
 
const iVertexArrayPtrgetVertexArray ()
 

Static Public Member Functions

static iMeshPtr create ()
 

Friends

class iMeshDeleter
 

Detailed Description

internal mesh structure

Member Function Documentation

◆ bind()

void igor::iMesh::bind ( )

binds mesh vertex array for rendering

◆ create()

iMeshPtr igor::iMesh::create ( )
static
Returns
a newly created mesh

◆ getBoundingBox()

const iAABoxd & igor::iMesh::getBoundingBox ( ) const
Returns
the bounding box

◆ getIndexCount()

uint32 igor::iMesh::getIndexCount ( ) const
Returns
indexes count

◆ getLayout()

const iBufferLayout & igor::iMesh::getLayout ( ) const
Returns
buffer layout

◆ getRawData()

void igor::iMesh::getRawData ( void *&  indexData,
uint32 indexDataSize,
void *&  vertexData,
uint32 vertexDataSize 
)
Returns
raw data if available Availability can be tested with hasRawData
Parameters
[out]indexDatathe index data pointer
[out]indexDataSizethe index data size
[out]vertexDatathe vertex data pointer
[out]vertexDataSizethe vertex data size

◆ getTextureCoordinatesCount()

uint32 igor::iMesh::getTextureCoordinatesCount ( ) const
Returns
texture coordinates count

◆ getTextureUnitCount()

uint32 igor::iMesh::getTextureUnitCount ( ) const
Returns
texture unit count

◆ getTrianglesCount()

uint32 igor::iMesh::getTrianglesCount ( ) const
Returns
triangles count

◆ getVertexArray()

const iVertexArrayPtr & igor::iMesh::getVertexArray ( )
Returns
vertex array

◆ getVertexCount()

uint32 igor::iMesh::getVertexCount ( ) const
Returns
vertex count

◆ hasColors()

bool igor::iMesh::hasColors ( ) const
Returns
true if mesh has color deifnitions

◆ hasNormals()

bool igor::iMesh::hasNormals ( ) const
Returns
true if mesh has normals

◆ hasRawData()

bool igor::iMesh::hasRawData ( ) const
Returns
true if mesh has raw data available

◆ hasTextures()

bool igor::iMesh::hasTextures ( ) const
Returns
true if mesh has textures and texture coordinates

◆ hasTextureUnit()

bool igor::iMesh::hasTextureUnit ( uint32  unit) const
Returns
true if mesh has specified texture unit

◆ isKeepingRawData()

bool igor::iMesh::isKeepingRawData ( ) const
Returns
true if the raw data will not be deleted after passing it to the GPU

◆ isValid()

bool igor::iMesh::isValid ( ) const
Returns
true if mesh is in a valid state

◆ setBoundingBox()

void igor::iMesh::setBoundingBox ( const iAABoxd bbox)

set bounding box

Parameters
bboxthe bounding box

◆ setData()

void igor::iMesh::setData ( const void *  indexData,
uint32  indexDataSize,
const void *  vertexData,
uint32  vertexDataSize,
const iBufferLayout layout,
bool  keepRawData = false 
)

sets index data

can be called from non main thread

Parameters
indexDatathe index data
indexDataSizethe index data size
vertexDatathe vertex data
vertexDataSizethe vertex data size
keepRawDataif true the raw data will not be deleted after passing it to the GPU

◆ setHasColors()

void igor::iMesh::setHasColors ( bool  hasColors)

sets if mesh has colors

Parameters
hasColorsflag to set if colors are present

◆ setHasNormals()

void igor::iMesh::setHasNormals ( bool  hasNormals)

sets if mesh has normals

Parameters
hasNormalsflag to set if normals are present

◆ setIndexCount()

void igor::iMesh::setIndexCount ( uint32  count)

sets index count

Parameters
countindexes count

◆ setKeepRawData()

void igor::iMesh::setKeepRawData ( bool  keepRawData = true)

sets keep data flag

Parameters
keepRawDataif true the raw data will not be deleted after passing it to the GPU

◆ setTexture()

void igor::iMesh::setTexture ( int  texunit,
bool  active 
)

sets texture unit active or inactive

Parameters
texunitthe texture unit index
activeflag to set the specified texture unit active or inactive

◆ setTextureCoordinatesCount()

void igor::iMesh::setTextureCoordinatesCount ( uint32  texCoord)

set texture coordinates per vertex count

Parameters
texCoordthe texture coordinates count

◆ setTrianglesCount()

void igor::iMesh::setTrianglesCount ( uint32  count)

set triangles count

Parameters
countthe triangles count

◆ setVertexCount()

void igor::iMesh::setVertexCount ( uint32  count)

sets vertex count

Parameters
countvertex count

Friends And Related Function Documentation

◆ iMeshDeleter

friend class iMeshDeleter
friend

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