Fluxus::BlobbyPrimitive Class Reference

#include <BlobbyPrimitive.h>

Inheritance diagram for Fluxus::BlobbyPrimitive:

Inheritance graph
[legend]
Collaboration diagram for Fluxus::BlobbyPrimitive:

Collaboration graph
[legend]

Public Member Functions

 BlobbyPrimitive (int dimx, int dimy, int dimz, dVector size)
 BlobbyPrimitive (const BlobbyPrimitive &other)
virtual ~BlobbyPrimitive ()
virtual void AddInfluence (const dVector &Vert, float Strength)
void ConvertToPoly (PolyPrimitive &poly, float isolevel=1.0f)
Primitive Interface
virtual BlobbyPrimitiveClone () const
virtual void Render ()
virtual dBoundingBox GetBoundingBox ()
virtual void RecalculateNormals (bool smooth)
 Only makes sense for certain primitive types.
virtual void ApplyTransform (bool ScaleRotOnly=false)
virtual string GetTypeName ()
 This needs to be set appropriately for all derived types.

Protected Member Functions

void Draw (float isolevel, bool calcnormals, bool colour)
void Interpolate (dVertex &vert, float isolevel, int cell, int a, int b)
float Sample (const dVector &pos)
float SampleCol (const dVector &pos, dColour &col)
virtual void PDataDirty ()
 Called when a named pdata mapping changes.

Protected Attributes

vector< dVector > * m_PosData
vector< float > * m_StrengthData
vector< dColour > * m_ColData
vector< Cellm_Voxels

Data Structures

class  Cell
class  Triangle

Detailed Description

The BlobbyPrimitive is an implicit surface generated by defining spherical influences which are summed, and meshed to give a smooth polygonal surface.

Definition at line 33 of file BlobbyPrimitive.h.


Constructor & Destructor Documentation

BlobbyPrimitive::BlobbyPrimitive ( int  dimx,
int  dimy,
int  dimz,
dVector  size 
)

Definition at line 24 of file BlobbyPrimitive.cpp.

BlobbyPrimitive::BlobbyPrimitive ( const BlobbyPrimitive other  ) 

Definition at line 70 of file BlobbyPrimitive.cpp.

BlobbyPrimitive::~BlobbyPrimitive (  )  [virtual]

Definition at line 82 of file BlobbyPrimitive.cpp.


Member Function Documentation

BlobbyPrimitive * BlobbyPrimitive::Clone (  )  const [virtual]

Implements Fluxus::Primitive.

Definition at line 77 of file BlobbyPrimitive.cpp.

void BlobbyPrimitive::Render (  )  [virtual]

Implements Fluxus::Primitive.

Definition at line 138 of file BlobbyPrimitive.cpp.

dBoundingBox BlobbyPrimitive::GetBoundingBox (  )  [virtual]

Implements Fluxus::Primitive.

Definition at line 184 of file BlobbyPrimitive.cpp.

void BlobbyPrimitive::RecalculateNormals ( bool  smooth  )  [virtual]

Only makes sense for certain primitive types.

Reimplemented from Fluxus::Primitive.

Definition at line 179 of file BlobbyPrimitive.cpp.

void BlobbyPrimitive::ApplyTransform ( bool  ScaleRotOnly = false  )  [virtual]

Implements Fluxus::Primitive.

Definition at line 194 of file BlobbyPrimitive.cpp.

virtual string Fluxus::BlobbyPrimitive::GetTypeName (  )  [inline, virtual]

This needs to be set appropriately for all derived types.

Reimplemented from Fluxus::Primitive.

Definition at line 49 of file BlobbyPrimitive.h.

void BlobbyPrimitive::AddInfluence ( const dVector Vert,
float  Strength 
) [virtual]

Add a new influence at this position, and uses the vertex colour as the blob's colour, which will be blended too. The strength corresponds to the size of the 'blob'.

Definition at line 94 of file BlobbyPrimitive.cpp.

void BlobbyPrimitive::ConvertToPoly ( PolyPrimitive poly,
float  isolevel = 1.0f 
)

Fills supplied polygon primitive with the mesh (needs to be an empty triangle list)

Definition at line 310 of file BlobbyPrimitive.cpp.

void BlobbyPrimitive::Draw ( float  isolevel,
bool  calcnormals,
bool  colour 
) [protected]

Definition at line 218 of file BlobbyPrimitive.cpp.

void BlobbyPrimitive::Interpolate ( dVertex vert,
float  isolevel,
int  cell,
int  a,
int  b 
) [protected]

Definition at line 406 of file BlobbyPrimitive.cpp.

float BlobbyPrimitive::Sample ( const dVector pos  )  [protected]

Definition at line 101 of file BlobbyPrimitive.cpp.

float BlobbyPrimitive::SampleCol ( const dVector pos,
dColour col 
) [protected]

Definition at line 115 of file BlobbyPrimitive.cpp.

void BlobbyPrimitive::PDataDirty (  )  [protected, virtual]

Called when a named pdata mapping changes.

Implements Fluxus::PDataContainer.

Definition at line 86 of file BlobbyPrimitive.cpp.


Field Documentation

vector<dVector>* Fluxus::BlobbyPrimitive::m_PosData [protected]

Definition at line 83 of file BlobbyPrimitive.h.

vector<float>* Fluxus::BlobbyPrimitive::m_StrengthData [protected]

Definition at line 84 of file BlobbyPrimitive.h.

vector<dColour>* Fluxus::BlobbyPrimitive::m_ColData [protected]

Definition at line 85 of file BlobbyPrimitive.h.

vector<Cell> Fluxus::BlobbyPrimitive::m_Voxels [protected]

Definition at line 87 of file BlobbyPrimitive.h.


The documentation for this class was generated from the following files:
Generated on Tue Sep 4 23:22:39 2007 for The Fluxus Renderer (libfluxus) by  doxygen 1.5.1