mf
Media Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
mf::spherical_coordinates Struct Reference

Spherical coordinates. More...

#include <spherical_coordinates.h>

Public Member Functions

 spherical_coordinates ()=default
 
 spherical_coordinates (const spherical_coordinates &)=default
 
 spherical_coordinates (float r, angle az, angle el)
 
Eigen::Vector3f to_cartesian () const
 
bool operator== (const spherical_coordinates &) const
 
bool operator!= (const spherical_coordinates &) const
 
void invalidate ()
 
bool valid () const
 
 operator bool () const
 

Static Public Member Functions

static spherical_coordinates from_cartesian (const Eigen::Vector3f &)
 

Public Attributes

float radius = 0.0f
 
angle azimuth = 0.0f
 
angle elevation = 0.0f
 

Detailed Description

Spherical coordinates.

Let O be origin, P be point. Radius is distance OP. Elevation is (polar) angle between OP and reference plane Y=0. Or equivalently angle between OP and zenith axis +Y, plus pi. Azimuth is angle between -Z and the projection of OP on Y=0. Both azimuth and elevation are always in [-pi, pi].

Constructor & Destructor Documentation

mf::spherical_coordinates::spherical_coordinates ( )
default
mf::spherical_coordinates::spherical_coordinates ( const spherical_coordinates )
default
mf::spherical_coordinates::spherical_coordinates ( float  r,
angle  az,
angle  el 
)
inline

Member Function Documentation

spherical_coordinates mf::spherical_coordinates::from_cartesian ( const Eigen::Vector3f &  c)
static
void mf::spherical_coordinates::invalidate ( )
inline
mf::spherical_coordinates::operator bool ( ) const
inlineexplicit
bool mf::spherical_coordinates::operator!= ( const spherical_coordinates s) const
bool mf::spherical_coordinates::operator== ( const spherical_coordinates s) const
Eigen::Vector3f mf::spherical_coordinates::to_cartesian ( ) const
bool mf::spherical_coordinates::valid ( ) const
inline

Member Data Documentation

angle mf::spherical_coordinates::azimuth = 0.0f
angle mf::spherical_coordinates::elevation = 0.0f
float mf::spherical_coordinates::radius = 0.0f

The documentation for this struct was generated from the following files: