Particle Universe
1.2
|
#include <ParticleUniverseMeshSurfaceEmitter.h>
Public Types | |
enum | MeshSurfaceDistribution { MSD_HOMOGENEOUS, MSD_HETEROGENEOUS_1, MSD_HETEROGENEOUS_2, MSD_VERTEX, MSD_EDGE } |
Public Member Functions | |
MeshInfo (const String &meshName, const MeshSurfaceDistribution distribution=MSD_HOMOGENEOUS, const Quaternion &orientation=Quaternion::IDENTITY, const Vector3 &scale=Vector3::ZERO) | |
~MeshInfo (void) | |
Real | getGaussianRandom (Real high, Real cutoff=4) |
void | getMeshInformation (Ogre::MeshPtr mesh, const Vector3 &position=Vector3::ZERO, const Quaternion &orient=Quaternion::IDENTITY, const Vector3 &scale=Vector3::UNIT_SCALE) |
const Triangle & | getTriangle (size_t triangleIndex) |
const size_t | getRandomTriangleIndex (void) |
const Triangle::PositionAndNormal | getRandomPositionAndNormal (const size_t triangleIndex) |
Protected Attributes | |
Triangles | _triangles |
MeshSurfaceDistribution | mDistribution |
Class that constructs mesh information of a given mesh name
Defining several methods to emit particles on the mesh surface
Enumerator | |
---|---|
MSD_HOMOGENEOUS | |
MSD_HETEROGENEOUS_1 | |
MSD_HETEROGENEOUS_2 | |
MSD_VERTEX | |
MSD_EDGE |
ParticleUniverse::MeshInfo::MeshInfo | ( | const String & | meshName, |
const MeshSurfaceDistribution | distribution = MSD_HOMOGENEOUS , |
||
const Quaternion & | orientation = Quaternion::IDENTITY , |
||
const Vector3 & | scale = Vector3::ZERO |
||
) |
Constructor
ParticleUniverse::MeshInfo::~MeshInfo | ( | void | ) |
Destructor
Generate a random number. The ´high´ argument determines that numbers are returned between [0..high]
void ParticleUniverse::MeshInfo::getMeshInformation | ( | Ogre::MeshPtr | mesh, |
const Vector3 & | position = Vector3::ZERO , |
||
const Quaternion & | orient = Quaternion::IDENTITY , |
||
const Vector3 & | scale = Vector3::UNIT_SCALE |
||
) |
Retrieve vertex info
const Triangle::PositionAndNormal ParticleUniverse::MeshInfo::getRandomPositionAndNormal | ( | const size_t | triangleIndex | ) |
Returns both a random point on a given triangle and its normal vector. How the random point and the normal are determined depends on the distribution type.
const size_t ParticleUniverse::MeshInfo::getRandomTriangleIndex | ( | void | ) |
Get a random triangle (index) from the mesh.
const Triangle& ParticleUniverse::MeshInfo::getTriangle | ( | size_t | triangleIndex | ) |
Get a triangle based on the index.
|
protected |
|
protected |