The IVertexBuffer property interface. More...

#include "murl_graph_i_vertex_buffer.h"

Inheritance diagram for Murl::Graph::IVertexBuffer:

Public Member Functions

virtual Bool SetVertexBufferAccessMode (IEnums::BufferAccessMode mode)=0
 Set the buffer access mode. More...
 
virtual IEnums::BufferAccessMode GetVertexBufferAccessMode () const =0
 Get the buffer access mode. More...
 
virtual Bool SetMaxNumberOfVertices (UInt32 maxNumberOfVertices, Bool preserveContents)=0
 Set the maximum number of vertices the vertex buffer can hold. More...
 
virtual UInt32 GetMaxNumberOfVertices () const =0
 Get the maximum number of vertices the vertex buffer can hold. More...
 
virtual Bool SetVertexByteSize (UInt32 byteSize)=0
 Explicitly set the total byte size of single vertex element. More...
 
virtual UInt32 GetVertexByteSize () const =0
 Get the total byte size of single vertex element in the buffer. More...
 
virtual void * GetVertexData ()=0
 Retrieve a mutable pointer to the vertex data stored in the buffer. More...
 
virtual const void * GetVertexData () const =0
 Retrieve a constant pointer to the vertex data stored in the buffer. More...
 
virtual Bool SetNumberOfVertices (UInt32 numberOfVertices)=0
 Set the actual number of vertices currently used. More...
 
virtual Bool SetVerticesModified ()=0
 Mark the whole vertex buffer as modified. More...
 
virtual Bool SetVerticesModified (UInt32 firstVertex, UInt32 numberOfVertices)=0
 Mark a portion of the vertex buffer as modified. More...
 
- Public Member Functions inherited from Murl::Graph::IAttributeContainer
virtual SInt32 AddAttribute (IEnums::AttributeItem item, IEnums::AttributeType type, UInt32 &byteOffset)=0
 Add a predefined vertex attribute. More...
 
virtual SInt32 AddAttribute (const String &name, IEnums::AttributeType type, UInt32 &byteOffset)=0
 Add a user-defined vertex attribute. More...
 
virtual SInt32 GetAttributeIndex (IEnums::AttributeItem item) const =0
 Query the location of a predefined attribute in the container. More...
 
virtual SInt32 GetAttributeIndex (const String &name) const =0
 Query the location of a user-defined attribute in the container. More...
 
virtual UInt32 GetNumberOfAttributes () const =0
 Get the total number of individual attributes in the container. More...
 
virtual IEnums::AttributeType GetAttributeType (UInt32 index) const =0
 Query the type of an attribute at a given index. More...
 
virtual IEnums::AttributeItem GetAttributeItem (UInt32 index) const =0
 Query the predefined item of an attribute at a given index. More...
 
virtual const StringGetAttributeName (UInt32 index) const =0
 Query the variable name of an attribute at a given index. More...
 
virtual UInt32 GetAttributeByteOffset (UInt32 index) const =0
 Get the byte offset of an attribute at a given index. More...
 
virtual IAttributeGetAttribute (UInt32 index) const =0
 Get the attribute object at a given index. More...
 
virtual IFloatAttributeGetFloatAttribute (UInt32 index) const =0
 Get the attribute at a given index as a scalar float object. More...
 
virtual IFloatVector2AttributeGetFloatVector2Attribute (UInt32 index) const =0
 Get the attribute at a given index as a 2-component float vector object. More...
 
virtual IFloatVector3AttributeGetFloatVector3Attribute (UInt32 index) const =0
 Get the attribute at a given index as a 3-component float vector object. More...
 
virtual IFloatVector4AttributeGetFloatVector4Attribute (UInt32 index) const =0
 Get the attribute at a given index as a 4-component float vector object. More...
 
virtual IUInt8AttributeGetUInt8Attribute (UInt32 index) const =0
 Get the attribute at a given index as a scalar UInt8 object. More...
 
virtual IUInt8Vector2AttributeGetUInt8Vector2Attribute (UInt32 index) const =0
 Get the attribute at a given index as a 2-component UInt8 vector object. More...
 
virtual IUInt8Vector3AttributeGetUInt8Vector3Attribute (UInt32 index) const =0
 Get the attribute at a given index as a 3-component UInt8 vector object. More...
 
virtual IUInt8Vector4AttributeGetUInt8Vector4Attribute (UInt32 index) const =0
 Get the attribute at a given index as a 4-component UInt8 vector object. More...
 
virtual ISInt8AttributeGetSInt8Attribute (UInt32 index) const =0
 Get the attribute at a given index as a scalar SInt8 object. More...
 
