ParticleAPI 3.0.0 Performant particle system API in C++ for interactive graphics

Public Member Functions | Public Attributes | List of all members
PDCone Struct Reference

Cone. More...

`#include <pDomain.h>`

Inheritance diagram for PDCone:

## Public Member Functions
| PDCone (const pVec &e0, const pVec &e1, const float OuterRadius, const float InnerRadius=0.0f)
void | PDCone_Cons (const pVec &e0, const pVec &e1, const float OuterRadius, const float InnerRadius=0.0f)
bool | Within (const pVec &pos) const
| Returns true if the point is within the conical shell. More...
pVec | Generate () const
| Returns a random point in the conical shell. More...
float | Size () const
| Returns the thick conical shell volume or the thin conical shell area if OuterRadius==InnerRadius. 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 | apex
pVec | axis
pVec | u
pVec | v
float | radIn
float | radOut
float | radInSqr
float | radOutSqr
float | radDif
float | axisLenInvSqr
float | vol
bool | ThinShell
Public Attributes inherited from pDomain
pDomainType_E | Which

## Detailed Description

Cone.

e0 is the apex of the cone and e1 is the endpoint of the axis at the cone's base. OuterRadius is the radius of the base of the cone. InnerRadius is the radius of the base of a cone to subtract from the first cone to create a conical shell. This is similar to the cylindrical shell, which can be thought of as a large cylinder with a smaller cylinder subtracted from the middle. Both cones share the same apex and axis, which implies that the thickness of the conical shell tapers to 0 at the apex. InnerRadius = 0 for a solid cone with no empty space in the middle.

Generate returns a random point in the conical shell. Within returns true if the point is within the conical shell.

## Constructor & Destructor Documentation

## ◆ PDCone()

PDCone | ( | const pVec & | e0,
|  | const pVec & | e1,
|  | 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 random point in the conical shell.

Implements pDomain.

## ◆ PDCone_Cons()

void PDCone_Cons | ( | const pVec & | e0,
|  | const pVec & | e1,
|  | const float | OuterRadius,
|  | const float | InnerRadius = `0.0f`
| ) |  |
| inline

## ◆ Size()

float Size | ( |  | ) | const
| inlinevirtual

Returns the thick conical shell volume or the thin conical shell area if OuterRadius==InnerRadius.

Implements pDomain.

## ◆ Within()

bool Within | ( | const pVec & | pos | ) | const
| inlinevirtual

Returns true if the point is within the conical shell.

Implements pDomain.

## Member Data Documentation

## ◆ apex

pVec apex

## ◆ axis

pVec axis

## ◆ axisLenInvSqr

float axisLenInvSqr

## ◆ radDif

float radDif

## ◆ radIn

float radIn

## ◆ radInSqr

float radInSqr

## ◆ radOut

float radOut

## ◆ radOutSqr

float radOutSqr

## ◆ ThinShell

bool ThinShell

## ◆ u

pVec u

## ◆ v

pVec v

## ◆ vol

float vol

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

- pDomain.h