Vertex Struct Reference

Vertex Struct Reference
+ Related help topics:

#include <mesh.h>

Class Description

Represents a vertex point on a Mesh with its associated data.

A Vertex has an x,y,z position in space, a normal, a "Freeze" value between 0.0 and 1.0, and a boolean flag saying whether or not the vertex is currently selected. Each Mesh object contains a list of Vertex objects.

Definition at line 56 of file mesh.h.

Public Member Functions

 Vertex (void)
 
float Freeze (void) const
 Returns the Freeze value of the Vertex (between 0.0 and 1.0, where 0.0 is not frozen) More...
 
void SetFreeze (float fFreeze)
 Sets the Freeze value of the Vertex (between 0.0 and 1.0, where 0.0 is not frozen) More...
 
float Mask (void) const
 Do not use this method. More...
 
void SetMask (float fMask)
 Do not use this method. More...
 
bool IsSelected (void) const
 Returns the Selected state of the Vertex (true or false) More...
 
void SetSelected (bool bSelected)
 Sets the Selected state of the Vertex (true or false) More...
 

Public Attributes

Vector m_vPos
 
unsigned int m_iStrokeID
 
unsigned short m_iStates
 

Constructor & Destructor Documentation

Vertex ( void  )
inline

Definition at line 58 of file mesh.h.

58 { m_iStrokeID = 0; m_iStates = 0; };
unsigned short m_iStates
Definition: mesh.h:68
unsigned int m_iStrokeID
Definition: mesh.h:62

Member Function Documentation

float Freeze ( void  ) const
inline

Returns the Freeze value of the Vertex (between 0.0 and 1.0, where 0.0 is not frozen)

The freeze value is used to lock parts of the mesh so they are less affected by sculpting brushes. It is the responsibility of every sculpt brush to take into account the Freeze values on vertices it is modifying.

Definition at line 76 of file mesh.h.

77  { return ((float)(unsigned char)(m_iStates&0x7f)) * (1.0f/0x7f); };
unsigned short m_iStates
Definition: mesh.h:68
void SetFreeze ( float  fFreeze)
inline

Sets the Freeze value of the Vertex (between 0.0 and 1.0, where 0.0 is not frozen)

The freeze value is used to lock parts of the mesh so they are less affected by sculpting brushes. It is the responsibility of every sculpt brush to take into account the Freeze values on vertices it is modifying.

Definition at line 85 of file mesh.h.

86  { m_iStates = (m_iStates&0xff80)+(unsigned int)(0x7f*fFreeze); };
unsigned short m_iStates
Definition: mesh.h:68
float Mask ( void  ) const
inline

Do not use this method.

Layer masks should be accessed via LayerMeshData::VertexMask.

Definition at line 90 of file mesh.h.

91  { return ((float)(unsigned char)(m_iStates>>8)) * (1.0f/0xff); };
unsigned short m_iStates
Definition: mesh.h:68
void SetMask ( float  fMask)
inline

Do not use this method.

Layer masks should be accessed via LayerMeshData::VertexMask.

Definition at line 95 of file mesh.h.

96  { m_iStates = (m_iStates&0xff)+(((unsigned int)(0xff*fMask))<<8); };
unsigned short m_iStates
Definition: mesh.h:68
bool IsSelected ( void  ) const
inline

Returns the Selected state of the Vertex (true or false)

Definition at line 99 of file mesh.h.

99 { return (m_iStates&0x80) != 0; };
unsigned short m_iStates
Definition: mesh.h:68
void SetSelected ( bool  bSelected)
inline

Sets the Selected state of the Vertex (true or false)

Definition at line 102 of file mesh.h.

103  { m_iStates = (m_iStates&0xff7f)+bSelected*0x80; };
unsigned short m_iStates
Definition: mesh.h:68

Member Data Documentation

Vector m_vPos

Definition at line 58 of file mesh.h.

unsigned int m_iStrokeID
mutable

Definition at line 62 of file mesh.h.

unsigned short m_iStates

Definition at line 68 of file mesh.h.


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