Class that constructs mesh information of a given mesh name. More...
#include <CCPUMeshSurfaceEmitter.h>
Public Types | |
enum | MeshSurfaceDistribution { MSD_HOMOGENEOUS, MSD_HETEROGENEOUS_1, MSD_HETEROGENEOUS_2, MSD_VERTEX, MSD_EDGE } |
Defining several methods to emit particles on the mesh surface. More... | |
Public Member Functions | |
MeshInfo (const std::string &meshName, const MeshSurfaceDistribution distribution=MSD_HOMOGENEOUS, const Quaternion &orientation=Quaternion(), const Vec3 &scale=Vec3::ZERO) | |
Constructor. More... | |
MeshInfo ( var meshName, var MSD_HOMOGENEOUS, var ZERO) | |
Constructor. More... | |
MeshInfo ( local meshName, local MSD_HOMOGENEOUS, local ZERO) | |
Constructor. More... | |
~MeshInfo (void) | |
Destructor. More... | |
float | getGaussianRandom (float high, float cutoff=4) |
Generate a random number. More... | |
const PUTriangle & | getTriangle (size_t triangleIndex) |
Retrieve vertex info. More... | |
local | getTriangle ( local triangleIndex) |
Retrieve vertex info. More... | |
const size_t | getRandomTriangleIndex (void) |
Get a random triangle (index) from the mesh. More... | |
size_t | getTriangleCount () const |
Get triangle number. More... | |
const PUTriangle::PositionAndNormal | getRandomPositionAndNormal (const size_t triangleIndex) |
Returns both a random point on a given triangle and its normal vector. More... | |
local | getRandomPositionAndNormal ( local triangleIndex) |
Returns both a random point on a given triangle and its normal vector. More... | |
Protected Attributes | |
Triangles | _triangles |
MeshSurfaceDistribution | mDistribution |
var | mDistribution |
local | 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 |
Defining several methods to emit particles on the mesh surface.
Enumerator | |
---|---|
MSD_HOMOGENEOUS | |
MSD_HETEROGENEOUS_1 | |
MSD_HETEROGENEOUS_2 | |
MSD_VERTEX | |
MSD_EDGE |
local MeshSurfaceDistribution |
Defining several methods to emit particles on the mesh surface.
Enumerator | |
---|---|
MSD_HOMOGENEOUS | |
MSD_HETEROGENEOUS_1 | |
MSD_HETEROGENEOUS_2 | |
MSD_VERTEX | |
MSD_EDGE |
MeshInfo | ( | const std::string & | meshName, |
const MeshSurfaceDistribution | distribution = MSD_HOMOGENEOUS , |
||
const Quaternion & | orientation = Quaternion() , |
||
const Vec3 & | scale = Vec3::ZERO |
||
) |
Constructor.
var MeshInfo | ( | var | meshName, |
var | distribution = MSD_HOMOGENEOUS , |
||
var | orientation = Quaternion() , |
||
var | scale = Vec3::ZERO |
||
) |
Constructor.
local MeshInfo | ( | local | meshName, |
local | distribution = MSD_HOMOGENEOUS , |
||
local | orientation = Quaternion() , |
||
local | scale = Vec3::ZERO |
||
) |
Constructor.
~MeshInfo | ( | void | ) |
Destructor.
var ~MeshInfo | ( | ) |
Destructor.
local ~MeshInfo | ( | ) |
Destructor.
float getGaussianRandom | ( | float | high, |
float | cutoff = 4 |
||
) |
Generate a random number.
The ´high?argument determines that numbers are returned between [0..high]
var getGaussianRandom | ( | var | high, |
var | cutoff = 4 |
||
) |
Generate a random number.
The ´high?argument determines that numbers are returned between [0..high]
local getGaussianRandom | ( | local | high, |
local | cutoff = 4 |
||
) |
Generate a random number.
The ´high?argument determines that numbers are returned between [0..high]
const PUTriangle::PositionAndNormal 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.
var getRandomPositionAndNormal | ( | var | 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.
local getRandomPositionAndNormal | ( | local | 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 getRandomTriangleIndex | ( | void | ) |
Get a random triangle (index) from the mesh.
var getRandomTriangleIndex | ( | ) |
Get a random triangle (index) from the mesh.
local getRandomTriangleIndex | ( | ) |
Get a random triangle (index) from the mesh.
const PUTriangle& getTriangle | ( | size_t | triangleIndex | ) |
Retrieve vertex info.
Get a triangle based on the index.
var getTriangle | ( | var | triangleIndex | ) |
Retrieve vertex info.
Get a triangle based on the index.
local getTriangle | ( | local | triangleIndex | ) |
Retrieve vertex info.
Get a triangle based on the index.
|
inline |
Get triangle number.
|
inline |
Get triangle number.
|
inline |
Get triangle number.
|
protected |
|
protected |
|
protected |
|
protected |