#include <MaterialRequiredStreams.h>
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.
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. |
|
DataBridgeAPI 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. |
|
DataBridgeAPI 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.
|
|
DataBridgeAPI bool | GetIsInstanceStream () const |
Get whether this stream contains instance
data. |
|
DataBridgeAPI void | SetIsInstanceStream (bool value) |
Set whether this stream contains instance
data. |
|
DataBridgeAPI void | SetOffset (unsigned short offset) |
DataBridgeAPI unsigned short | GetOffset () const |
DataBridgeAPI void | SetStreamIndex (unsigned char index) |
DataBridgeAPI unsigned char | GetStreamIndex () 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 |
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)); }
DataBridgeAPI VertexFieldType GetType | ( | ) | const |
Get the vertex field type of the stream element.
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 = (char)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 = (unsigned char)usageIndex; }
DataBridgeAPI bool GetIsInstanceStream | ( | ) | const |
Get whether this stream contains instance data.
DataBridgeAPI void SetIsInstanceStream | ( | bool | value | ) |
Set whether this stream contains instance data.
Only used when the stream is used as instance data Note: only last stream of a vertex buffer array can be used as instance stream
true | to indicate this is a instance stream |
DataBridgeAPI void SetOffset | ( | unsigned short | offset | ) |
DataBridgeAPI unsigned short GetOffset | ( | ) | const |
DataBridgeAPI void SetStreamIndex | ( | unsigned char | index | ) |
DataBridgeAPI unsigned char GetStreamIndex | ( | ) | const |
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; }