This struct describes a single stream element that will be used by the hardware shader of a material.
More specifically, it defines one input parameter of vertex shader. Based on the structure we know exactly how to bind a max mesh channel to a vertex shader input parameter.
#include <MaterialRequiredStreams.h>
Classes |
|
union | DataUnion |
Public Member Functions |
|
DataBridgeAPI | MaterialRequiredStreamElement () |
DataBridgeAPI | MaterialRequiredStreamElement (const MaterialRequiredStreamElement &from) |
DataBridgeAPI MaterialRequiredStreamElement & |
operator= (const MaterialRequiredStreamElement &from) |
DataBridgeAPI | ~MaterialRequiredStreamElement () |
DataBridgeAPI int | Compare (const MaterialRequiredStreamElement &rhs) const |
Compare two
MaterialRequiredStreamElement. |
|
int | GetChannelID () const |
Get the max channel id which record where is
the element come from. |
|
VertexFieldType | GetType () const |
Get the vertex field type of the stream
element. |
|
MeshChannelCategory | GetChannelCategory () const |
Get the channel category of the stream
element. |
|
unsigned short | GetUsageIndex () const |
Get the usage index of the stream element.
|
|
void | SetChannelID (int maxMapChannel) |
Set the max channel id which record where is
the element come from. |
|
void | SetType (VertexFieldType type) |
Set the vertex element type. |
|
void | SetChannelCategory (MeshChannelCategory channelCategory) |
Set the channel category of the element.
|
|
void | SetUsageIndex (unsigned short usageIndex) |
Set the usage index of the stream element.
|
|
bool | operator== (const MaterialRequiredStreamElement &rhs) const |
bool | operator!= (const MaterialRequiredStreamElement &rhs) const |
bool | operator< (const MaterialRequiredStreamElement &rhs) const |
bool | operator<= (const MaterialRequiredStreamElement &rhs) const |
bool | operator> (const MaterialRequiredStreamElement &rhs) const |
bool | operator>= (const MaterialRequiredStreamElement &rhs) const |
Protected Attributes |
|
DataUnion | mData |
DataBridgeAPI MaterialRequiredStreamElement | ( | ) |
DataBridgeAPI MaterialRequiredStreamElement | ( | const MaterialRequiredStreamElement & | from | ) |
DataBridgeAPI ~MaterialRequiredStreamElement | ( | ) |
DataBridgeAPI MaterialRequiredStreamElement& operator= | ( | const MaterialRequiredStreamElement & | from | ) |
DataBridgeAPI int Compare | ( | const MaterialRequiredStreamElement & | rhs | ) | const |
Compare two MaterialRequiredStreamElement.
rhs | the "right-hand-side" MaterialRequiredStreamElement of the compare function. |
int GetChannelID | ( | ) | const [inline] |
Get the max channel id which record where is the element come from.
{ return (int)((unsigned int)(mData.mChannelId)); }
VertexFieldType GetType | ( | ) | const [inline] |
Get the vertex field type of the stream element.
{ return (VertexFieldType)(mData.mFieldType); }
MeshChannelCategory GetChannelCategory | ( | ) | const [inline] |
Get the channel category of the stream element.
{ return (MeshChannelCategory)(mData.mChannelCategory); }
unsigned short GetUsageIndex | ( | ) | const [inline] |
void SetChannelID | ( | int | maxMapChannel | ) | [inline] |
Set the max channel id which record where is the element come from.
maxMapChannel | the channel id. |
{ mData.mChannelId = (unsigned long)((unsigned int)maxMapChannel); }
void SetType | ( | VertexFieldType | type | ) | [inline] |
Set the vertex element type.
type | the vertex element type. |
{ mData.mFieldType = (unsigned char)type; }
void SetChannelCategory | ( | MeshChannelCategory | channelCategory | ) | [inline] |
Set the channel category of the element.
channelCategory | the channel category of the element. |
{ mData.mChannelCategory = (unsigned char)channelCategory; }
void SetUsageIndex | ( | unsigned short | usageIndex | ) | [inline] |
Set the usage index of the stream element.
usageIndex | the usage index of the stream element. |
{ mData.mUsageIndex = usageIndex; }
bool operator== | ( | const MaterialRequiredStreamElement & | rhs | ) | const [inline] |
{ return Compare(rhs) == 0; }
bool operator!= | ( | const MaterialRequiredStreamElement & | rhs | ) | const [inline] |
{ return Compare(rhs) != 0; }
bool operator< | ( | const MaterialRequiredStreamElement & | rhs | ) | const [inline] |
{ return Compare(rhs) < 0; }
bool operator<= | ( | const MaterialRequiredStreamElement & | rhs | ) | const [inline] |
{ return Compare(rhs) <= 0; }
bool operator> | ( | const MaterialRequiredStreamElement & | rhs | ) | const [inline] |
{ return Compare(rhs) > 0; }
bool operator>= | ( | const MaterialRequiredStreamElement & | rhs | ) | const [inline] |
{ return Compare(rhs) >= 0; }