DGtal 1.3.0
|
Aim: Represent a triangle drawn onto a sphere of radius 1. More...
#include <DGtal/geometry/tools/SphericalTriangle.h>
Public Member Functions | |
~SphericalTriangle () | |
SphericalTriangle (const RealVector &va, const RealVector &vb, const RealVector &vc, bool normalize=true) | |
Default constructor. The object is invalid. More... | |
SphericalTriangle (const SphericalTriangle &other)=default | |
SphericalTriangle & | operator= (const SphericalTriangle &other)=default |
const RealVector & | A () const |
const RealVector & | B () const |
const RealVector & | C () const |
void | setA (const RealVector &va, bool normalize=true) |
void | setB (const RealVector &vb, bool normalize=true) |
void | setC (const RealVector &vc, bool normalize=true) |
bool | isDegenerate () const |
Self | polarTriangle () const |
void | interiorAngles (Scalar &alpha, Scalar &beta, Scalar &gamma) const |
Scalar | area () const |
Scalar | algebraicArea () const |
Protected Attributes | |
RealVector | myA |
The point A of the triangle ABC, of unit length. More... | |
RealVector | myB |
The point B of the triangle ABC, of unit length. More... | |
RealVector | myC |
The point C of the triangle ABC, of unit length. More... | |
Private Types | |
typedef TSpace | Space |
typedef SphericalTriangle< Space > | Self |
typedef Space::RealPoint | RealPoint |
typedef Space::RealVector | RealVector |
typedef RealVector::Component | Scalar |
Private Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CSpace< TSpace >)) | |
BOOST_STATIC_ASSERT ((Space::dimension==3)) | |
Aim: Represent a triangle drawn onto a sphere of radius 1.
Description of class 'SphericalTriangle'
TSpace | any type of 3-dimensional digital space. |
Definition at line 61 of file SphericalTriangle.h.
|
private |
Definition at line 66 of file SphericalTriangle.h.
|
private |
Definition at line 67 of file SphericalTriangle.h.
|
private |
Definition at line 68 of file SphericalTriangle.h.
|
private |
Definition at line 65 of file SphericalTriangle.h.
|
private |
Definition at line 64 of file SphericalTriangle.h.
|
inline |
|
inline |
Default constructor. The object is invalid.
Definition at line 82 of file SphericalTriangle.h.
References DGtal::SphericalTriangle< TSpace >::setA(), DGtal::SphericalTriangle< TSpace >::setB(), and DGtal::SphericalTriangle< TSpace >::setC().
|
default |
Copy constructor.
other | the object to clone. |
|
inline |
Definition at line 104 of file SphericalTriangle.h.
References DGtal::SphericalTriangle< TSpace >::myA.
Referenced by DGtal::SphericalTriangle< TSpace >::interiorAngles().
|
inline |
Definition at line 217 of file SphericalTriangle.h.
References DGtal::SphericalTriangle< TSpace >::area(), DGtal::crossProduct(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::dot(), DGtal::SphericalTriangle< TSpace >::myA, DGtal::SphericalTriangle< TSpace >::myB, DGtal::SphericalTriangle< TSpace >::myC, and DGtal::PointVector< dim, TEuclideanRing, TContainer >::norm1().
Referenced by DGtal::CorrectedNormalCurrentFormula< TRealPoint, TRealVector >::mu2InterpolatedU().
|
inline |
Definition at line 207 of file SphericalTriangle.h.
References DGtal::SphericalTriangle< TSpace >::interiorAngles(), and DGtal::SphericalTriangle< TSpace >::isDegenerate().
Referenced by DGtal::SphericalTriangle< TSpace >::algebraicArea().
|
inline |
Definition at line 106 of file SphericalTriangle.h.
References DGtal::SphericalTriangle< TSpace >::myB.
Referenced by DGtal::SphericalTriangle< TSpace >::interiorAngles().
|
private |
|
private |
|
inline |
Definition at line 108 of file SphericalTriangle.h.
References DGtal::SphericalTriangle< TSpace >::myC.
Referenced by DGtal::SphericalTriangle< TSpace >::interiorAngles().
|
inline |
Returns the interior angles of the spherical triangle ABC.
[out] | alpha | the interior angle at vertex A. |
[out] | beta | the interior angle at vertex B. |
[out] | gamma | the interior angle at vertex C. |
Definition at line 190 of file SphericalTriangle.h.
References DGtal::SphericalTriangle< TSpace >::A(), DGtal::SphericalTriangle< TSpace >::B(), DGtal::SphericalTriangle< TSpace >::C(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::dot(), DGtal::SphericalTriangle< TSpace >::polarTriangle(), and DGtal::PointVector< dim, TEuclideanRing, TContainer >::zero.
Referenced by DGtal::SphericalTriangle< TSpace >::area().
|
inline |
Definition at line 158 of file SphericalTriangle.h.
References DGtal::SphericalTriangle< TSpace >::myA, DGtal::SphericalTriangle< TSpace >::myB, and DGtal::SphericalTriangle< TSpace >::myC.
Referenced by DGtal::SphericalTriangle< TSpace >::area().
|
default |
Assignment.
other | the object to copy. |
|
inline |
Definition at line 174 of file SphericalTriangle.h.
References DGtal::PointVector< dim, TEuclideanRing, TContainer >::crossProduct(), DGtal::SphericalTriangle< TSpace >::myA, DGtal::SphericalTriangle< TSpace >::myB, and DGtal::SphericalTriangle< TSpace >::myC.
Referenced by DGtal::SphericalTriangle< TSpace >::interiorAngles().
|
inline |
Sets the point A of the triangle.
va | the new point A |
normalize | if true, force normalization, otherwise va should be of unit length. |
Definition at line 115 of file SphericalTriangle.h.
References DGtal::SphericalTriangle< TSpace >::myA, DGtal::PointVector< dim, TEuclideanRing, TContainer >::norm(), and DGtal::PointVector< dim, TEuclideanRing, TContainer >::zero.
Referenced by DGtal::SphericalTriangle< TSpace >::SphericalTriangle().
|
inline |
Sets the point B of the triangle.
vb | the new point B |
normalize | if true, force normalization, otherwise vb should be of unit length. |
Definition at line 131 of file SphericalTriangle.h.
References DGtal::SphericalTriangle< TSpace >::myB, DGtal::PointVector< dim, TEuclideanRing, TContainer >::norm(), and DGtal::PointVector< dim, TEuclideanRing, TContainer >::zero.
Referenced by DGtal::SphericalTriangle< TSpace >::SphericalTriangle().
|
inline |
Sets the point C of the triangle.
vc | the new point C |
normalize | if true, force normalization, otherwise vc should be of unit length. |
Definition at line 146 of file SphericalTriangle.h.
References DGtal::SphericalTriangle< TSpace >::myC, DGtal::PointVector< dim, TEuclideanRing, TContainer >::norm(), and DGtal::PointVector< dim, TEuclideanRing, TContainer >::zero.
Referenced by DGtal::SphericalTriangle< TSpace >::SphericalTriangle().
|
protected |
The point A of the triangle ABC, of unit length.
Definition at line 231 of file SphericalTriangle.h.
Referenced by DGtal::SphericalTriangle< TSpace >::A(), DGtal::SphericalTriangle< TSpace >::algebraicArea(), DGtal::SphericalTriangle< TSpace >::isDegenerate(), DGtal::SphericalTriangle< TSpace >::polarTriangle(), and DGtal::SphericalTriangle< TSpace >::setA().
|
protected |
The point B of the triangle ABC, of unit length.
Definition at line 233 of file SphericalTriangle.h.
Referenced by DGtal::SphericalTriangle< TSpace >::algebraicArea(), DGtal::SphericalTriangle< TSpace >::B(), DGtal::SphericalTriangle< TSpace >::isDegenerate(), DGtal::SphericalTriangle< TSpace >::polarTriangle(), and DGtal::SphericalTriangle< TSpace >::setB().
|
protected |
The point C of the triangle ABC, of unit length.
Definition at line 235 of file SphericalTriangle.h.
Referenced by DGtal::SphericalTriangle< TSpace >::algebraicArea(), DGtal::SphericalTriangle< TSpace >::C(), DGtal::SphericalTriangle< TSpace >::isDegenerate(), DGtal::SphericalTriangle< TSpace >::polarTriangle(), and DGtal::SphericalTriangle< TSpace >::setC().