virtual ISInt8Vector2AttributeGetSInt8Vector2Attribute (UInt32 index) const =0
 Get the attribute at a given index as a 2-component SInt8 vector object. More...
 
virtual ISInt8Vector3AttributeGetSInt8Vector3Attribute (UInt32 index) const =0
 Get the attribute at a given index as a 3-component SInt8 vector object. More...
 
virtual ISInt8Vector4AttributeGetSInt8Vector4Attribute (UInt32 index) const =0
 Get the attribute at a given index as a 4-component SInt8 vector object. More...
 
virtual IUInt16AttributeGetUInt16Attribute (UInt32 index) const =0
 Get the attribute at a given index as a scalar UInt16 object. More...
 
virtual IUInt16Vector2AttributeGetUInt16Vector2Attribute (UInt32 index) const =0
 Get the attribute at a given index as a 2-component UInt16 vector object. More...
 
virtual IUInt16Vector3AttributeGetUInt16Vector3Attribute (UInt32 index) const =0
 Get the attribute at a given index as a 3-component UInt16 vector object. More...
 
virtual IUInt16Vector4AttributeGetUInt16Vector4Attribute (UInt32 index) const =0
 Get the attribute at a given index as a 4-component UInt16 vector object. More...
 
virtual ISInt16AttributeGetSInt16Attribute (UInt32 index) const =0
 Get the attribute at a given index as a scalar SInt16 object. More...
 
virtual ISInt16Vector2AttributeGetSInt16Vector2Attribute (UInt32 index) const =0
 Get the attribute at a given index as a 2-component SInt16 vector object. More...
 
virtual ISInt16Vector3AttributeGetSInt16Vector3Attribute (UInt32 index) const =0
 Get the attribute at a given index as a 3-component SInt16 vector object. More...
 
virtual ISInt16Vector4AttributeGetSInt16Vector4Attribute (UInt32 index) const =0
 Get the attribute at a given index as a 4-component SInt16 vector object. More...
 
virtual IUInt8AttributeGetNormalizedUInt8Attribute (UInt32 index) const =0
 Get the attribute at a given index as a normalized scalar UInt8 object. More...
 
virtual IUInt8Vector2AttributeGetNormalizedUInt8Vector2Attribute (UInt32 index) const =0
 Get the attribute at a given index as a normalized 2-component UInt8 vector object. More...
 
virtual IUInt8Vector3AttributeGetNormalizedUInt8Vector3Attribute (UInt32 index) const =0
 Get the attribute at a given index as a normalized 3-component UInt8 vector object. More...
 
virtual IUInt8Vector4AttributeGetNormalizedUInt8Vector4Attribute (UInt32 index) const =0
 Get the attribute at a given index as a normalized 4-component UInt8 vector object. More...
 
virtual ISInt8AttributeGetNormalizedSInt8Attribute (UInt32 index) const =0
 Get the attribute at a given index as a normalized scalar SInt8 object. More...
 
virtual ISInt8Vector2AttributeGetNormalizedSInt8Vector2Attribute (UInt32 index) const =0
 Get the attribute at a given index as a normalized 2-component SInt8 vector object. More...
 
virtual ISInt8Vector3AttributeGetNormalizedSInt8Vector3Attribute (UInt32 index) const =0
 Get the attribute at a given index as a normalized 3-component SInt8 vector object. More...
 
virtual ISInt8Vector4AttributeGetNormalizedSInt8Vector4Attribute (UInt32 index) const =0
 Get the attribute at a given index as a normalized 4-component SInt8 vector object. More...
 
virtual IUInt16AttributeGetNormalizedUInt16Attribute (UInt32 index) const =0
 Get the attribute at a given index as a normalized scalar UInt16 object. More...
 
virtual IUInt16Vector2AttributeGetNormalizedUInt16Vector2Attribute (UInt32 index) const =0
 Get the attribute at a given index as a normalized 2-component UInt16 vector object. More...
 
virtual IUInt16Vector3AttributeGetNormalizedUInt16Vector3Attribute (UInt32 index) const =0
 Get the attribute at a given index as a normalized 3-component UInt16 vector object. More...
 
virtual IUInt16Vector4AttributeGetNormalizedUInt16Vector4Attribute (UInt32 index) const =0
 Get the attribute at a given index as a normalized 4-component UInt16 vector object. More...
 
virtual ISInt16AttributeGetNormalizedSInt16Attribute (UInt32 index) const =0
 Get the attribute at a given index as a normalized scalar SInt16 object. More...
 
