Polycode::Vertex Class Reference

A mesh vertex. More...

Inherits Polycode::Vector3.

List of all members.

Public Member Functions

 Vertex ()
 Default constructor.
 Vertex (Number x, Number y, Number z)
 Initialize with position.
 Vertex (Number pos_x, Number pos_y, Number pos_z, Number nor_x, Number nor_y, Number nor_z)
 Initialize with position and normal.
 Vertex (Number pos_x, Number pos_y, Number pos_z, Number nor_x, Number nor_y, Number nor_z, Number u, Number v)
 Initialize with position and normal and texture coordinates.
 Vertex (Number x, Number y, Number z, Number u, Number v)
 Initialize with position and texture coordinates.
void addBoneAssignment (unsigned int boneID, Number boneWeight)
 Assign a bone to the vertex by bone id.
int getNumBoneAssignments ()
 Get total number of bone assignments.
BoneAssignmentgetBoneAssignment (unsigned int index)
 Get bone assignment at index.
void normalizeWeights ()
 Normalizes all current weight assignments.
Vector2 getTexCoord ()
 Returns the texture coordinates.
void setTexCoord (Number u, Number v)
 Sets the texture coordinates.
void setNormal (Number x, Number y, Number z)
 Sets the normal.

Public Attributes

Vector3 restNormal
 Rest normal.
Vector3 restPosition
 Rest position.
Vector3 normal
 Vertex normal.
Vector3 tangent
 Vertex tangent.
Color vertexColor
 Vertex color.
Vector2 texCoord
 Texture coordinates.

Detailed Description

A mesh vertex.


Constructor & Destructor Documentation

Vertex::Vertex ( Number  x,
Number  y,
Number  z 
)

Initialize with position.

Parameters:
pos_x Position x.
pos_y Position y.
pos_z Position z.
Vertex::Vertex ( Number  pos_x,
Number  pos_y,
Number  pos_z,
Number  nor_x,
Number  nor_y,
Number  nor_z 
)

Initialize with position and normal.

Parameters:
pos_x Position x.
pos_y Position y.
pos_z Position z.
nor_x Normal x.
nor_y Normal y.
nor_z Normal z.
Vertex::Vertex ( Number  pos_x,
Number  pos_y,
Number  pos_z,
Number  nor_x,
Number  nor_y,
Number  nor_z,
Number  u,
Number  v 
)

Initialize with position and normal and texture coordinates.

Parameters:
pos_x Position x.
pos_y Position y.
pos_z Position z.
nor_x Normal x.
nor_y Normal y.
nor_z Normal z.
u Horizontal texture coordinate.
v Vertical texture coordinate.
Vertex::Vertex ( Number  x,
Number  y,
Number  z,
Number  u,
Number  v 
)

Initialize with position and texture coordinates.

Parameters:
pos_x Position x.
pos_y Position y.
pos_z Position z.
u Horizontal texture coordinate.
v Vertical texture coordinate.

Member Function Documentation

void Vertex::addBoneAssignment ( unsigned int  boneID,
Number  boneWeight 
)

Assign a bone to the vertex by bone id.

Parameters:
boneID The bone id.
boneWeight Normalized weight of the bone assignment.
BoneAssignment * Vertex::getBoneAssignment ( unsigned int  index  ) 

Get bone assignment at index.

Parameters:
Index of bone assignment.
Returns:
Bone assignment at index.
int Vertex::getNumBoneAssignments (  ) 

Get total number of bone assignments.

Returns:
Number of bone assignments.
Vector2 Vertex::getTexCoord (  ) 

Returns the texture coordinates.

Returns:
Texture coordinates.
void Vertex::setNormal ( Number  x,
Number  y,
Number  z 
)

Sets the normal.

Parameters:
x Normal x.
y Normal y.
z Normal z.
void Vertex::setTexCoord ( Number  u,
Number  v 
)

Sets the texture coordinates.

Parameters:
u New horizontal texture coordinate.
v New vertical texture coordinate.
Generated on Sat Aug 11 18:04:12 2012 for Polycode by  doxygen 1.6.3