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

Arbitrarily-oriented disc. More...

#include <pDomain.h>

Inheritance diagram for PDDisc:
pDomain

Public Member Functions

 PDDisc (const pVec &Center, const pVec Normal, const float OuterRadius, const float InnerRadius=0.0f)
 
void PDDisc_Cons (const pVec &Center, const pVec Normal, const float OuterRadius, const float InnerRadius=0.0f)
 
bool Within (const pVec &pos) const
 Returns true for points within epsilon of the disc. More...
 
pVec Generate () const
 Returns a point inside the disc shell. 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
 
pVec u
 
pVec v
 
float radIn
 
float radOut
 
float radInSqr
 
float radOutSqr
 
float dif
 
float D
 
float area
 
- Public Attributes inherited from pDomain
pDomainType_E Which
 

Detailed Description

Arbitrarily-oriented disc.

The point Center is the center of a disc in the plane with normal Normal. The disc has an OuterRadius. If InnerRadius is greater than 0, the domain is a flat washer, rather than a disc. The normal will get normalized, so it need not already be unit length.

Generate returns a point inside the disc shell. Within returns true for points within epsilon of the disc.

Constructor & Destructor Documentation

◆ PDDisc()

PDDisc ( const pVec Center,
const pVec  Normal,
const float  OuterRadius,
const float  InnerRadius = 0.0f 
)
inline

Member Function Documentation

◆ copy()

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

Implements pDomain.

◆ Generate()

pVec Generate ( ) const
inlinevirtual

Returns a point inside the disc shell.

Implements pDomain.

◆ PDDisc_Cons()

void PDDisc_Cons ( const pVec Center,
const pVec  Normal,
const float  OuterRadius,
const float  InnerRadius = 0.0f 
)
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 for points within epsilon of the disc.

Implements pDomain.

Member Data Documentation

◆ area

float area

◆ D

float D

◆ dif

float dif

◆ nrm

pVec nrm

◆ p

pVec p

◆ radIn

float radIn

◆ radInSqr

float radInSqr

◆ radOut

float radOut

◆ radOutSqr

float radOutSqr

◆ u

pVec u

◆ v

pVec v

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