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

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

Rhombus-shaped planar region. More...

`#include <pDomain.h>`

Inheritance diagram for PDRectangle:

## Public Member Functions
| PDRectangle (const pVec &p0, const pVec &u0, const pVec &v0)
void | PDRectangle_Cons (const pVec &p0, const pVec &u0, const pVec &v0)
bool | Within (const pVec &pos) const
| Returns true for points within epsilon of the patch. More...
pVec | Generate () const
| Returns a random point in the diamond-shaped patch whose corners are o, o+u, o+u+v, and o+v. 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

## Detailed Description

Rhombus-shaped planar region.

p0 is a point on the plane. u0 and v0 are (non-parallel) basis vectors in the plane. They don't need to be normal or orthogonal.

Generate returns a random point in the diamond-shaped patch whose corners are o, o+u, o+u+v, and o+v. Within returns true for points within epsilon of the patch.

## Constructor & Destructor Documentation

## ◆ PDRectangle()

PDRectangle | ( | const pVec & | p0,
|  | const pVec & | u0,
|  | const pVec & | v0
| ) |  |
| 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 diamond-shaped patch whose corners are o, o+u, o+u+v, and o+v.

Implements pDomain.

## ◆ PDRectangle_Cons()

void PDRectangle_Cons | ( | const pVec & | p0,
|  | const pVec & | u0,
|  | const pVec & | v0
| ) |  |
| 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 patch.

Implements pDomain.

## Member Data Documentation

## ◆ area

float area

## ◆ D

float D

## ◆ nrm

pVec nrm

## ◆ p

pVec p

## ◆ s1

pVec s1

## ◆ s2

pVec s2

## ◆ u

pVec u

## ◆ uLen

float uLen

## ◆ uNrm

pVec uNrm

## ◆ v

pVec v

## ◆ vLen

float vLen

## ◆ vNrm

pVec vNrm

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

- pDomain.h