ParticleAPI 3.0.0
Performant particle system API in C++ for interactive graphics
Public Member Functions | Public Attributes | List of all members
PDPlane Struct Reference

Arbitrarily-oriented plane. More...

#include <pDomain.h>

Inheritance diagram for PDPlane:
pDomain

Public Member Functions

 PDPlane (const pVec &p0, const pVec &Normal)
 
void PDPlane_Cons (const pVec &p0, const pVec &Normal)
 
bool Within (const pVec &pos) const
 Returns true if the point is in the positive half-space of the plane (in the plane or on the side that Normal points to). More...
 
pVec Generate () const
 Returns the point p0. More...
 
float Size () const
 Returns the size of the domain (length, area, or volume). More...
 
std::shared_ptr< pDomaincopy () 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< pDomaincopy () const =0
 

Public Attributes

pVec p
 
pVec nrm
 
float D
 
- Public Attributes inherited from pDomain
pDomainType_E Which
 

Detailed Description

Arbitrarily-oriented plane.

The point p0 is a point on the plane. Normal is the normal vector of the plane. If you have a plane in a,b,c,d form remember that n = [a,b,c] and you can compute a suitable point p0 as p0 = -n*d. The normal will get normalized, so it need not already be unit length.

Generate returns the point p0. Within returns true if the point is in the positive half-space of the plane (in the plane or on the side that Normal points to).

Constructor & Destructor Documentation

◆ PDPlane()

PDPlane ( const pVec p0,
const pVec Normal 
)
inline

Member Function Documentation

◆ copy()

std::shared_ptr< pDomain > copy ( ) const
inlinevirtual

Implements pDomain.

◆ Generate()

pVec Generate ( ) const
inlinevirtual

Returns the point p0.

Implements pDomain.

◆ PDPlane_Cons()

void PDPlane_Cons ( const pVec p0,
const pVec Normal 
)
inline

◆ Size()

float Size ( ) const
inlinevirtual

Returns the size of the domain (length, area, or volume).

Implements pDomain.

◆ Within()

bool Within ( const pVec pos) const
inlinevirtual

Returns true if the point is in the positive half-space of the plane (in the plane or on the side that Normal points to).

Implements pDomain.

Member Data Documentation

◆ D

float D

◆ nrm

pVec nrm

◆ p

pVec p

The documentation for this struct was generated from the following file: