25 using System.Runtime.InteropServices;
26 using SiliconStudio.Core.Mathematics;
28 namespace SiliconStudio.
Paradox.Graphics
33 [StructLayout(LayoutKind.Sequential)]
67 public static readonly
int Size = 32;
85 public override bool Equals(
object obj)
87 if (ReferenceEquals(null, obj))
return false;
95 int hashCode = Position.GetHashCode();
96 hashCode = (hashCode * 397) ^ Normal.GetHashCode();
109 TextureCoordinate.X = (1.0f - TextureCoordinate.X);
114 return left.Equals(right);
119 return !left.Equals(right);
124 return string.Format(
"Position: {0}, Normal: {1}, Texcoord: {2}", Position, Normal,
TextureCoordinate);
override int GetHashCode()
The layout of a vertex buffer with a set of VertexElement.
Represents a two dimensional mathematical vector.
static VertexElement TextureCoordinate(PixelFormat format, int offsetInBytes=AppendAligned)
Declares a VertexElement with the semantic "TEXCOORD".
bool Equals(VertexPositionNormalTexture other)
Describes a custom vertex format structure that contains position, normal and texture information...
Vector3 Normal
The vertex normal.
Represents a three dimensional mathematical vector.
TextureCoordinate
The texture coordinate.
VertexDeclaration GetLayout()
Gets the layout of the vertex.
Vector3 Position
XYZ position.
Vector2 TextureCoordinate
UV texture coordinates.
static VertexElement Normal(PixelFormat format, int offsetInBytes=AppendAligned)
Declares a VertexElement with the semantic "NORMAL".
static VertexElement Position(PixelFormat format, int offsetInBytes=AppendAligned)
Declares a VertexElement with the semantic "POSITION".
void FlipWinding()
Flip the vertex winding.
override string ToString()
VertexPositionNormalTexture(Vector3 position, Vector3 normal, Vector2 textureCoordinate)
Initializes a new VertexPositionNormalTexture instance.
override bool Equals(object obj)
The base interface for all the vertex data structure.
A description of a single element for the input-assembler stage. This structure is related to Direct3...