PosTrait3f Struct Reference

Inheritance diagram for PosTrait3f:

ParticleTraits

List of all members.

Static Public Member Functions

static void init (Particles *, DrawActionBase *, dataType &data, GeoPositionsPtr &pos)
static bool particle (dataType &data, UInt32 particle)
static Pnt3fposition (dataType &data)
static void vertex (dataType &data, UInt32, Vec4f &dir, Real32 s)
static void vertex (dataType &data)

Classes

struct  dataType


Detailed Description

Definition at line 746 of file OSGParticles.cpp.


Member Function Documentation

static void PosTrait3f::init ( Particles ,
DrawActionBase ,
dataType data,
GeoPositionsPtr pos 
) [inline, static]

Definition at line 755 of file OSGParticles.cpp.

References osg::FCPtr< BasePtrTypeT, FieldContainerTypeT >::dcast(), and PosTrait3f::dataType::pos.

00757     {
00758         GeoPositions3fPtr pos3f = GeoPositions3fPtr::dcast(pos);
00759  
00760         data.pos  = pos3f->getFieldPtr();
00761     }

static bool PosTrait3f::particle ( dataType data,
UInt32  particle 
) [inline, static]

Definition at line 763 of file OSGParticles.cpp.

References PosTrait3f::dataType::p, and PosTrait3f::dataType::pos.

00764     {
00765         data.p = & (*(data.pos))[particle];
00766         return false;
00767     }

static Pnt3f& PosTrait3f::position ( dataType data  )  [inline, static]

Definition at line 769 of file OSGParticles.cpp.

References PosTrait3f::dataType::p.

00770     {
00771         return *data.p;
00772     }

static void PosTrait3f::vertex ( dataType data,
UInt32  ,
Vec4f dir,
Real32  s 
) [inline, static]

Definition at line 774 of file OSGParticles.cpp.

References PosTrait3f::dataType::p.

00775     {
00776         glVertex3f( (*data.p)[0] + dir[0] * s, 
00777                     (*data.p)[1] + dir[1] * s, 
00778                     (*data.p)[2] + dir[2] * s);             
00779     }

static void PosTrait3f::vertex ( dataType data  )  [inline, static]

Definition at line 781 of file OSGParticles.cpp.

References PosTrait3f::dataType::p.

00782     {
00783         glVertex3fv( (GLfloat*) (*data.p).getValues() );             
00784     }


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

Generated on Mon Mar 17 12:02:59 2008 for OpenSG by  doxygen 1.5.5