Public Member Functions | Friends | List of all members
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 Member Functions

 pyramid (polygonRef base, const Point &apex)
 Construct from base polygon and apex point. More...
 
 pyramid (Istream &)
 Construct from Istream. More...
 
const Point & apex () 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...
 

Friends

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

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

Constructor & Destructor Documentation

pyramid ( polygonRef  base,
const Point &  apex 
)
inline

Construct from base polygon and apex point.

Definition at line 34 of file pyramidI.H.

pyramid ( Istream is)
inline

Construct from Istream.

Definition at line 45 of file pyramidI.H.

References IOstream::check().

Here is the call graph for this function:

Member Function Documentation

const Point & apex ( ) const
inline

Return apex point.

Definition at line 55 of file pyramidI.H.

polygonRef base ( ) const
inline

Return base polygon.

Definition at line 61 of file pyramidI.H.

References pyramid< Point, PointRef, polygonRef >::centre().

Here is the call graph for this function:

Point centre ( const pointField points) const
inline

Return centre (centroid)

Definition at line 69 of file pyramidI.H.

References pyramid< Point, PointRef, polygonRef >::height().

Referenced by pyramid< Point, PointRef, polygonRef >::base().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Return height vector.

Definition at line 79 of file pyramidI.H.

References pyramid< Point, PointRef, polygonRef >::mag().

Referenced by pyramid< Point, PointRef, polygonRef >::centre().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Return scalar magnitude - returns volume of pyramid.

Definition at line 90 of file pyramidI.H.

References Foam::nl, p, and Foam::tab.

Referenced by pyramid< Point, PointRef, polygonRef >::height().

Here is the caller graph for this function:

Friends And Related Function Documentation

Istream& operator>> ( Istream ,
pyramid< Point, PointRef, polygonRef > &   
)
friend
Ostream& operator ( Ostream ,
const pyramid< Point, PointRef, polygonRef > &   
)
friend

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