Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GFXVertex Struct Reference

Vertex, Normal, Texture, and (deprecated) Environment Mapping T2F_N3F_V3F format. More...

#include <gfxlib_struct.h>

Public Member Functions

 GFXVertex ()
 
 GFXVertex (const QVector &vert, const Vector &norm, float s, float t)
 
 GFXVertex (const Vector &vert, const Vector &norm, float s, float t)
 
 GFXVertex (float x, float y, float z, float i, float j, float k, float s, float t)
 
GFXVertexSetTexCoord (float s, float t)
 
GFXVertexSetNormal (const Vector &norm)
 
GFXVertexSetVertex (const Vector &vert)
 
GFXVertexSetTangent (const Vector &tgt, float parity=1.f)
 
Vector GetVertex () const
 
const VectorGetConstVertex () const
 
Vector GetNormal () const
 
Vector GetPosition () const
 
Vector GetTangent () const
 
float GetTangentParity () const
 

Public Attributes

float s
 
float t
 
float i
 
float j
 
float k
 
float x
 
float y
 
float z
 
float tx
 
float ty
 
float tz
 
float tw
 

Detailed Description

Vertex, Normal, Texture, and (deprecated) Environment Mapping T2F_N3F_V3F format.

Definition at line 49 of file gfxlib_struct.h.

Constructor & Destructor Documentation

GFXVertex::GFXVertex ( )
inline

Definition at line 71 of file gfxlib_struct.h.

71 {}
GFXVertex::GFXVertex ( const QVector vert,
const Vector norm,
float  s,
float  t 
)
inline

Definition at line 72 of file gfxlib_struct.h.

References SetNormal(), SetTexCoord(), and SetVertex().

73  {
74  SetVertex( vert.Cast() );
75  SetNormal( norm );
76  SetTexCoord( s, t );
77  }
GFXVertex::GFXVertex ( const Vector vert,
const Vector norm,
float  s,
float  t 
)
inline

Definition at line 78 of file gfxlib_struct.h.

References SetNormal(), SetTexCoord(), and SetVertex().

79  {
80  SetVertex( vert );
81  SetNormal( norm );
82  SetTexCoord( s, t );
83  }
GFXVertex::GFXVertex ( float  x,
float  y,
float  z,
float  i,
float  j,
float  k,
float  s,
float  t 
)
inline

Definition at line 84 of file gfxlib_struct.h.

References i, j, k, s, t, x, y, and z.

85  {
86  this->x = x;
87  this->y = y;
88  this->z = z;
89  this->i = i;
90  this->j = j;
91  this->k = k;
92  this->s = s;
93  this->t = t;
94  }

Member Function Documentation

const Vector& GFXVertex::GetConstVertex ( ) const
inline

Definition at line 127 of file gfxlib_struct.h.

References Vector, and x.

Referenced by quadsquare::RecomputeErrorAndLighting().

128  {
129  return *( (Vector*) &x );
130  }
Vector GFXVertex::GetNormal ( ) const
inline

Definition at line 131 of file gfxlib_struct.h.

References i, j, k, and Vector.

Referenced by NormalizeNormals(), and GFXVertexList::RenormalizeNormals().

132  {
133  return Vector( i, j, k );
134  }
Vector GFXVertex::GetPosition ( ) const
inline

Definition at line 135 of file gfxlib_struct.h.

References Vector, x, y, and z.

Referenced by GFXSphereVertexList::ProceduralModification().

136  {
137  return Vector( x, y, z );
138  }
Vector GFXVertex::GetTangent ( ) const
inline

Definition at line 139 of file gfxlib_struct.h.

References tx, ty, tz, and Vector.

140  {
141  return Vector( tx, ty, tz );
142  }
float GFXVertex::GetTangentParity ( ) const
inline

Definition at line 143 of file gfxlib_struct.h.

References tw.

144  {
145  return tw;
146  }
Vector GFXVertex::GetVertex ( ) const
inline

Definition at line 123 of file gfxlib_struct.h.

References Vector, x, y, and z.

124  {
125  return Vector( x, y, z );
126  }
GFXVertex& GFXVertex::SetNormal ( const Vector norm)
inline

Definition at line 101 of file gfxlib_struct.h.

References i, j, and k.

Referenced by GFXVertex(), quadsquare::quadsquare(), quadsquare::RecomputeErrorAndLighting(), and GFXVertexList::RenormalizeNormals().

102  {
103  i = norm.i;
104  j = norm.j;
105  k = norm.k;
106  return *this;
107  }
GFXVertex& GFXVertex::SetTangent ( const Vector tgt,
float  parity = 1.f 
)
inline

Definition at line 115 of file gfxlib_struct.h.

References tw, tx, ty, and tz.

116  {
117  tx = tgt.x;
118  ty = tgt.y;
119  tz = tgt.z;
120  tw = parity;
121  return *this;
122  }
GFXVertex& GFXVertex::SetTexCoord ( float  s,
float  t 
)
inline

Definition at line 95 of file gfxlib_struct.h.

References s, and t.

Referenced by GFXVertex().

96  {
97  this->s = s;
98  this->t = t;
99  return *this;
100  }
GFXVertex& GFXVertex::SetVertex ( const Vector vert)
inline

Definition at line 108 of file gfxlib_struct.h.

References x, y, and z.

Referenced by GFXVertex(), and GFXSphereVertexList::ProceduralModification().

109  {
110  x = vert.i;
111  y = vert.j;
112  z = vert.k;
113  return *this;
114  }

Member Data Documentation


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