Home · All Namespaces · All Classes · Functions · Coding Style · Plugins · File Structure

StelGeom::ConvexPolygon Class Reference

A special case of ConvexS for which all HalfSpace have an aperture of PI/2. More...

#include <StelSphereGeometry.hpp>

Inherits StelGeom::ConvexS, and StelGeom::Polygon.

List of all members.

Public Member Functions

 ConvexPolygon ()
 ConvexPolygon (const Vec3d &e0, const Vec3d &e1, const Vec3d &e2)
 ConvexPolygon (const Vec3d &e0, const Vec3d &e1, const Vec3d &e2, const Vec3d &e3)
bool operator== (const ConvexPolygon &other) const
const Vec3doperator[] (const Polygon::size_type &i) const
Vec3doperator[] (Polygon::size_type &i)
double getArea () const
Vec3d getBarycenter () const
PolygonasPolygon ()
const PolygonasPolygon () const
ConvexSasConvex ()
const ConvexSasConvex () const
bool checkValid () const

Static Public Member Functions

static ConvexPolygon fullSky ()


Detailed Description

A special case of ConvexS for which all HalfSpace have an aperture of PI/2.

The operator [] behave as for a Polygon, i.e. return the vertex positions. To acces the HalfSpaces, use the asConvex() method.


Constructor & Destructor Documentation

StelGeom::ConvexPolygon::ConvexPolygon (  )  [inline]

Default constructor.

StelGeom::ConvexPolygon::ConvexPolygon ( const Vec3d e0,
const Vec3d e1,
const Vec3d e2 
) [inline]

Special constructor for 3 points.

StelGeom::ConvexPolygon::ConvexPolygon ( const Vec3d e0,
const Vec3d e1,
const Vec3d e2,
const Vec3d e3 
) [inline]

Special constructor for 4 points.


Member Function Documentation

const Vec3d& StelGeom::ConvexPolygon::operator[] ( const Polygon::size_type &  i  )  const [inline]

By default the [] operator return the vertexes.

Vec3d& StelGeom::ConvexPolygon::operator[] ( Polygon::size_type &  i  )  [inline]

By default the [] operator return the vertexes.

double StelGeom::ConvexPolygon::getArea (  )  const

Return the convex polygon area in steradians.

Vec3d StelGeom::ConvexPolygon::getBarycenter (  )  const

Return the convex polygon barycenter.

Polygon& StelGeom::ConvexPolygon::asPolygon (  )  [inline]

Cast to Polygon in case of ambiguity.

const Polygon& StelGeom::ConvexPolygon::asPolygon (  )  const [inline]

Same with const.

ConvexS& StelGeom::ConvexPolygon::asConvex (  )  [inline]

Cast to Convex in case of ambiguity.

const ConvexS& StelGeom::ConvexPolygon::asConvex (  )  const [inline]

Same with const.

bool StelGeom::ConvexPolygon::checkValid (  )  const

Check if the polygon is valid, i.e. it has no side >180 etc.

static ConvexPolygon StelGeom::ConvexPolygon::fullSky (  )  [static]

Special case for degenerated polygons (>180 deg), assume full sky, i.e. intersect and contains is always true.


Generated on Mon Mar 9 16:16:17 2009 for Stellarium by  doxygen 1.5.5