32template<
class Po
int,
class Po
intRef,
class PolygonRef>
44template<
class Po
int,
class Po
intRef,
class PolygonRef>
53template<
class Po
int,
class Po
intRef,
class PolygonRef>
59 return (3.0/4.0)*base_.centre(
points) + (1.0/4.0)*apex_;
63template<
class Po
int,
class Po
intRef,
class PolygonRef>
70 return (apex_ - base_.centre(
points));
74template<
class Po
int,
class Po
intRef,
class PolygonRef>
80 return (1.0/3.0)*(base_.areaNormal(
points) & (height(
points)));
86template<
class Po
int,
class Po
intRef,
class PolygonRef>
90 pyramid<Point, PointRef, PolygonRef>&
p
93 is >>
p.base_ >>
p.apex_;
99template<
class Po
int,
class Po
intRef,
class PolygonRef>
103 const pyramid<Point, PointRef, PolygonRef>&
p
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A geometric pyramid primitive with a base of 'n' sides: i.e. a parametric pyramid....
const Point & apex() const
The apex point.
vector height(const UList< point > &points) const
Return height vector.
scalar mag(const UList< point > &points) const
Return scalar magnitude - returns volume of pyramid.
pyramid(PolygonRef base, const Point &apex)
Construct from base polygon and apex point.
Point centre(const UList< point > &points) const
Return centre (centroid).
PolygonRef base() const
The base polygon.
OBJstream os(runTime.globalPath()/outputName)
constexpr char nl
The newline '\n' character (0x0a).
constexpr char tab
The tab '\t' character(0x09).