OMPF::ompfMeshChunk Class Reference

#include <ompfMeshChunk.h>

Inherits OMPF::ompfBaseChunk.

Public Member Functions

 ompfMeshChunk ()
 
virtual ~ompfMeshChunk ()
 
virtual uint32 getSize (const ompfSettings &settings)
 
void setAmbient (const iaColor3c &ambient)
 
const iaColor3cgetAmbient () const
 
void setDiffuse (const iaColor3c &diffuse)
 
const iaColor3cgetDiffuse () const
 
void setSpecular (const iaColor3c &specular)
 
const iaColor3cgetSpecular () const
 
void setEmissive (const iaColor3c &emissiv)
 
const iaColor3cgetEmissive () const
 
void setShininess (const float32 shininess)
 
float32 getShininess () const
 
void setAlpha (const float32 alpha)
 
float32 getAlpha () const
 
void setNormalsPerVertex (uint8 count)
 
uint8 getNormalsPerVertex () const
 
void setColorsPerVertex (uint8 count)
 
uint8 getColorsPerVertex () const
 
void setTexCoordPerVertex (uint8 count)
 
uint8 getTexCoordPerVertex () const
 
void setVertexCount (uint32 count)
 
uint32 getVertexCount () const
 
void setIndexCount (uint32 count)
 
uint32 getIndexCount () const
 
void setVertexData (const char *data, uint32 size)
 
const void * getVertexData () const
 
void setIndexData (const char *data, uint32 size)
 
const void * getIndexData () const
 
uint32 getVertexDataSize () const
 
uint32 getIndexDataSize () const
 
uint32 getVertexSize () const
 
void setMeshType (OMPFMeshType type)
 
OMPFMeshType getMeshType () const
 
void setTexture (const iaString &texture, uint32 texunit)
 
iaString getTexture (uint32 texunit) const
 
uint32 getTextureCount () const
 
void setMaterialChunkID (uint32 id)
 
uint32 getMaterialChunkID () const
 
- Public Member Functions inherited from OMPF::ompfBaseChunk
 ompfBaseChunk (OMPFChunkType typeID)
 
virtual ~ompfBaseChunk ()=default
 
virtual bool write (std::ofstream &stream, const ompfSettings &settings)
 
virtual bool read (std::ifstream &stream, ompfSettings &settings)
 
void insertChunk (ompfBaseChunk *chunk)
 
void removeChunk (ompfBaseChunk *chunk)
 
bool hasParent () const
 
uint32 getParentID () const
 
void setParentID (const uint32 parentID)
 
bool hasChildren () const
 
const std::vector< ompfBaseChunk * > & getChildren () const
 
void setID (const uint32 chunkID)
 
uint32 getID () const
 
virtual uint32 getSize (const ompfSettings &settings)
 
OMPFChunkType getType () const
 
void setName (const iaString &name)
 
iaString getName () const
 

Detailed Description

ompf mesh chunk

Constructor & Destructor Documentation

◆ ompfMeshChunk()

OMPF::ompfMeshChunk::ompfMeshChunk ( )

init base class

◆ ~ompfMeshChunk()

OMPF::ompfMeshChunk::~ompfMeshChunk ( )
virtual

release some memory

Member Function Documentation

◆ getAlpha()

float32 OMPF::ompfMeshChunk::getAlpha ( ) const
Returns
the alpha value

◆ getAmbient()

const iaColor3c & OMPF::ompfMeshChunk::getAmbient ( ) const
Returns
ambient color

◆ getColorsPerVertex()

uint8 OMPF::ompfMeshChunk::getColorsPerVertex ( ) const
Returns
amount of colors per vertex

◆ getDiffuse()

const iaColor3c & OMPF::ompfMeshChunk::getDiffuse ( ) const
Returns
diffuse color

◆ getEmissive()

const iaColor3c & OMPF::ompfMeshChunk::getEmissive ( ) const
Returns
emissive color

◆ getIndexCount()

uint32 OMPF::ompfMeshChunk::getIndexCount ( ) const
Returns
the indexes count

◆ getIndexData()

const void * OMPF::ompfMeshChunk::getIndexData ( ) const
Returns
pointer to index data

◆ getIndexDataSize()

uint32 OMPF::ompfMeshChunk::getIndexDataSize ( ) const
Returns
index data size

◆ getMaterialChunkID()

uint32 OMPF::ompfMeshChunk::getMaterialChunkID ( ) const
Returns
material chunk id

◆ getMeshType()

OMPFMeshType OMPF::ompfMeshChunk::getMeshType ( ) const
Returns
the mesh type

◆ getNormalsPerVertex()

