Om  1.0.0
A universal framework for multimedia simulation
Public Types | Public Member Functions | List of all members
om::graphics::buffers::VertexUsage Class Reference

A class that specifies how a vertex attribute is semantically used for rendering. More...

#include <omGraphicsVertexUsage.h>

Public Types

enum  Enum {
  UNDEFINED = 0, POSITION = 1, NORMAL = 2, BINORMAL = 3,
  TANGENT = 4, COLOR = 5, TEXTURE_COORDINATE = 6, BONE_INDEX = 7,
  BONE_WEIGHT = 8
}
 An enum type which represents a type of vertex attribute usage. More...
 

Public Member Functions

 VertexUsage ()
 Create a new undefined vertex usage. More...
 
 VertexUsage (Enum newUsage)
 Create a new vertex usage with the specified vertex attribute usage enum value. More...
 
 VertexUsage (Enum newUsage, Index newIndex)
 Create a new vertex usage with the specified usage enum value and index. More...
 
 operator Enum () const
 Convert this vertex usage to an enum value. More...
 
Bool operator== (const VertexUsage::Enum otherEnum) const
 Return whether or not this vertex usage is the same as another. More...
 
Bool operator== (const VertexUsage &other) const
 Return whether or not this vertex usage is the same as another. More...
 
Bool operator!= (const VertexUsage::Enum otherEnum) const
 Return whether or not this vertex usage is different than another. More...
 
Bool operator!= (const VertexUsage &other) const
 Return whether or not this vertex usage is different than another. More...
 
Bool isValidType (const AttributeType &type) const
 Return whether or not the specified vertex attribute type is a valid type for this usage. More...
 
Index getIndex () const
 Return an index for the vertex usage. More...
 
void setIndex (Index newIndex)
 Return an index for the vertex usage. More...
 
String toString () const
 Return a string representation of the vertex usage. More...
 
 operator String () const
 Convert this vertex usage into a string representation. More...
 

Detailed Description

A class that specifies how a vertex attribute is semantically used for rendering.

Each instance allows the user to specify an enum value indicating the type of usage and also an integral index for that usage. For example, this allows the user to specify multiple texture coordinate usages.

Member Enumeration Documentation

An enum type which represents a type of vertex attribute usage.

Enumerator
UNDEFINED 

An undefined vertex attribute usage.

POSITION 

A usage where the attribute is used to specify a vertex's position.

NORMAL 

A usage where the attribute is used to specify a vertex's normal vector.

BINORMAL 

A usage where the attribute is used to specify a vertex's binormal vector.

TANGENT 

A usage where the attribute is used to specify a vertex's tangent vector.

COLOR 

A usage where the attribute is used to specify a vertex's color.

TEXTURE_COORDINATE 

A usage where the attribute is used to specify a vertex's texture coordinate.

BONE_INDEX 

A usage where the attribute is used to represent one or more per-vertex bone indices.

BONE_WEIGHT 

A usage where the attribute is used to represent one or more per-vertex bone weights.

Constructor & Destructor Documentation

om::graphics::buffers::VertexUsage::VertexUsage ( )
inline

Create a new undefined vertex usage.

om::graphics::buffers::VertexUsage::VertexUsage ( Enum  newUsage)
inline

Create a new vertex usage with the specified vertex attribute usage enum value.

om::graphics::buffers::VertexUsage::VertexUsage ( Enum  newUsage,
Index  newIndex 
)
inline

Create a new vertex usage with the specified usage enum value and index.

Member Function Documentation

om::graphics::buffers::VertexUsage::operator Enum ( ) const
inline

Convert this vertex usage to an enum value.

Bool om::graphics::buffers::VertexUsage::operator== ( const VertexUsage::Enum  otherEnum) const
inline

Return whether or not this vertex usage is the same as another.

This operator does not compare any usage index, just the usage type.

Bool om::graphics::buffers::VertexUsage::operator== ( const VertexUsage other) const
inline

Return whether or not this vertex usage is the same as another.

Bool om::graphics::buffers::VertexUsage::operator!= ( const VertexUsage::Enum  otherEnum) const
inline

Return whether or not this vertex usage is different than another.

This operator does not compare any usage index, just the usage type.

Bool om::graphics::buffers::VertexUsage::operator!= ( const VertexUsage other) const
inline

Return whether or not this vertex usage is different than another.

Bool om::graphics::buffers::VertexUsage::isValidType ( const AttributeType type) const

Return whether or not the specified vertex attribute type is a valid type for this usage.

Index om::graphics::buffers::VertexUsage::getIndex ( ) const
inline

Return an index for the vertex usage.

This value allows the user to keep track of multiple distinct usages separately (i.e. for multiple lights) that have the same usage type.

void om::graphics::buffers::VertexUsage::setIndex ( Index  newIndex)
inline

Return an index for the vertex usage.

This value allows the user to keep track of multiple distinct usages separately (i.e. for multiple lights) that have the same usage type.

String om::graphics::buffers::VertexUsage::toString ( ) const

Return a string representation of the vertex usage.

om::graphics::buffers::VertexUsage::operator String ( ) const
inline

Convert this vertex usage into a string representation.


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