Stellarium 0.13.0
List of all members | Public Member Functions | Static Public Member Functions | Friends
OctahedronPolygon Class Reference

Manage a non-convex polygon which can extends on more than 180 deg. More...

#include <OctahedronPolygon.hpp>

Public Member Functions

 OctahedronPolygon (const SubContour &subContour)
 Create the OctahedronPolygon by splitting the passed SubContour on the 8 sides of the octahedron. More...
 
 OctahedronPolygon (const QVector< QVector< Vec3d > > &contours)
 
 OctahedronPolygon (const QVector< Vec3d > &contour)
 
 OctahedronPolygon (const QList< OctahedronPolygon > &octContours)
 
double getArea () const
 
Vec3d getPointInside () const
 
StelVertexArray getFillVertexArray () const
 Returns the list of triangles resulting from tesselating the contours. More...
 
StelVertexArray getOutlineVertexArray () const
 
void getBoundingCap (Vec3d &v, double &d) const
 
void inPlaceIntersection (const OctahedronPolygon &mpoly)
 Set this OctahedronPolygon as the intersection of itself with the given OctahedronPolygon. More...
 
void inPlaceUnion (const OctahedronPolygon &mpoly)
 Set this OctahedronPolygon as the union of itself with the given OctahedronPolygon. More...
 
void inPlaceSubtraction (const OctahedronPolygon &mpoly)
 Set this OctahedronPolygon as the subtraction of itself with the given OctahedronPolygon. More...
 
bool intersects (const OctahedronPolygon &mpoly) const
 
bool contains (const OctahedronPolygon &mpoly) const
 
bool contains (const Vec3d &p) const
 
bool isEmpty () const
 
QString toJson () const
 

Static Public Member Functions

static const OctahedronPolygongetAllSkyOctahedronPolygon ()
 
static const OctahedronPolygongetEmptyOctahedronPolygon ()
 
static double sphericalTriangleArea (const Vec3d &v0, const Vec3d &v1, const Vec3d &v2)
 

Friends

QDataStream & operator<< (QDataStream &, const OctahedronPolygon &)
 
QDataStream & operator>> (QDataStream &, OctahedronPolygon &)
 
OctahedronPolygon createAllSkyOctahedronPolygon ()
 

Detailed Description

Manage a non-convex polygon which can extends on more than 180 deg.

The contours defining the polygon are splitted and projected on the 8 sides of an Octahedron to enable 2D geometry algorithms to be used.

Constructor & Destructor Documentation

OctahedronPolygon::OctahedronPolygon ( const SubContour subContour)

Create the OctahedronPolygon by splitting the passed SubContour on the 8 sides of the octahedron.

Member Function Documentation

StelVertexArray OctahedronPolygon::getFillVertexArray ( ) const
inline

Returns the list of triangles resulting from tesselating the contours.

void OctahedronPolygon::inPlaceIntersection ( const OctahedronPolygon mpoly)

Set this OctahedronPolygon as the intersection of itself with the given OctahedronPolygon.

void OctahedronPolygon::inPlaceSubtraction ( const OctahedronPolygon mpoly)

Set this OctahedronPolygon as the subtraction of itself with the given OctahedronPolygon.

void OctahedronPolygon::inPlaceUnion ( const OctahedronPolygon mpoly)

Set this OctahedronPolygon as the union of itself with the given OctahedronPolygon.