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
GFXColorVertex Struct Reference

This vertex is used for the interleaved array argument for color based arrays T2F_C4F_N3F_V3F. More...

#include <gfxlib_struct.h>

Public Member Functions

 GFXColorVertex ()
 
 GFXColorVertex (const Vector &vert, const Vector &norm, const GFXColor &rgba, float s, float t)
 
 GFXColorVertex (float x, float y, float z, float i, float j, float k, float r, float g, float b, float a, float s, float t)
 
GFXColorVertexSetTexCoord (float s, float t)
 
GFXColorVertexSetNormal (const Vector &norm)
 
GFXColorVertexSetVertex (const Vector &vert)
 
GFXColorVertexSetColor (const GFXColor &col)
 
GFXColorVertexSetTangent (const Vector &tgt, float parity=1.f)
 
Vector GetNormal () const
 
Vector GetPosition () const
 
void SetVtx (const GFXVertex &vv)
 
Vector GetTangent () const
 
float GetTangentParity () const
 

Public Attributes

float s
 
float t
 
float r
 
float g
 
float b
 
float a
 
float i
 
float j
 
float k
 
float x
 
float y
 
float z
 
float tx
 
float ty
 
float tz
 
float tw
 

Detailed Description

This vertex is used for the interleaved array argument for color based arrays T2F_C4F_N3F_V3F.

Definition at line 212 of file gfxlib_struct.h.

Constructor & Destructor Documentation

GFXColorVertex::GFXColorVertex ( )
inline

Definition at line 240 of file gfxlib_struct.h.

240 {}
GFXColorVertex::GFXColorVertex ( const Vector vert,
const Vector norm,
const GFXColor rgba,
float  s,
float  t 
)
inline

Definition at line 241 of file gfxlib_struct.h.

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

242  {
243  SetVertex( vert );
244  SetNormal( norm );
245  SetColor( rgba );
246  SetTexCoord( s, t );
247  }
GFXColorVertex::GFXColorVertex ( float  x,
float  y,
float  z,
float  i,
float  j,
float  k,
float  r,
float  g,
float  b,
float  a,
float  s,
float  t 
)
inline

Definition at line 248 of file gfxlib_struct.h.

References a, b, g, i, j, k, r, s, t, x, y, and z.

249  {
250  this->x = x;
251  this->y = y;
252  this->z = z;
253  this->i = i;
254  this->j = j;
255  this->k = k;
256  this->r = r;
257  this->g = g;
258  this->b = b;
259  this->a = a;
260  this->s = s;
261  this->t = t;
262  }

Member Function Documentation

Vector GFXColorVertex::GetNormal ( ) const
inline

Definition at line 299 of file gfxlib_struct.h.

References i, j, k, and Vector.

Referenced by GFXVertexList::RenormalizeNormals().

300  {
301  return Vector( i, j, k );
302  }
Vector GFXColorVertex::GetPosition ( ) const
inline

Definition at line 303 of file gfxlib_struct.h.

References Vector, x, y, and z.

304  {
305  return Vector( x, y, z );
306  }
Vector GFXColorVertex::GetTangent ( ) const
inline

Definition at line 319 of file gfxlib_struct.h.

References tx, ty, tz, and Vector.

320  {
321  return Vector( tx, ty, tz );
322  }
float GFXColorVertex::GetTangentParity ( ) const
inline

Definition at line 323 of file gfxlib_struct.h.

References tw.

324  {
325  return tw;
326  }
GFXColorVertex& GFXColorVertex::SetColor ( const GFXColor col)
inline

Definition at line 283 of file gfxlib_struct.h.

References GFXColor::a, a, GFXColor::b, b, GFXColor::g, g, GFXColor::r, and r.

Referenced by GFXColorVertex(), Halo::Halo(), and Halo::SetColor().

284  {
285  r = col.r;
286  g = col.g;
287  b = col.b;
288  a = col.a;
289  return *this;
290  }
GFXColorVertex& GFXColorVertex::SetNormal ( const Vector norm)
inline

Definition at line 269 of file gfxlib_struct.h.

References i, j, and k.

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

270  {
271  i = norm.i;
272  j = norm.j;
273  k = norm.k;
274  return *this;
275  }
GFXColorVertex& GFXColorVertex::SetTangent ( const Vector tgt,
float  parity = 1.f 
)
inline

Definition at line 291 of file gfxlib_struct.h.

References tw, tx, ty, and tz.

292  {
293  tx = tgt.x;
294  ty = tgt.y;
295  tz = tgt.z;
296  tw = parity;
297  return *this;
298  }
GFXColorVertex& GFXColorVertex::SetTexCoord ( float  s,
float  t 
)
inline

Definition at line 263 of file gfxlib_struct.h.

References s, and t.

Referenced by GFXColorVertex().

264  {
265  this->s = s;
266  this->t = t;
267  return *this;
268  }
GFXColorVertex& GFXColorVertex::SetVertex ( const Vector vert)
inline

Definition at line 276 of file gfxlib_struct.h.

References x, y, and z.

Referenced by GFXColorVertex(), and SpriteStarVlist::SpriteStarVlist().

277  {
278  x = vert.i;
279  y = vert.j;
280  z = vert.k;
281  return *this;
282  }
void GFXColorVertex::SetVtx ( const GFXVertex vv)
inline

Definition at line 307 of file gfxlib_struct.h.

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

308  {
309  s = vv.s;
310  t = vv.t;
311  i = vv.i;
312  j = vv.j;
313  k = vv.k;
314  x = vv.x;
315  y = vv.y;
316  z = vv.z;
317  }

Member Data Documentation

float GFXColorVertex::a

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