Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
nirt::scene::CIndexBuffer Class Reference
Inheritance diagram for nirt::scene::CIndexBuffer:
Inheritance graph
Collaboration diagram for nirt::scene::CIndexBuffer:
Collaboration graph

Public Member Functions

 CIndexBuffer (video::E_INDEX_TYPE IndexType)
 
 CIndexBuffer (const IIndexBuffer &IndexBufferCopy)
 
virtual void setType (video::E_INDEX_TYPE indexType) override
 Change between 16 and 32 bit indices.
 
virtual void * getData () override
 Pointer to first element.
 
virtual const void * getData () const override
 Const pointer to first element.
 
virtual video::E_INDEX_TYPE getType () const override
 
virtual u32 stride () const override
 Number of bytes per element.
 
virtual u32 size () const override
 Number of elements.
 
virtual void push_back (u32 value) override
 Add value to end. Note that for 16 bit index types values shouldn't be larger than u16.
 
virtual u32 operator[] (u32 index) const override
 Access element value at given index.
 
virtual u32 getLast () override
 
virtual void setValue (u32 index, u32 value) override
 Set value at index. Note that for 16 bit index types values shouldn't be larger than u16.
 
virtual void set_used (u32 usedNow) override
 
virtual void reallocate (u32 new_size, bool canShrink=true) override
 
virtual u32 allocated_size () const override
 
virtual E_HARDWARE_MAPPING getHardwareMappingHint () const override
 get the current hardware mapping hint
 
virtual void setHardwareMappingHint (E_HARDWARE_MAPPING NewMappingHint) override
 set the hardware mapping hint, for driver
 
virtual void setDirty () override
 flags the mesh as changed, reloads hardware buffers
 
virtual u32 getChangedID () const override
 Get the currently used ID for identification of changes.
 
- Public Member Functions inherited from nirt::scene::IIndexBuffer
void * pointer ()
 Same as getData(), just closer to core::array interface.
 
- Public Member Functions inherited from nirt::IReferenceCounted
 IReferenceCounted ()
 Constructor.
 
virtual ~IReferenceCounted ()
 Destructor.
 
void grab () const
 Grabs the object. Increments the reference counter by one.
 
bool drop () const
 Drops the object. Decrements the reference counter by one.
 
s32 getReferenceCount () const
 Get the reference count.
 
const c8getDebugName () const
 Returns the debug name of the object.
 

Public Attributes

IIndexList * Indices
 
E_HARDWARE_MAPPING MappingHint
 
u32 ChangedID
 

Additional Inherited Members

- Protected Member Functions inherited from nirt::IReferenceCounted
void setDebugName (const c8 *newName)
 Sets the debug name of the object.
 

Member Function Documentation

◆ allocated_size()

virtual u32 nirt::scene::CIndexBuffer::allocated_size ( ) const
inlineoverridevirtual

◆ getChangedID()

virtual u32 nirt::scene::CIndexBuffer::getChangedID ( ) const
inlineoverridevirtual

Get the currently used ID for identification of changes.

This shouldn't be used for anything outside the VideoDriver.

Implements nirt::scene::IIndexBuffer.

◆ getData() [1/2]

virtual const void * nirt::scene::CIndexBuffer::getData ( ) const
inlineoverridevirtual

Const pointer to first element.

Implements nirt::scene::IIndexBuffer.

◆ getData() [2/2]

virtual void * nirt::scene::CIndexBuffer::getData ( )
inlineoverridevirtual

Pointer to first element.

Implements nirt::scene::IIndexBuffer.

◆ getHardwareMappingHint()

virtual E_HARDWARE_MAPPING nirt::scene::CIndexBuffer::getHardwareMappingHint ( ) const
inlineoverridevirtual

get the current hardware mapping hint

Implements nirt::scene::IIndexBuffer.

◆ getLast()

virtual u32 nirt::scene::CIndexBuffer::getLast ( )
inlineoverridevirtual

◆ getType()

virtual video::E_INDEX_TYPE nirt::scene::CIndexBuffer::getType ( ) const
inlineoverridevirtual

◆ operator[]()

virtual u32 nirt::scene::CIndexBuffer::operator[] ( u32  index) const
inlineoverridevirtual

Access element value at given index.

Implements nirt::scene::IIndexBuffer.

◆ push_back()

virtual void nirt::scene::CIndexBuffer::push_back ( u32  value)
inlineoverridevirtual

Add value to end. Note that for 16 bit index types values shouldn't be larger than u16.

Implements nirt::scene::IIndexBuffer.

◆ reallocate()

virtual void nirt::scene::CIndexBuffer::reallocate ( u32  new_size,
bool  canShrink = true 
)
inlineoverridevirtual

◆ set_used()

virtual void nirt::scene::CIndexBuffer::set_used ( u32  usedNow)
inlineoverridevirtual

◆ setDirty()

virtual void nirt::scene::CIndexBuffer::setDirty ( )
inlineoverridevirtual

flags the mesh as changed, reloads hardware buffers

Implements nirt::scene::IIndexBuffer.

◆ setHardwareMappingHint()

virtual void nirt::scene::CIndexBuffer::setHardwareMappingHint ( E_HARDWARE_MAPPING  NewMappingHint)
inlineoverridevirtual

set the hardware mapping hint, for driver

Implements nirt::scene::IIndexBuffer.

◆ setType()

virtual void nirt::scene::CIndexBuffer::setType ( video::E_INDEX_TYPE  IndexType)
inlineoverridevirtual

Change between 16 and 32 bit indices.

This copies all indices to a new buffer of corresponding type. Be careful - going from 32 to 16 bit will only work correctly if none of your indices is larger than 16 bit.

Implements nirt::scene::IIndexBuffer.

◆ setValue()

virtual void nirt::scene::CIndexBuffer::setValue ( u32  index,
u32  value 
)
inlineoverridevirtual

Set value at index. Note that for 16 bit index types values shouldn't be larger than u16.

Buffer must be already large enough. This is basically the non const version of operator []

Implements nirt::scene::IIndexBuffer.

◆ size()

virtual u32 nirt::scene::CIndexBuffer::size ( ) const
inlineoverridevirtual

Number of elements.

Implements nirt::scene::IIndexBuffer.

◆ stride()

virtual u32 nirt::scene::CIndexBuffer::stride ( ) const
inlineoverridevirtual

Number of bytes per element.

Implements nirt::scene::IIndexBuffer.


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

Nirtcpp    @cppfx.xyz

Esvcpp    esv::print