mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
mrs_lib::geometry::Cone Class Reference

geometric representaiton of a cone More...

#include <shapes.h>

Public Member Functions

 Cone ()
 constructor without setting the internal variables
 
 ~Cone ()
 destructor
 
 Cone (Eigen::Vector3d origin_point, double angle, double height, Eigen::Vector3d orientation)
 constructor from a given origin point (tip of the cone), angle, height and orientation More...
 
const Eigen::Vector3d origin () const
 getter for the tip point More...
 
const Eigen::Vector3d direction () const
 getter for the direction. Normalized direction from origin towards base More...
 
const Eigen::Vector3d center () const
 getter for the center point. Center point lies in half of the body height More...
 
double theta () const
 getter for angle between body height and body side More...
 
double h () const
 getter for body height More...
 
const Ellipse getCap () const
 getter for the cap of the cone More...
 
const std::optional< Eigen::Vector3d > projectPoint (const Eigen::Vector3d &point) const
 Project a 3D point orthogonally onto the Cone surface. More...
 

Detailed Description

geometric representaiton of a cone

Constructor & Destructor Documentation

◆ Cone()

mrs_lib::geometry::Cone::Cone ( Eigen::Vector3d  origin_point,
double  angle,
double  height,
Eigen::Vector3d  orientation 
)

constructor from a given origin point (tip of the cone), angle, height and orientation

Parameters
origin_pointtip of the cone
angleangle between body height and side in radians
heightdistance between tip and base
orientationoffset from the default orientation. Default orientation is with body height aligned with Z axis, standing on the tip

Member Function Documentation

◆ center()

const Eigen::Vector3d mrs_lib::geometry::Cone::center ( ) const

getter for the center point. Center point lies in half of the body height

Returns
vector3

◆ direction()

const Eigen::Vector3d mrs_lib::geometry::Cone::direction ( ) const

getter for the direction. Normalized direction from origin towards base

Returns
vector3, normalized

◆ getCap()

const Ellipse mrs_lib::geometry::Cone::getCap ( ) const

getter for the cap of the cone

Returns
ellipse representing the cap of the cone

◆ h()

double mrs_lib::geometry::Cone::h ( ) const

getter for body height

Returns

◆ origin()

const Eigen::Vector3d mrs_lib::geometry::Cone::origin ( ) const

getter for the tip point

Returns
vector3

◆ projectPoint()

const std::optional< Eigen::Vector3d > mrs_lib::geometry::Cone::projectPoint ( const Eigen::Vector3d &  point) const

Project a 3D point orthogonally onto the Cone surface.

Parameters
pointin 3D
Returns
projected point

◆ theta()

double mrs_lib::geometry::Cone::theta ( ) const

getter for angle between body height and body side

Returns
angle in radians

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