Jimcpp 2.1.0
Jimcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
jpp::scene::CIndexBuffer Class Reference
Inheritance diagram for jpp::scene::CIndexBuffer:
Inheritance graph
Collaboration diagram for jpp::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 jpp::scene::IIndexBuffer
void * pointer ()
 Same as getData(), just closer to core::array interface.
 
- Public Member Functions inherited from jpp::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 jpp::IReferenceCounted
void setDebugName (const c8 *newName)
 Sets the debug name of the object.
 

Member Function Documentation

◆ allocated_size()

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

◆ getChangedID()

virtual u32 jpp::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 jpp::scene::IIndexBuffer.

◆ getData() [1/2]

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

Const pointer to first element.

Implements jpp::scene::IIndexBuffer.

◆ getData() [2/2]

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

Pointer to first element.

Implements jpp::scene::IIndexBuffer.

◆ getHardwareMappingHint()

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

get the current hardware mapping hint

Implements jpp::scene::IIndexBuffer.

◆ getLast()

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

◆ getType()

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

◆ operator[]()

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

Access element value at given index.

Implements jpp::scene::IIndexBuffer.

◆ push_back()

virtual void jpp::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 jpp::scene::IIndexBuffer.

◆ reallocate()

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

◆ set_used()

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

◆ setDirty()

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

flags the mesh as changed, reloads hardware buffers

Implements jpp::scene::IIndexBuffer.

◆ setHardwareMappingHint()

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

set the hardware mapping hint, for driver

Implements jpp::scene::IIndexBuffer.

◆ setType()

virtual void jpp::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 jpp::scene::IIndexBuffer.

◆ setValue()

virtual void jpp::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 jpp::scene::IIndexBuffer.

◆ size()

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

Number of elements.

Implements jpp::scene::IIndexBuffer.

◆ stride()

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

Number of bytes per element.

Implements jpp::scene::IIndexBuffer.


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

Jimcpp    @cppfx.xyz