Castor3D  ..
Public Member Functions | Protected Attributes | List of all members
Castor3D::BufferElementGroup Class Reference

Holds data of a vertex buffer elements group. More...

Public Member Functions

C3D_API BufferElementGroup (uint8_t *p_buffer=nullptr, uint32_t p_index=0)
 Constructor. More...
 
virtual C3D_API ~BufferElementGroup ()
 Destructor. More...
 
C3D_API void LinkCoords (uint8_t *p_buffer)
 Links the element values to the ones in parameter. More...
 
C3D_API void LinkCoords (uint8_t *p_buffer, uint32_t p_stride)
 Links the element values to the ones in parameter. More...
 
uint8_t * ptr ()
 Retrieves a pointer on the data buffer. More...
 
uint8_t const * const_ptr () const
 Retrieves a constant pointer on the data buffer. More...
 
uint32_t GetIndex () const
 Retrieves the group index. More...
 
void SetIndex (uint32_t p_index)
 Sets the group index. More...
 

Protected Attributes

uint8_t * m_pBuffer
 The elements values. More...
 
uint32_t m_index
 The group index. More...
 

Detailed Description

Holds data of a vertex buffer elements group.

Author
Sylvain DOREMUS
Version
0.6.1.0
Date
03/01/2011

Constructor & Destructor Documentation

◆ BufferElementGroup()

C3D_API Castor3D::BufferElementGroup::BufferElementGroup ( uint8_t *  p_buffer = nullptr,
uint32_t  p_index = 0 
)

Constructor.

Parameters
[in]p_bufferThe data buffer
[in]p_indexThe group index

◆ ~BufferElementGroup()

virtual C3D_API Castor3D::BufferElementGroup::~BufferElementGroup ( )
virtual

Destructor.

Member Function Documentation

◆ const_ptr()

uint8_t const* Castor3D::BufferElementGroup::const_ptr ( ) const
inline

Retrieves a constant pointer on the data buffer.

Returns
The pointer

References m_pBuffer.

Referenced by Castor3D::Vertex::GetBitangent(), Castor3D::Vertex::GetNormal(), Castor3D::Vertex::GetPosition(), Castor3D::Vertex::GetTangent(), and Castor3D::Vertex::GetTexCoord().

+ Here is the caller graph for this function:

◆ GetIndex()

uint32_t Castor3D::BufferElementGroup::GetIndex ( ) const
inline

Retrieves the group index.

Returns
The value

References m_index.

◆ LinkCoords() [1/2]

C3D_API void Castor3D::BufferElementGroup::LinkCoords ( uint8_t *  p_buffer)

Links the element values to the ones in parameter.

◆ LinkCoords() [2/2]

C3D_API void Castor3D::BufferElementGroup::LinkCoords ( uint8_t *  p_buffer,
uint32_t  p_stride 
)

Links the element values to the ones in parameter.

Remarks
Replace buffer values by element values
Parameters
[in]p_bufferThe values buffer
[in]p_strideThe element binay size

◆ ptr()

uint8_t* Castor3D::BufferElementGroup::ptr ( )
inline

◆ SetIndex()

void Castor3D::BufferElementGroup::SetIndex ( uint32_t  p_index)
inline

Sets the group index.

Parameters
[in]p_indexThe new value

References m_index.

Member Data Documentation

◆ m_index

uint32_t Castor3D::BufferElementGroup::m_index
protected

The group index.

Referenced by GetIndex(), and SetIndex().

◆ m_pBuffer

uint8_t* Castor3D::BufferElementGroup::m_pBuffer
protected

The elements values.

Referenced by const_ptr(), and ptr().


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