uint8 OMPF::ompfMeshChunk::getNormalsPerVertex ( ) const
Returns
amount of normals per vertex

◆ getShininess()

float32 OMPF::ompfMeshChunk::getShininess ( ) const
Returns
the shininess factor

◆ getSize()

uint32 OMPF::ompfMeshChunk::getSize ( const ompfSettings settings)
virtual
Returns
size of chunk in bytes
Parameters
settingsthe settings the size calculation is based on

Reimplemented from OMPF::ompfBaseChunk.

◆ getSpecular()

const iaColor3c & OMPF::ompfMeshChunk::getSpecular ( ) const
Returns
specular color

◆ getTexCoordPerVertex()

uint8 OMPF::ompfMeshChunk::getTexCoordPerVertex ( ) const
Returns
the amount of texture coordinates per vertex

◆ getTexture()

iaString OMPF::ompfMeshChunk::getTexture ( uint32  texunit) const
Returns
texture for specified texture unit
Parameters
texunitthe texture unit

◆ getTextureCount()

uint32 OMPF::ompfMeshChunk::getTextureCount ( ) const
Returns
amount of textures in use

◆ getVertexCount()

uint32 OMPF::ompfMeshChunk::getVertexCount ( ) const
Returns
the vertex count

◆ getVertexData()

const void * OMPF::ompfMeshChunk::getVertexData ( ) const
Returns
pointer to vertex data

◆ getVertexDataSize()

uint32 OMPF::ompfMeshChunk::getVertexDataSize ( ) const
Returns
vertex data size

◆ getVertexSize()

uint32 OMPF::ompfMeshChunk::getVertexSize ( ) const

calculates the vertex size

Returns
the vertex size

◆ setAlpha()

void OMPF::ompfMeshChunk::setAlpha ( const float32  alpha)

sets the alpha value

Parameters
shininessthe shininess factor

◆ setAmbient()

void OMPF::ompfMeshChunk::setAmbient ( const iaColor3c ambient)

sets ambient color of target material of mesh

Parameters
ambientthe ambient color

◆ setColorsPerVertex()

void OMPF::ompfMeshChunk::setColorsPerVertex ( uint8  count)

sets amount of colors per vertex

Parameters
countthe amount of colors per vertex

◆ setDiffuse()

void OMPF::ompfMeshChunk::setDiffuse ( const iaColor3c diffuse)

sets diffuse color of target material of mesh

Parameters
diffusethe diffuse color

◆ setEmissive()

void OMPF::ompfMeshChunk::setEmissive ( const iaColor3c emissiv)

sets emissiv color of target material of mesh

Parameters
emissivthe emissiv color

◆ setIndexCount()

void OMPF::ompfMeshChunk::setIndexCount ( uint32  count)

sets the amount of indexes

Parameters
countthe amount of indexes

◆ setIndexData()

void OMPF::ompfMeshChunk::setIndexData ( const char *  data,
uint32  size 
)

sets index data

Parameters
datapointer to index data
sizethe size of index data in bytes

◆ setMaterialChunkID()

void OMPF::ompfMeshChunk::setMaterialChunkID ( uint32  id)

sets material chund id

Parameters
idthe material chunk id

◆ setMeshType()

void OMPF::ompfMeshChunk::setMeshType ( OMPFMeshType  type)

sets the mesh type

Parameters
typethe mesh type

◆ setNormalsPerVertex()

void OMPF::ompfMeshChunk::setNormalsPerVertex ( uint8  count)

sets amount of normals per vertex

Parameters
countthe amount of normals per vertex

◆ setShininess()

void OMPF::ompfMeshChunk::setShininess ( const float32  shininess)

sets shininess of target material of mesh

Parameters
shininessthe shininess factor

◆ setSpecular()

void OMPF::ompfMeshChunk::setSpecular ( const iaColor3c specular)

sets specular color of target material of mesh

Parameters
specularthe specular color

◆ setTexCoordPerVertex()

void OMPF::ompfMeshChunk::setTexCoordPerVertex ( uint8  count)

sets the amount of texture coordinates per vertex

Parameters
countthe amount of texture coordinates per vertex

◆ setTexture()

void OMPF::ompfMeshChunk::setTexture ( const iaString texture,
uint32  texunit 
)

sets a texture for specified texture unit

Parameters
texturethe texture
texunitthe texture unit specified

◆ setVertexCount()

void OMPF::ompfMeshChunk::setVertexCount ( uint32  count)

sets vertex count

Parameters
countthe amount of vertexes

◆ setVertexData()

void OMPF::ompfMeshChunk::setVertexData ( const char *  data,
uint32  size 
)

sets vertex data

Parameters
datapointer to raw vertex data
sizethe size in bytes

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