C# Class Protogame.ModelVertex

Represents a model vertex with all available data from the model.

Models may store different data in different areas depending on what shader is intended to be used with the model. For example, some models might specify vertex colors, and others might use textures and bump maps.

Show file Open project: RedpointGames/Protogame Class Usage Examples

Public Properties

Property Type Description
BiTangent Vector3?
BoneIndices Byte4?
BoneWeights Vector4?
Colors Microsoft.Xna.Framework.Color[]
Normal Vector3?
Position Vector3?
Tangent Vector3?
TexCoordsUV Microsoft.Xna.Framework.Vector2[]
TexCoordsUVW Microsoft.Xna.Framework.Vector3[]

Public Methods

Method Description
ModelVertex ( Microsoft.Xna.Framework.Vector3 position, Microsoft.Xna.Framework.Vector3 normal, Microsoft.Xna.Framework.Vector3 tangent, Microsoft.Xna.Framework.Vector3 bitangent, Microsoft.Xna.Framework.Color colors, Vector2 texCoordsUV, Microsoft.Xna.Framework.Vector3 texCoordsUVW, Byte4 boneIndicies, Vector4 boneWeights ) : Microsoft.Xna.Framework
ToString ( ) : string

Provides a very basic representation of the vertex (just the position information).

Transform ( Matrix matrix ) : ModelVertex

Transforms the current model vertex by the matrix.

Method Details

ModelVertex() public method

public ModelVertex ( Microsoft.Xna.Framework.Vector3 position, Microsoft.Xna.Framework.Vector3 normal, Microsoft.Xna.Framework.Vector3 tangent, Microsoft.Xna.Framework.Vector3 bitangent, Microsoft.Xna.Framework.Color colors, Vector2 texCoordsUV, Microsoft.Xna.Framework.Vector3 texCoordsUVW, Byte4 boneIndicies, Vector4 boneWeights ) : Microsoft.Xna.Framework
position Microsoft.Xna.Framework.Vector3
normal Microsoft.Xna.Framework.Vector3
tangent Microsoft.Xna.Framework.Vector3
bitangent Microsoft.Xna.Framework.Vector3
colors Microsoft.Xna.Framework.Color
texCoordsUV Microsoft.Xna.Framework.Vector2
texCoordsUVW Microsoft.Xna.Framework.Vector3
boneIndicies Byte4
boneWeights Microsoft.Xna.Framework.Vector4
return Microsoft.Xna.Framework

ToString() public method

Provides a very basic representation of the vertex (just the position information).
public ToString ( ) : string
return string

Transform() public method

Transforms the current model vertex by the matrix.
public Transform ( Matrix matrix ) : ModelVertex
matrix Microsoft.Xna.Framework.Matrix
return ModelVertex

Property Details

BiTangent public property

The bitangent of the vertex, if specified.
public Vector3? BiTangent
return Vector3?

BoneIndices public property

The indicies of the bones associated with this vertex. This data is calculated by the model importer based on the bones configured in the model. If there are no bones in the model, or this vertex isn't affected by bones, this value is null.
public Byte4? BoneIndices
return Byte4?

BoneWeights public property

The weights of the bones associated with this vertex. This data is calculated by the model importer based on the bones configured in the model. If there are no bones in the model, or this vertex isn't affected by bones, this value is null.
public Vector4? BoneWeights
return Vector4?

Colors public property

The color channels associated with the vertex. A vertex can have zero or more color channels.
public Color[],Microsoft.Xna.Framework Colors
return Microsoft.Xna.Framework.Color[]

Normal public property

The normal of the vertex, if specified.
public Vector3? Normal
return Vector3?

Position public property

The 3D position in space of this vertex, if specified.
public Vector3? Position
return Vector3?

Tangent public property

The tangent of the vertex, if specified.
public Vector3? Tangent
return Vector3?

TexCoordsUV public property

The 2D texture coordinates associated with the vertex. These texture coordinates are often refered to as UV-coordinates. A vertex can have zero or more texture coordinate channels.
public Vector2[],Microsoft.Xna.Framework TexCoordsUV
return Microsoft.Xna.Framework.Vector2[]

TexCoordsUVW public property

The 3D texture coordinates associated with the vertex. These texture coordinates are often refered to as UVW-coordinates. Often you won't use these; they're only used if the model is being rendered using a 3D texture or cube, or if you're storing non-texture data in these channels. A vertex can have zero or more texture coordinate channels.
public Vector3[],Microsoft.Xna.Framework TexCoordsUVW
return Microsoft.Xna.Framework.Vector3[]