pyramid< Point, PointRef, PolygonRef > Class Template Reference

A geometric pyramid primitive with a base of 'n' sides: i.e. a parametric pyramid. A pyramid is constructed from a base polygon and an apex point. More...

Public Types

typedef Point point_type
 The point type. More...
 

Public Member Functions

 pyramid (PolygonRef base, const Point &apex)
 Construct from base polygon and apex point. More...
 
 pyramid (Istream &is)
 Construct from Istream. More...
 
const Pointapex () const
 The apex point. More...
 
PolygonRef base () const
 The base polygon. More...
 
Point centre (const UList< point > &points) const
 Return centre (centroid) More...
 
vector height (const UList< point > &points) const
 Return height vector. More...
 
scalar mag (const UList< point > &points) const
 Return scalar magnitude - returns volume of pyramid. More...
 

Friends

Istreamoperator>> (Istream &is, pyramid &p)
 
Ostreamoperator (Ostream &os, const pyramid &p)
 

Detailed Description

template<class Point, class PointRef, class PolygonRef>
class Foam::pyramid< Point, PointRef, PolygonRef >

A geometric pyramid primitive with a base of 'n' sides: i.e. a parametric pyramid. A pyramid is constructed from a base polygon and an apex point.

Source files

Definition at line 48 of file pyramid.H.

Member Typedef Documentation

◆ point_type

typedef Point point_type

The point type.

Definition at line 94 of file pyramid.H.

Constructor & Destructor Documentation

◆ pyramid() [1/2]

pyramid ( PolygonRef  base,
const Point apex 
)
inline

Construct from base polygon and apex point.

Definition at line 27 of file pyramidI.H.

◆ pyramid() [2/2]

pyramid ( Istream is)
inlineexplicit

Construct from Istream.

Definition at line 38 of file pyramidI.H.

Member Function Documentation

◆ apex()

const Point& apex ( ) const
inline

The apex point.

Definition at line 117 of file pyramid.H.

◆ base()

PolygonRef base ( ) const
inline

The base polygon.

Definition at line 122 of file pyramid.H.

◆ centre()

Point centre ( const UList< point > &  points) const
inline

Return centre (centroid)

Definition at line 48 of file pyramidI.H.

References points.

◆ height()

Foam::vector height ( const UList< point > &  points) const
inline

Return height vector.

Definition at line 58 of file pyramidI.H.

References points.

◆ mag()

Foam::scalar mag ( const UList< point > &  points) const
inline

Return scalar magnitude - returns volume of pyramid.

Definition at line 69 of file pyramidI.H.

References points.

Friends And Related Function Documentation

◆ operator>>

Istream& operator>> ( Istream is,
pyramid< Point, PointRef, PolygonRef > &  p 
)
friend

◆ operator

Ostream& operator ( Ostream os,
const pyramid< Point, PointRef, PolygonRef > &  p 
)
friend

The documentation for this class was generated from the following files: