Stellarium 0.13.3
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.

Definition at line 63 of file OctahedronPolygon.hpp.

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.

Definition at line 80 of file OctahedronPolygon.hpp.

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.


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