Main Page -
Class Hierarchy -
Class List -
File List -
Class Members -
Related Pages -

Information | Reference | SourceForge Project | Author
Muli3D

Reference: Muli3D: CMuli3DIndexBuffer Class Reference

CMuli3DIndexBuffer Class Reference

#include <m3dcore_indexbuffer.h>

Inheritance diagram for CMuli3DIndexBuffer:

IBase List of all members.

Detailed Description

Index buffers contain a list of vertex indices either in 16-bit or 32-bit format.


Public Member Functions

m3dformat fmtGetFormat ()
result GetPointer (uint32 i_iOffset, void **o_ppData)
uint32 iGetLength ()
CMuli3DDevicepGetDevice ()

Protected Member Functions

 CMuli3DIndexBuffer (class CMuli3DDevice *i_pParent)
result Create (uint32 i_iLength, m3dformat i_fmtFormat)
result GetVertexIndex (uint32 i_iArrayIndex, uint32 &o_iValue)
 ~CMuli3DIndexBuffer ()


Constructor & Destructor Documentation

CMuli3DIndexBuffer::~CMuli3DIndexBuffer  )  [protected]
 

Accessible by IBase. The destructor is called when the reference count reaches zero.

CMuli3DIndexBuffer::CMuli3DIndexBuffer class CMuli3DDevice i_pParent  )  [protected]
 

Accessible by CMuli3DDevice which is the only class that may create an index buffer.

Parameters:
[in] i_pParent a pointer to the parent CMuli3DDevice-object.


Member Function Documentation

result CMuli3DIndexBuffer::Create uint32  i_iLength,
m3dformat  i_fmtFormat
[protected]
 

Accessible by CMuli3DDevice which is the only class that may create an index buffer.

Parameters:
[in] i_iLength length of the index buffer to be created in bytes.
[in] i_fmtFormat format of the index buffer to be created. Member of the enumeration m3dformat; either m3dfmt_index16 or m3dfmt_index32.
Returns:
s_ok if the function succeeds.

e_invalidparameters if one or more parameters were invalid.

e_outofmemory if memory allocation failed.

e_invalidformat if an invalid format was encountered.

m3dformat CMuli3DIndexBuffer::fmtGetFormat  ) 
 

Returns the format of the buffer. Member of the enumeration m3dformat; either m3dfmt_index16 or m3dfmt_index32.

result CMuli3DIndexBuffer::GetPointer uint32  i_iOffset,
void **  o_ppData
 

Returns a pointer to the desired position in the buffer.

Parameters:
[in] i_iOffset has to be specified in bytes.
[out] o_ppData receives the pointer to the vertex buffer.
Returns:
s_ok if the function succeeds.

e_invalidparameters if one or more parameters were invalid.

result CMuli3DIndexBuffer::GetVertexIndex uint32  i_iArrayIndex,
uint32 o_iValue
[protected]
 

Accessible by CMuli3DDevice: This function returns the index-value at a given index in the buffer, that means an index of 3 returns the third stored vertex-index in the buffer regardless of its format.

Parameters:
[in] i_iArrayIndex index of the value in the ib-array.
[out] o_iValue receives the value of the index to be looked up.
Returns:
s_ok if the function succeeds.

e_invalidparameters if one or more parameters were invalid.

uint32 CMuli3DIndexBuffer::iGetLength  ) 
 

Returns the length of the buffer in bytes.

CMuli3DDevice * CMuli3DIndexBuffer::pGetDevice  ) 
 

Returns a pointer to the associated device. Calling this function will increase the internal reference count of the device. Failure to call Release() when finished using the pointer will result in a memory leak.

Documentation created with doxygen SourceForge.net Logo