#include <BlobbyPrimitive.h>
Inheritance diagram for Fluxus::BlobbyPrimitive:
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 BlobbyPrimitive * | Clone () 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< Cell > | m_Voxels |
Data Structures | |
class | Cell |
class | Triangle |
Definition at line 33 of file BlobbyPrimitive.h.
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.
BlobbyPrimitive * BlobbyPrimitive::Clone | ( | ) | const [virtual] |
void BlobbyPrimitive::Render | ( | ) | [virtual] |
dBoundingBox BlobbyPrimitive::GetBoundingBox | ( | ) | [virtual] |
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] |
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.
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.
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.