5 using System.Runtime.InteropServices;
7 using SiliconStudio.Core.Mathematics;
9 namespace SiliconStudio.
Paradox.Graphics
14 [StructLayout(LayoutKind.Sequential)]
49 public static readonly
int Size = 28;
64 return Position.Equals(other.Position) && Normal.Equals(other.
Normal) && Color.Equals(
other.Color);
67 public override bool Equals(
object obj)
69 if (ReferenceEquals(null, obj))
return false;
77 int hashCode = Position.GetHashCode();
78 hashCode = (hashCode * 397) ^ Normal.GetHashCode();
95 return left.Equals(right);
100 return !left.Equals(right);
105 return string.Format(
"Position: {0}, Normal: {1}, Color: {2}", Position, Normal,
Color);
static VertexElement Color(PixelFormat format, int offsetInBytes=AppendAligned)
Declares a VertexElement with the semantic "COLOR".
The layout of a vertex buffer with a set of VertexElement.
Vector3 Normal
The vertex normal.
override int GetHashCode()
Vector3 Position
XYZ position.
bool Equals(VertexPositionNormalColor other)
Describes a custom vertex format structure that contains position, normal and color information...
Represents a three dimensional mathematical vector.
VertexPositionNormalColor(Vector3 position, Vector3 normal, Color color)
Initializes a new VertexPositionNormalColor instance.
override int GetHashCode()
Returns a hash code for this instance.
static VertexElement Normal(PixelFormat format, int offsetInBytes=AppendAligned)
Declares a VertexElement with the semantic "NORMAL".
SiliconStudio.Core.Mathematics.Color Color
Represents a 32-bit color (4 bytes) in the form of RGBA (in byte order: R, G, B, A).
static VertexElement Position(PixelFormat format, int offsetInBytes=AppendAligned)
Declares a VertexElement with the semantic "POSITION".
VertexDeclaration GetLayout()
Gets the layout of the vertex.
override bool Equals(object obj)
override string ToString()
void FlipWinding()
Flip the vertex winding.
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...