TC Struct Reference

#include <mesh.h>

Class Description

Represents Texture Coordinates (UVs) in the mesh.

A Mesh object may or may not have Texture Coordinates. If a mesh does have TCs, you can access them via Mesh::TriangleVertexTC or Mesh::QuadVertexTC. Although TCs are associated with particular Vertices, they are not part of the Vertex object. This is because a single Vertex may have more different TCs associated with each face that includes the Vertex.

+ Examples:

Definition at line 147 of file mesh.h.

Public Member Functions

 TC (void)
 
 TC (float fU, float fV)
 
bool operator== (const TC &a) const
 
bool operator!= (const TC &a) const
 
TC operator+ (const TC &a) const
 
TC operator- (const TC &a) const
 
TC operator* (float f) const
 
TC operator/ (float f) const
 
TCoperator+= (const TC &a)
 
TCoperator-= (const TC &a)
 
TCoperator*= (float f)
 
TCoperator/= (float f)
 
 operator bool (void) const throw ()
 
 operator Vector (void) const throw ()
 
 operator const float * (void) const
 
void Normalize (void)
 
float Length (void)
 

Public Attributes

union {
   float   m_fU
 
   float   u
 
}; 
 
union {
   float   m_fV
 
   float   v
 
}; 
 

Constructor & Destructor Documentation

TC ( void  )
inline

Definition at line 149 of file mesh.h.

149 {m_fU = m_fV = 0.0f;};
float m_fV
Definition: mesh.h:173
float m_fU
Definition: mesh.h:168
TC ( float  fU,
float  fV 
)
inline

Definition at line 150 of file mesh.h.

150 { m_fU = fU; m_fV = fV; };
float m_fV
Definition: mesh.h:173
float m_fU
Definition: mesh.h:168

Member Function Documentation

bool operator== ( const TC a) const
inline

Definition at line 151 of file mesh.h.

151 { return m_fU == a.m_fU && m_fV == a.m_fV; };
float m_fV
Definition: mesh.h:173
GLubyte GLubyte GLubyte a
Definition: GLee.h:5404
float m_fU
Definition: mesh.h:168
bool operator!= ( const TC a) const
inline

Definition at line 152 of file mesh.h.

152 { return !operator==( a ); };
bool operator==(const TC &a) const
Definition: mesh.h:151
GLubyte GLubyte GLubyte a
Definition: GLee.h:5404
TC operator+ ( const TC a) const
inline

Definition at line 153 of file mesh.h.

153 { return TC( m_fU + a.m_fU, m_fV + a.m_fV ); };
TC(void)
Definition: mesh.h:149
float m_fV
Definition: mesh.h:173
GLubyte GLubyte GLubyte a
Definition: GLee.h:5404
float m_fU
Definition: mesh.h:168
TC operator- ( const TC a) const
inline

Definition at line 154 of file mesh.h.

154 { return TC( m_fU - a.m_fU, m_fV - a.m_fV ); };
TC(void)
Definition: mesh.h:149
float m_fV
Definition: mesh.h:173
GLubyte GLubyte GLubyte a
Definition: GLee.h:5404
float m_fU
Definition: mesh.h:168
TC operator* ( float  f) const
inline

Definition at line 155 of file mesh.h.

155 { return TC( m_fU * f, m_fV * f ); };
TC(void)
Definition: mesh.h:149
float m_fV
Definition: mesh.h:173
GLclampf f
Definition: GLee.h:9303
float m_fU
Definition: mesh.h:168
TC operator/ ( float  f) const
inline

Definition at line 156 of file mesh.h.

156 { f = 1.0f/f; return TC( m_fU * f, m_fV * f ); };
TC(void)
Definition: mesh.h:149
float m_fV
Definition: mesh.h:173
GLclampf f
Definition: GLee.h:9303
float m_fU
Definition: mesh.h:168
TC& operator+= ( const TC a)
inline

Definition at line 157 of file mesh.h.

157 { m_fU += a.m_fU, m_fV += a.m_fV; return *this; };
float m_fV
Definition: mesh.h:173
GLubyte GLubyte GLubyte a
Definition: GLee.h:5404
float m_fU
Definition: mesh.h:168
TC& operator-= ( const TC a)
inline

Definition at line 158 of file mesh.h.

158 { m_fU -= a.m_fU, m_fV -= a.m_fV; return *this; };
float m_fV
Definition: mesh.h:173
GLubyte GLubyte GLubyte a
Definition: GLee.h:5404
float m_fU
Definition: mesh.h:168
TC& operator*= ( float  f)
inline

Definition at line 159 of file mesh.h.

159 { m_fU *= f, m_fV *= f; return *this; };
float m_fV
Definition: mesh.h:173
GLclampf f
Definition: GLee.h:9303
float m_fU
Definition: mesh.h:168
TC& operator/= ( float  f)
inline

Definition at line 160 of file mesh.h.

160 { f = 1.0f/f; m_fU *= f, m_fV *= f; return *this; };
float m_fV
Definition: mesh.h:173
GLclampf f
Definition: GLee.h:9303
float m_fU
Definition: mesh.h:168
operator bool ( void  ) const
throw (
)
inline

Definition at line 161 of file mesh.h.

161 { return m_fU || m_fV; };
float m_fV
Definition: mesh.h:173
float m_fU
Definition: mesh.h:168
operator Vector ( void  ) const
throw (
)
inline

Definition at line 162 of file mesh.h.

162 { return Vector( m_fU, m_fV, 0 ); };
float m_fV
Definition: mesh.h:173
float m_fU
Definition: mesh.h:168
operator const float * ( void  ) const
inline

Definition at line 163 of file mesh.h.

163 { return &u; };
float u
Definition: mesh.h:169
void Normalize ( void  )
float Length ( void  )

Member Data Documentation

float m_fU

Definition at line 168 of file mesh.h.

float u

Definition at line 169 of file mesh.h.

union { ... }
float m_fV

Definition at line 173 of file mesh.h.

float v

Definition at line 174 of file mesh.h.

union { ... }

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