|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CPSUtil Struct ReferenceThis struct contains utility functions used by the particle system.
More...
#include <ps_util.h>
List of all members.
Static Public Methods |
void | registerSerialParticleSystem (void) |
| register the classes of the system mus be called when serializing. More...
|
void | displayBBox (NL3D::IDriver *driver, const NLMISC::CAABBox &box, NLMISC::CRGBA col=NLMISC::CRGBA::White) |
| this draw a bounding box. More...
|
void | displaySphere (NL3D::IDriver &driver, float radius, const NLMISC::CVector ¢er, uint nbSubdiv=4, NLMISC::CRGBA color=NLMISC::CRGBA::White) |
| draw a sphere. More...
|
void | displayDisc (NL3D::IDriver &driver, float radius, const NLMISC::CVector ¢er, const NLMISC::CMatrix &mat, uint nbSubdiv=32, NLMISC::CRGBA color=NLMISC::CRGBA::White) |
| draw a disc (not filled). More...
|
void | displayCylinder (NL3D::IDriver &driver, const NLMISC::CVector ¢er, const NLMISC::CMatrix &mat, const NLMISC::CVector &dim, uint nbSubdiv=32, NLMISC::CRGBA color=NLMISC::CRGBA::White) |
| draw a cylinder (not filled). More...
|
void | display3DQuad (NL3D::IDriver &driver, const NLMISC::CVector &c1, const NLMISC::CVector &c2,const NLMISC::CVector &c3, const NLMISC::CVector &c4, NLMISC::CRGBA color=NLMISC::CRGBA::White) |
| display a 3d quad in wireline, by using the 4 gicen corners. More...
|
void | addRadiusToAABBox (NLMISC::CAABBox &box, float radius) |
| enlarge a bounding box by the specified radius. More...
|
void | displayBasis (NL3D::IDriver *driver, const NLMISC::CMatrix &modelMat, const NLMISC::CMatrix &m, float size, CFontGenerator &fg, CFontManager &fm) |
| display a basis using the given matrix. The model matrix must be restored after this call. More...
|
void | displayArrow (NL3D::IDriver *driver, const NLMISC::CVector &start, const NLMISC::CVector &v, float size, NLMISC::CRGBA col1, NLMISC::CRGBA col2) |
| display an arrow (the same that is used with displayBasis) The user must setup the model matrix himself. More...
|
void | print (NL3D::IDriver *driver, const std::string &text, CFontGenerator &fg, CFontManager &fm, const NLMISC::CVector &pos, float size) |
| display a string at the given position. The model matrix must be restored after this call. More...
|
void | buildSchmidtBasis (const NLMISC::CVector &v, NLMISC::CMatrix &dest) |
| build a basis from a vector using Schmidt orthogonalization method. More...
|
float | getCos (sint32 angle) |
| get a cosine from the fast cosine table (which must be have initialised with initFastCosNSinTable). More...
|
float | getSin (sint32 angle) |
| get a cosine from the fast cosine table (which must be have initialised with initFastCosNSinTable). More...
|
void | initFastCosNSinTable (void) |
| Init the table for cosine and sinus lookup. More...
|
float | buildPerlinNoise (NLMISC::CVector &pos, uint nbOctaves) |
| compute a perlin noise value, that will range from [0 to 1] The first octave has the unit size. More...
|
void | initPerlinNoiseTable (void) |
| init the table used by perlin noise. More...
|
Static Private Methods |
void | registerForces () |
void | registerParticles () |
void | registerEmitters () |
void | registerZones () |
void | registerAttribs () |
float | getInterpolatedNoise (const NLMISC::CVector &pos) |
float | getPerlinNoise (uint x, uint y, uint z) |
Static Private Attributes |
bool | _CosTableInitialized = false |
bool | _PerlinNoiseTableInitialized = false |
float | _CosTable [256] |
float | _SinTable [256] |
float | _PerlinNoiseTab [1024] |
Detailed Description
This struct contains utility functions used by the particle system.
-
Author:
-
Nicolas Vizerie , Nevrax France
-
Date:
-
2001
Definition at line 57 of file ps_util.h.
Member Function Documentation
void NL3D::CPSUtil::addRadiusToAABBox |
( |
NLMISC::CAABBox & |
box, |
|
|
float |
radius |
|
) |
[inline, static] |
|
float NL3D::CPSUtil::buildPerlinNoise |
( |
NLMISC::CVector & |
pos, |
|
|
uint |
nbOctaves |
|
) |
[inline, static] |
|
|
build a basis from a vector using Schmidt orthogonalization method.
-
Parameters:
-
v |
K axis in the resulting basis |
dest |
The matrix containing the result. Only the rotation part is modified |
Definition at line 254 of file ps_util.cpp.
References NLMISC::CMatrix::setRot.
Referenced by displayArrow. |
|
display a 3d quad in wireline, by using the 4 gicen corners.
Definition at line 380 of file ps_util.cpp. |
|
display an arrow (the same that is used with displayBasis) The user must setup the model matrix himself.
-
Parameters:
-
driver |
the driver used for rendering |
start |
start point of the arrow |
v |
direction of the arrow |
size |
size of the arrow (will be drawn as size * v) |
col1 |
color of the arrow start |
col2 |
color of the arrow end |
Definition at line 166 of file ps_util.cpp.
References buildSchmidtBasis, and v.
Referenced by displayBasis. |
|
draw a cylinder (not filled).
-
Parameters:
-
dim |
dimension of the cylinder along each axis, packed in a vector |
Definition at line 348 of file ps_util.cpp. |
|
draw a disc (not filled).
-
Parameters:
-
mat |
: a matrix, whose K vector is normal to the plane containing the disc |
Definition at line 329 of file ps_util.cpp. |
float NL3D::CPSUtil::getCos |
( |
sint32 |
angle |
) |
[inline, static] |
|
|
get a cosine from the fast cosine table (which must be have initialised with initFastCosNSinTable).
256 <=> 2 Pi
Definition at line 121 of file ps_util.h.
References nlassert. |
float NL3D::CPSUtil::getInterpolatedNoise |
( |
const NLMISC::CVector & |
pos |
) |
[inline, static, private] |
|
float NL3D::CPSUtil::getPerlinNoise |
( |
uint |
x, |
|
|
uint |
y, |
|
|
uint |
z |
|
) |
[inline, static, private] |
|
float NL3D::CPSUtil::getSin |
( |
sint32 |
angle |
) |
[inline, static] |
|
|
get a cosine from the fast cosine table (which must be have initialised with initFastCosNSinTable).
256 <=> 2 Pi
Definition at line 130 of file ps_util.h.
References nlassert. |
void NL3D::CPSUtil::initFastCosNSinTable |
( |
void |
|
) |
[static] |
|
void NL3D::CPSUtil::initPerlinNoiseTable |
( |
void |
|
) |
[static] |
|
|
display a string at the given position. The model matrix must be restored after this call.
Definition at line 232 of file ps_util.cpp.
References nlassert. |
void NL3D::CPSUtil::registerAttribs |
( |
|
) |
[static, private] |
|
void NL3D::CPSUtil::registerEmitters |
( |
|
) |
[static, private] |
|
void NL3D::CPSUtil::registerForces |
( |
|
) |
[static, private] |
|
void NL3D::CPSUtil::registerParticles |
( |
|
) |
[static, private] |
|
void NL3D::CPSUtil::registerSerialParticleSystem |
( |
void |
|
) |
[static] |
|
void NL3D::CPSUtil::registerZones |
( |
|
) |
[static, private] |
|
Member Data Documentation
float NL3D::CPSUtil::_CosTable [static, private]
|
|
bool NL3D::CPSUtil::_CosTableInitialized = false [static, private]
|
|
float NL3D::CPSUtil::_PerlinNoiseTab [static, private]
|
|
bool NL3D::CPSUtil::_PerlinNoiseTableInitialized = false [static, private]
|
|
float NL3D::CPSUtil::_SinTable [static, private]
|
|
The documentation for this struct was generated from the following files:
|
|