virtual ISInt16Vector2AttributeGetNormalizedSInt16Vector2Attribute (UInt32 index) const =0
 Get the attribute at a given index as a normalized 2-component SInt16 vector object. More...
 
virtual ISInt16Vector3AttributeGetNormalizedSInt16Vector3Attribute (UInt32 index) const =0
 Get the attribute at a given index as a normalized 3-component SInt16 vector object. More...
 
virtual ISInt16Vector4AttributeGetNormalizedSInt16Vector4Attribute (UInt32 index) const =0
 Get the attribute at a given index as a normalized 4-component SInt16 vector object. More...
 

Detailed Description

The IVertexBuffer property interface.

This interface provides properties common to a class representing an array of individual vertices. Rendering of this buffer can either be done directly or in conjunction with an index buffer.

Member Function Documentation

◆ SetVertexBufferAccessMode()

virtual Bool Murl::Graph::IVertexBuffer::SetVertexBufferAccessMode ( IEnums::BufferAccessMode  mode)
pure virtual

Set the buffer access mode.

Parameters
modeThe access mode.
Returns
true if successful.

◆ GetVertexBufferAccessMode()

virtual IEnums::BufferAccessMode Murl::Graph::IVertexBuffer::GetVertexBufferAccessMode ( ) const
pure virtual

Get the buffer access mode.

Returns
The access mode.

◆ SetMaxNumberOfVertices()

virtual Bool Murl::Graph::IVertexBuffer::SetMaxNumberOfVertices ( UInt32  maxNumberOfVertices,
Bool  preserveContents 
)
pure virtual

Set the maximum number of vertices the vertex buffer can hold.

Parameters
maxNumberOfVerticesThe maximum capacity.
preserveContentsIf true, existing contents will be copied; but existing vertices beyond the new capacity are discarded.
Returns
true if successful.

◆ GetMaxNumberOfVertices()

virtual UInt32 Murl::Graph::IVertexBuffer::GetMaxNumberOfVertices ( ) const
pure virtual

Get the maximum number of vertices the vertex buffer can hold.

Returns
The maximum capacity.

◆ SetVertexByteSize()

virtual Bool Murl::Graph::IVertexBuffer::SetVertexByteSize ( UInt32  byteSize)
pure virtual

Explicitly set the total byte size of single vertex element.

This method explicitly sets the total byte size of a vertex element, i.e. the sum of all individual attributes' byte sizes. If not set, the vertex size is automatically calculated from all given attributes.

Parameters
byteSizeThe total byte size (i.e. stride) of a vertex element.
Returns
true if successful.

◆ GetVertexByteSize()

virtual UInt32 Murl::Graph::IVertexBuffer::GetVertexByteSize ( ) const
pure virtual

Get the total byte size of single vertex element in the buffer.

This method returns the total size in bytes of a single vertex element, which represents the sum of all individual attribute item byte sizes.

Returns
The total vertex element byte size.

◆ GetVertexData() [1/2]

virtual void* Murl::Graph::IVertexBuffer::GetVertexData ( )
pure virtual

Retrieve a mutable pointer to the vertex data stored in the buffer.

Returns
A mutable pointer to the data.

◆ GetVertexData() [2/2]

virtual const void* Murl::Graph::IVertexBuffer::GetVertexData ( ) const
pure virtual

Retrieve a constant pointer to the vertex data stored in the buffer.

Returns
A constant pointer to the data.

◆ SetNumberOfVertices()

virtual Bool Murl::Graph::IVertexBuffer::SetNumberOfVertices ( UInt32  numberOfVertices)
pure virtual

Set the actual number of vertices currently used.

Parameters
numberOfVerticesThe current number of vertices, in the range from 0 to GetMaxNumberOfVertices().
Returns
true if successful.

◆ SetVerticesModified() [1/2]

virtual Bool Murl::Graph::IVertexBuffer::SetVerticesModified ( )
pure virtual

Mark the whole vertex buffer as modified.

Returns
true if successful.

◆ SetVerticesModified() [2/2]

virtual Bool Murl::Graph::IVertexBuffer::SetVerticesModified ( UInt32  firstVertex,
UInt32  numberOfVertices 
)
pure virtual

Mark a portion of the vertex buffer as modified.

Parameters
firstVertexThe zero-based index of the first modified vertex.
numberOfVerticesThe number of modified vertices.
Returns
true if successful.

The documentation for this interface was generated from the following file:
  • murl_graph_i_vertex_buffer.h


Copyright © 2011-2018 Spraylight GmbH.