#include <pDomain.h>
List of all members.
Public Member Functions |
|
PDSphere (const pVec &Center, const float OuterRadius, const float InnerRadius=0.0f) | |
bool | Within (const pVec &pos) const |
Returns true if the point lies within the thick shell. |
|
pVec | Generate () const |
Returns a random point in the thick spherical shell. |
|
float | Size () const |
Returns the thick spherical shell volume or the thin spherical shell area if OuterRadius==InnerRadius. |
|
pDomain * | copy () const |
Public Attributes |
|
pVec | ctr |
float | radOut |
float | radIn |
float | radOutSqr |
float | radInSqr |
float | radDif |
float | vol |
bool | ThinShell |
The point Center is the center of the sphere. OuterRadius is the outer radius of the spherical shell and InnerRadius is the inner radius.
Generate returns a random point in the thick shell at a distance between OuterRadius and InnerRadius from point Center. If InnerRadius is 0, then it is the whole sphere. Within returns true if the point lies within the thick shell at a distance between InnerRadius to OuterRadius from point Center.