Public Member Functions | Private Attributes | Friends
pyramid Class 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 Member Functions

 pyramid (polygonRef base, const Point &apex)
 Construct from base polygon and apex point. More...
 
 pyramid (Istream &)
 Construct from Istream. More...
 
const Pointapex () const
 Return apex point. More...
 
polygonRef base () const
 Return base polygon. More...
 
Point centre (const pointField &points) const
 Return centre (centroid) More...
 
vector height (const pointField &points) const
 Return height vector. More...
 
scalar mag (const pointField &points) const
 Return scalar magnitude - returns volume of pyramid. More...
 

Private Attributes

polygonRef base_
 
PointRef apex_
 

Friends

Istreamoperator>> (Istream &, pyramid &)
 
Ostreamoperator (Ostream &, const pyramid &)
 

Detailed Description

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 47 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 34 of file pyramidI.H.

◆ pyramid() [2/2]

pyramid ( Istream )
inline

Construct from Istream.

Member Function Documentation

◆ apex()

const Point & apex ( ) const
inline

Return apex point.

Definition at line 55 of file pyramidI.H.

◆ base()

polygonRef base ( ) const
inline

Return base polygon.

Definition at line 61 of file pyramidI.H.

◆ centre()

Point centre ( const pointField points) const
inline

Return centre (centroid)

Definition at line 69 of file pyramidI.H.

References points.

Referenced by cellModel::centre().

Here is the caller graph for this function:

◆ height()

Foam::vector height ( const pointField points) const
inline

Return height vector.

Definition at line 79 of file pyramidI.H.

References points.

◆ mag()

Foam::scalar mag ( const pointField points) const
inline

Return scalar magnitude - returns volume of pyramid.

Definition at line 90 of file pyramidI.H.

References points.

Referenced by cellModel::centre(), and cellModel::mag().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator>>

Istream& operator>> ( Istream ,
pyramid  
)
friend

◆ operator

Ostream& operator ( Ostream ,
const pyramid  
)
friend

Field Documentation

◆ base_

polygonRef base_
private

Definition at line 73 of file pyramid.H.

◆ apex_

PointRef apex_
private

Definition at line 74 of file pyramid.H.


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