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

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

A line segment. More...

`#include <pDomain.h>`

Inheritance diagram for PDLine:

## Public Member Functions
| PDLine (const pVec &e0, const pVec &e1)
void | PDLine_Cons (const pVec &e0, const pVec &e1)
bool | Within (const pVec &pos) const
| Returns true for points within epsilon of the line segment. More...
pVec | Generate () const
| Returns a random point on this segment. 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 | p0
pVec | p1
pVec | vec
pVec | vecNrm
float | len
Public Attributes inherited from pDomain
pDomainType_E | Which

## Detailed Description

A line segment.

e0 and e1 are the endpoints of the segment.

Generate returns a random point on this segment. Within returns true for points within epsilon of the line segment.

## Constructor & Destructor Documentation

## ◆ PDLine()

PDLine | ( | const pVec & | e0,
|  | const pVec & | e1
| ) |  |
| inline

## Member Function Documentation

## ◆ copy()

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

Implements pDomain.

## ◆ Generate()

pVec Generate | ( |  | ) | const
| inlinevirtual

Returns a random point on this segment.

Implements pDomain.

## ◆ PDLine_Cons()

void PDLine_Cons | ( | const pVec & | e0,
|  | const pVec & | e1
| ) |  |
| 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 line segment.

Implements pDomain.

## Member Data Documentation

## ◆ len

float len

## ◆ p0

pVec p0

## ◆ p1

pVec p1

## ◆ vec

pVec vec

## ◆ vecNrm

pVec vecNrm

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

- pDomain.h