Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
SiliconStudio.Paradox.Graphics.VertexElement Struct Reference

A description of a single element for the input-assembler stage. This structure is related to Direct3D11.InputElement. More...

Inheritance diagram for SiliconStudio.Paradox.Graphics.VertexElement:
IEquatable< VertexElement >

Classes

class  Serializer
 

Public Member Functions

 VertexElement (string semanticName, PixelFormat format)
 Initializes a new instance of the VertexElement struct. More...
 
 VertexElement (string semanticName, int semanticIndex, PixelFormat format, int alignedByteOffset=AppendAligned)
 Initializes a new instance of the VertexElement struct. More...
 
bool Equals (VertexElement other)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
override string ToString ()
 

Static Public Member Functions

static bool operator== (VertexElement left, VertexElement right)
 
static bool operator!= (VertexElement left, VertexElement right)
 
static VertexElement Color< T > (int semanticIndex=0, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "COLOR". More...
 
static VertexElement Color (PixelFormat format, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "COLOR". More...
 
static VertexElement Color (int semanticIndex, PixelFormat format, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "COLOR". More...
 
static VertexElement Normal< T > (int semanticIndex=0, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "NORMAL". More...
 
static VertexElement Normal (PixelFormat format, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "NORMAL". More...
 
static VertexElement Normal (int semanticIndex, PixelFormat format, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "NORMAL". More...
 
static VertexElement Position< T > (int semanticIndex=0, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "POSITION". More...
 
static VertexElement Position (PixelFormat format, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "POSITION". More...
 
static VertexElement Position (int semanticIndex, PixelFormat format, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "POSITION". More...
 
static VertexElement PositionTransformed< T > (int semanticIndex=0, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "SV_POSITION". More...
 
static VertexElement PositionTransformed (PixelFormat format, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "SV_POSITION". More...
 
static VertexElement PositionTransformed (int semanticIndex, PixelFormat format, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "SV_POSITION". More...
 
static VertexElement TextureCoordinate< T > (int semanticIndex=0, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "TEXCOORD". More...
 
static VertexElement TextureCoordinate (PixelFormat format, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "TEXCOORD". More...
 
static VertexElement TextureCoordinate (int semanticIndex, PixelFormat format, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "TEXCOORD". More...
 
static VertexElement Tangent< T > (int semanticIndex=0, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "TANGENT". More...
 
static VertexElement Tangent (PixelFormat format, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "TANGENT". More...
 
static VertexElement Tangent (int semanticIndex, PixelFormat format, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "TANGENT". More...
 
static VertexElement BiTangent< T > (int semanticIndex=0, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "BITANGENT". More...
 
static VertexElement BiTangent (PixelFormat format, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "BITANGENT". More...
 
static VertexElement BiTangent (int semanticIndex, PixelFormat format, int offsetInBytes=AppendAligned)
 Declares a VertexElement with the semantic "BITANGENT". More...
 

Public Attributes

const int AppendAligned = -1
 Returns a value that can be used for the offset parameter of an InputElement to indicate that the element should be aligned directly after the previous element, including any packing if neccessary. More...
 

Properties

string SemanticName [get]
 
string SemanticAsText [get]
 
int SemanticIndex [get]
 
PixelFormat Format [get]
 
int AlignedByteOffset [get]
 

Detailed Description

A description of a single element for the input-assembler stage. This structure is related to Direct3D11.InputElement.

Because Direct3D11.InputElement requires to have the same VertexBufferLayout.SlotIndex, VertexBufferLayout.VertexClassification and VertexBufferLayout.instanceDataStepRate, the VertexBufferLayout structure encapsulates a set of VertexElement for a particular slot, classification and instance data step rate. Unlike the default Direct3D11.InputElement, this structure accepts a semantic name with a postfix number that will be automatically extracted to the semantic index.

See also
VertexBufferLayout

Definition at line 45 of file VertexElement.cs.

Constructor & Destructor Documentation

SiliconStudio.Paradox.Graphics.VertexElement.VertexElement ( string  semanticName,
PixelFormat  format 
)

Initializes a new instance of the VertexElement struct.

Parameters
semanticNameName of the semantic.
formatThe format.

If the semantic name contains a postfix number, this number will be used as a semantic index.

Definition at line 75 of file VertexElement.cs.

References DirectX.format.

SiliconStudio.Paradox.Graphics.VertexElement.VertexElement ( string  semanticName,
int  semanticIndex,
PixelFormat  format,
int  alignedByteOffset = AppendAligned 
)

Initializes a new instance of the VertexElement struct.

Parameters
semanticNameName of the semantic.
semanticIndexIndex of the semantic.
formatThe format.
alignedByteOffsetThe aligned byte offset.

Definition at line 110 of file VertexElement.cs.

References DirectX.format.

Member Function Documentation

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.BiTangent ( PixelFormat  format,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "BITANGENT".

Parameters
formatFormat of this element.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.

Definition at line 462 of file VertexElement.cs.

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.BiTangent ( int  semanticIndex,
PixelFormat  format,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "BITANGENT".

Parameters
semanticIndexThe semantic index.
formatFormat of this element.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.

Definition at line 474 of file VertexElement.cs.

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.BiTangent< T > ( int  semanticIndex = 0,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "BITANGENT".

Template Parameters
TType of the BiTangent semantic.
Parameters
semanticIndexThe semantic index.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.
Type Constraints
T :struct 

Definition at line 451 of file VertexElement.cs.

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.Color ( PixelFormat  format,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "COLOR".

Parameters
formatFormat of this element.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.

Definition at line 252 of file VertexElement.cs.

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.Color ( int  semanticIndex,
PixelFormat  format,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "COLOR".

Parameters
semanticIndexThe semantic index.
formatFormat of this element.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.

Definition at line 264 of file VertexElement.cs.

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.Color< T > ( int  semanticIndex = 0,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "COLOR".

Template Parameters
TType of the Color semantic.
Parameters
semanticIndexThe semantic index.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.
Type Constraints
T :struct 

Definition at line 241 of file VertexElement.cs.

bool SiliconStudio.Paradox.Graphics.VertexElement.Equals ( VertexElement  other)

Definition at line 190 of file VertexElement.cs.

References DirectX.format.

override bool SiliconStudio.Paradox.Graphics.VertexElement.Equals ( object  obj)

Definition at line 196 of file VertexElement.cs.

override int SiliconStudio.Paradox.Graphics.VertexElement.GetHashCode ( )
static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.Normal ( PixelFormat  format,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "NORMAL".

Parameters
formatFormat of this element.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.

Definition at line 287 of file VertexElement.cs.

References SiliconStudio.Core.Normal.

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.Normal ( int  semanticIndex,
PixelFormat  format,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "NORMAL".

Parameters
semanticIndexThe semantic index.
formatFormat of this element.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.

Definition at line 299 of file VertexElement.cs.

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.Normal< T > ( int  semanticIndex = 0,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "NORMAL".

Template Parameters
TType of the Normal semantic.
Parameters
semanticIndexThe semantic index.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.
Type Constraints
T :struct 

Definition at line 276 of file VertexElement.cs.

References SiliconStudio.Core.Normal.

static bool SiliconStudio.Paradox.Graphics.VertexElement.operator!= ( VertexElement  left,
VertexElement  right 
)
static

Definition at line 224 of file VertexElement.cs.

static bool SiliconStudio.Paradox.Graphics.VertexElement.operator== ( VertexElement  left,
VertexElement  right 
)
static

Definition at line 219 of file VertexElement.cs.

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.Position ( PixelFormat  format,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "POSITION".

Parameters
formatFormat of this element.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.

Definition at line 322 of file VertexElement.cs.

Referenced by SiliconStudio.Paradox.Effects.SkyBoxPlugin.Load(), SiliconStudio.Paradox.Effects.SlideShowPlugin.Load(), and SiliconStudio.Paradox.Effects.Modules.Renderers.LightingPrepassRenderer.Load().

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.Position ( int  semanticIndex,
PixelFormat  format,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "POSITION".

Parameters
semanticIndexThe semantic index.
formatFormat of this element.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.

Definition at line 334 of file VertexElement.cs.

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.Position< T > ( int  semanticIndex = 0,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "POSITION".

Template Parameters
TType of the Position semantic.
Parameters
semanticIndexThe semantic index.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.
Type Constraints
T :struct 

Definition at line 311 of file VertexElement.cs.

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.PositionTransformed ( PixelFormat  format,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "SV_POSITION".

Parameters
formatFormat of this element.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.

Definition at line 357 of file VertexElement.cs.

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.PositionTransformed ( int  semanticIndex,
PixelFormat  format,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "SV_POSITION".

Parameters
semanticIndexThe semantic index.
formatFormat of this element.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.

Definition at line 369 of file VertexElement.cs.

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.PositionTransformed< T > ( int  semanticIndex = 0,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "SV_POSITION".

Template Parameters
TType of the PositionTransformed semantic.
Parameters
semanticIndexThe semantic index.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.
Type Constraints
T :struct 

Definition at line 346 of file VertexElement.cs.

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.Tangent ( PixelFormat  format,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "TANGENT".

Parameters
formatFormat of this element.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.

Definition at line 427 of file VertexElement.cs.

Referenced by SiliconStudio.Paradox.Extensions.TNBExtensions.GenerateTangentBinormal().

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.Tangent ( int  semanticIndex,
PixelFormat  format,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "TANGENT".

Parameters
semanticIndexThe semantic index.
formatFormat of this element.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.

Definition at line 439 of file VertexElement.cs.

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.Tangent< T > ( int  semanticIndex = 0,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "TANGENT".

Template Parameters
TType of the Tangent semantic.
Parameters
semanticIndexThe semantic index.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.
Type Constraints
T :struct 

Definition at line 416 of file VertexElement.cs.

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.TextureCoordinate ( PixelFormat  format,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "TEXCOORD".

Parameters
formatFormat of this element.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.

Definition at line 392 of file VertexElement.cs.

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.TextureCoordinate ( int  semanticIndex,
PixelFormat  format,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "TEXCOORD".

Parameters
semanticIndexThe semantic index.
formatFormat of this element.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.

Definition at line 404 of file VertexElement.cs.

static VertexElement SiliconStudio.Paradox.Graphics.VertexElement.TextureCoordinate< T > ( int  semanticIndex = 0,
int  offsetInBytes = AppendAligned 
)
static

Declares a VertexElement with the semantic "TEXCOORD".

Template Parameters
TType of the TextureCoordinate semantic.
Parameters
semanticIndexThe semantic index.
offsetInBytesThe offset in bytes of this element. Use AppendAligned to compute automatically the offset from previous elements.
Returns
A new instance of VertexElement that represents this semantic.
Type Constraints
T :struct 

Definition at line 381 of file VertexElement.cs.

override string SiliconStudio.Paradox.Graphics.VertexElement.ToString ( )

Definition at line 229 of file VertexElement.cs.

References DirectX.format.

Member Data Documentation

const int SiliconStudio.Paradox.Graphics.VertexElement.AppendAligned = -1

Returns a value that can be used for the offset parameter of an InputElement to indicate that the element should be aligned directly after the previous element, including any packing if neccessary.

Returns
A value used to align input elements.

Definition at line 65 of file VertexElement.cs.

Referenced by SiliconStudio.Paradox.Graphics.VertexDeclaration.CalculateSize(), and SiliconStudio.Paradox.Graphics.VertexDeclaration.EnumerateWithOffsets().

Property Documentation

int SiliconStudio.Paradox.Graphics.VertexElement.AlignedByteOffset
get

Optional. Offset (in bytes) between each element. Use D3D11_APPEND_ALIGNED_ELEMENT for convenience to define the current element directly after the previous one, including any packing if necessary.

Definition at line 183 of file VertexElement.cs.

PixelFormat SiliconStudio.Paradox.Graphics.VertexElement.Format
get

The data type of the element data. See SharpDX.DXGI.Format.

Definition at line 172 of file VertexElement.cs.

string SiliconStudio.Paradox.Graphics.VertexElement.SemanticAsText
get

The HLSL semantic associated with this element in a shader input-signature.

Definition at line 148 of file VertexElement.cs.

int SiliconStudio.Paradox.Graphics.VertexElement.SemanticIndex
get

The semantic index for the element. A semantic index modifies a semantic, with an integer index number. A semantic index is only needed in a case where there is more than one element with the same semantic. For example, a 4x4 matrix would have four components each with the semantic name

matrix

, however each of the four component would have different semantic indices (0, 1, 2, and 3).

Definition at line 161 of file VertexElement.cs.

string SiliconStudio.Paradox.Graphics.VertexElement.SemanticName
get

The HLSL semantic associated with this element in a shader input-signature.

Definition at line 137 of file VertexElement.cs.


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