|
ParticleAPI 3.0.0
Performant particle system API in C++ for interactive graphics
|
A Triangle. More...
#include <pDomain.h>
Public Member Functions | |
| PDTriangle (const pVec &p0, const pVec &p1, const pVec &p2) | |
| void | PDTriangle_Cons (const pVec &p0, const pVec &p1, const pVec &p2) |
| bool | Within (const pVec &pos) const |
| Returns true for points within epsilon of the triangle. More... | |
| pVec | Generate () const |
| Returns a random point in the triangle. More... | |
| float | Size () const |
| Returns the size of the domain (length, area, or volume). More... | |
| std::shared_ptr< pDomain > | copy () const |
| virtual bool | Within (const pVec &) const =0 |
| Returns true if the given point is within the domain. More... | |
| virtual pVec | Generate () const =0 |
| Returns a random point in the domain. More... | |
| virtual float | Size () const =0 |
| Returns the size of the domain (length, area, or volume). More... | |
| virtual std::shared_ptr< pDomain > | copy () const =0 |
Public Attributes | |
| pVec | p |
| pVec | u |
| pVec | v |
| pVec | uNrm |
| pVec | vNrm |
| pVec | nrm |
| pVec | s1 |
| pVec | s2 |
| float | uLen |
| float | vLen |
| float | D |
| float | area |
Public Attributes inherited from pDomain | |
| pDomainType_E | Which |
A Triangle.
p0, p1, and p2 are the vertices of the triangle. The triangle can be used to define an arbitrary geometrical model for particles to bounce off, or generate particles on its surface (and explode them), etc.
Generate returns a random point in the triangle. Within returns true for points within epsilon of the triangle. Currently it is not possible to sink particles that enter/exit a polygonal model. Suggestions?
|
inline |
|
inlinevirtual |
Returns the size of the domain (length, area, or volume).
Implements pDomain.
|
inlinevirtual |
Returns true for points within epsilon of the triangle.
Implements pDomain.
| float area |
| float D |
| pVec nrm |
| pVec p |
| pVec s1 |
| pVec s2 |
| pVec u |
| float uLen |
| pVec uNrm |
| pVec v |
| float vLen |
| pVec vNrm |