Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
geomtools::ellipse Class Reference

A circular arc (1D shape) More...

#include <bayeux/geomtools/ellipse.h>

Inheritance diagram for geomtools::ellipse:
geomtools::i_shape_1d geomtools::i_wires_3d_rendering geomtools::i_object_3d datatools::i_serializable datatools::i_tree_dumpable

Public Member Functions

bool is_valid () const
 Check the validity of the ellipse. More...
 
double get_x_radius () const
 Return the X radius. More...
 
double get_y_radius () const
 Return the Y radius. More...
 
void set_radii (double x_radius_, double y_radius_)
 Set the radii. More...
 
void set_x_radius (double x_radius_)
 Set the X radius. More...
 
void set_y_radius (double y_radius_)
 Set the Y radius. More...
 
const angular_rangeget_angle_domain () const
 Return the angle domain. More...
 
bool has_partial_angle () const
 Check for the partial arc. More...
 
bool has_start_angle () const
 Check the start angle. More...
 
void set_start_angle (double)
 Set the start angle. More...
 
double get_start_angle () const
 Return the start angle. More...
 
bool has_delta_angle () const
 Check the dedislta angle. More...
 
void set_delta_angle (double)
 Set the delta angle. More...
 
double get_delta_angle () const
 Return the delta angle. More...
 
double get_circumference () const
 Return the circumference. More...
 
virtual unsigned int get_number_of_path () const
 Return the number of path. More...
 
virtual double get_length (uint32_t flags_=PATH_ALL_BITS) const
 Return the length of the target paths. More...
 
bool is_x_oriented () const
 Check if the ellipse is X oriented. More...
 
bool is_y_oriented () const
 Check if the ellipse is Y oriented. More...
 
bool is_circle () const
 Check if the ellipse is a circle. More...
 
double get_excentricity () const
 Return the excentricity. More...
 
double get_focal_to_center () const
 Return the distance between the focal and the center. More...
 
 ellipse ()
 Default constructor. More...
 
 ellipse (double x_radius_, double y_radius_)
 Constructor. More...
 
 ellipse (double x_radius_, double y_radius_, double start_angle_, double delta_angle_)
 Constructor. More...
 
void compute_x_y_from_theta (double theta_, double &x_, double &y_) const
 Compute the X and Y coordinates of the point on the ellipse with angle theta. More...
 
void compute_theta_from_x (double x_, double &theta_) const
 Compute the theta angle of the point on the ellipse with X coordinate. More...
 
double compute_squared_distance_to_point (double t_, double xm_, double ym_) const
 
virtual ~ellipse ()
 Destructor. More...
 
virtual std::string get_shape_name () const
 Return the name of this solid shape class. More...
 
virtual void tree_dump (std::ostream &a_out=std::clog, const std::string &a_title="", const std::string &a_indent="", bool a_inherit=false) const
 Smart print. More...
 
virtual bool is_on_curve (const vector_3d &, double a_tolerance=GEOMTOOLS_PROPER_TOLERANCE) const
 Check if a point is on the curve (approximative algorithm) More...
 
virtual vector_3d get_direction_on_curve (const vector_3d &a_tposition) const
 Returns the direction of a point on the curve. More...
 
virtual void generate_wires_self (wires_type &wires_, uint32_t options_=0) const
 Generate a sequence of polylines for wires 3D rendering. More...
 
void initialize (const datatools::properties &, const handle_dict_type *=0)
 Initialize from properties and a dictionary of 3D-objects. More...
 
virtual void reset ()
 Reset. More...
 
- Public Member Functions inherited from geomtools::i_shape_1d
int get_dimensional () const
 Return the dimension of the object. More...
 
virtual bool has_number_of_paths () const
 Check if the 1D shape knows its number of associated paths. More...
 
virtual unsigned int get_number_of_paths () const
 Return the number of paths. More...
 
virtual bool has_length (uint32_t flags_=PATH_ALL_BITS) const
 Check if the 1D shape known its length. More...
 
 i_shape_1d ()
 Default constructor. More...
 
 i_shape_1d (double tolerance_)
 Constructor. More...
 
 i_shape_1d (double tolerance_, double angular_tolerance_)
 Constructor. More...
 
virtual ~i_shape_1d ()
 Destructor. More...
 
- Public Member Functions inherited from geomtools::i_object_3d
datatools::logger::priority get_logging_priority () const
 Return the logging priority threshold. More...
 
void set_logging_priority (datatools::logger::priority)
 Set the logging priority threshold. More...
 
bool has_wires_drawer () const
 Check is a wires drawer is available. More...
 
void set_wires_drawer (i_wires_3d_rendering &wires_drawer_)
 Set a wires drawer. More...
 
void reset_wires_drawer ()
 Reset the wires drawer. More...
 
i_wires_3d_renderinggrab_wires_drawer ()
 Return a wires drawer. More...
 
const i_wires_3d_renderingget_wires_drawer () const
 Return a wires drawer. More...
 
double compute_tolerance (double tolerance_) const
 Return the distance tolerance. More...
 
double compute_angular_tolerance (double angular_tolerance_) const
 Return the angular tolerance. More...
 
double get_tolerance () const
 Return the distance tolerance. More...
 
void set_tolerance (double tolerance_)
 Set the distance tolerance. More...
 
double get_angular_tolerance () const
 Return the angular tolerance. More...
 
void set_angular_tolerance (double tolerance_)
 Set the angular tolerance. More...
 
virtual bool is_composite () const
 Check if the object is composite. More...
 
 i_object_3d ()
 Default constructor. More...
 
 i_object_3d (double tolerance_)
 Constructor on length tolerance. More...
 
 i_object_3d (double tolerance_, double angular_tolerance_)
 Constructor on length tolerance. More...
 
 i_object_3d (const i_object_3d &)
 Copy constructor. More...
 
i_object_3doperator= (const i_object_3d &)
 Assignment operator. More...
 
virtual ~i_object_3d ()
 Destructor. More...
 
void initialize_simple ()
 Initialize the 3D object. More...
 
- Public Member Functions inherited from datatools::i_serializable
 i_serializable ()
 Default constructor. More...
 
virtual ~i_serializable ()
 Destructor. More...
 
virtual const std::string & get_serial_tag () const =0
 Return the serialization string identifier of the class. More...
 
- Public Member Functions inherited from datatools::i_tree_dumpable
 i_tree_dumpable ()
 Constructor. More...
 
virtual ~i_tree_dumpable ()
 Destructor. More...
 
virtual void print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const
 Main new interface method for printing. More...
 
void print_tree_json (std::ostream &out_=std::clog, const std::string &json_options_="") const
 Printing with jsonized options. More...
 
void print_tree_json (std::ostream &out_=std::clog, const char *json_options_=nullptr) const
 Printing with jsonized options. More...
 
void tree_dump_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="", const bool inherit_=false) const
 
void tree_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="") const
 
void smart_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="") const
 
- Public Member Functions inherited from geomtools::i_wires_3d_rendering
virtual ~i_wires_3d_rendering ()
 Destructor. More...
 
void generate_wires (wires_type &wires_, const placement &positioning_, uint32_t options_=0) const
 
void generate_wires (wires_type &wires_, const geomtools::vector_3d &position_, const geomtools::rotation_3d &rotation_, uint32_t options_=0) const
 

Static Public Member Functions

static const std::string & ellipse_label ()
 Return the label of 1D shape. More...
 
static void squared_distance_to_point_with_derivative (double t_, void *params_, double *f_, double *df_)
 
static double squared_distance_to_point (double t_, void *params_)
 
- Static Public Member Functions inherited from geomtools::i_shape_1d
static void init_ocd (datatools::object_configuration_description &)
 OCD support. More...
 
- Static Public Member Functions inherited from geomtools::i_object_3d
static void init_ocd (datatools::object_configuration_description &)
 OCD support. More...
 
- Static Public Member Functions inherited from datatools::i_tree_dumpable
static const boost::property_tree::ptree & empty_options ()
 
static boost::property_tree::ptree make_base_print_options (const std::string &title_, const std::string &indent_="", const bool inherit_=false)
 
static std::ostream & last_skip_tag (std::ostream &out_)
 
static std::ostream & skip_tag (std::ostream &out_)
 
static std::ostream & last_tag (std::ostream &out_)
 
static std::ostream & tag (std::ostream &out_)
 
- Static Public Member Functions inherited from geomtools::i_wires_3d_rendering
static uint32_t linear_sampling (sampling_level_type)
 Return linear sampling from sampling level. More...
 
static uint32_t linear_sampling_from_options (uint32_t)
 Return linear sampling from rendering options. More...
 
static uint32_t angular_sampling (sampling_level_type)
 Return angular sampling from sampling level. More...
 
static uint32_t angular_sampling_from_options (uint32_t)
 Return angular sampling from rendering options. More...
 
static void boost_linear_sampling (uint32_t &)
 Boost the linear sampling. More...
 

Protected Member Functions

void _set_defaults ()
 Set default attributes values. More...
 
- Protected Member Functions inherited from geomtools::i_object_3d
void _set_defaults ()
 Set default values for attributes. More...
 
void _initialize (const datatools::properties &, const handle_dict_type *=0)
 Initialize from properties. More...
 
void _reset ()
 Reset. More...
 

Additional Inherited Members

- Public Types inherited from geomtools::i_object_3d
enum  dimensional_type { DIMENSIONAL_0 = 0, DIMENSIONAL_1 = 1, DIMENSIONAL_2 = 2, DIMENSIONAL_3 = 3 }
 Known dimensions. More...
 
typedef datatools::handle< i_object_3dhandle_type
 A handle to a 3D object. More...
 
typedef std::map< std::string, object_entryhandle_dict_type
 Dictionary of handle of 3D object entries. More...
 
- Public Types inherited from datatools::i_tree_dumpable
enum  ostream_type { OSTREAM_COUT = 1, OSTREAM_CERR = 2, OSTREAM_CLOG = 3 }
 Enumeration for standard output streams. More...
 
- Public Types inherited from geomtools::i_wires_3d_rendering
enum  wires_rendering_option_type {
  WR_NONE = 0, WR_BASE_GRID = datatools::bit_mask::bit00, WR_BASE_GRID_LOW_DENSITY = (WR_BASE_GRID << 1), WR_BASE_GRID_HIGH_DENSITY = (WR_BASE_GRID << 2),
  WR_BASE_GRID_VERY_HIGH_DENSITY = (WR_BASE_GRID << 3), WR_BASE_GRID_HUGE_DENSITY = (WR_BASE_GRID << 4), WR_BASE_LOW_ANGLE_SAMPLING = (WR_BASE_GRID << 5), WR_BASE_HIGH_ANGLE_SAMPLING = (WR_BASE_GRID << 6),
  WR_BASE_VERY_HIGH_ANGLE_SAMPLING = (WR_BASE_GRID << 7), WR_BASE_HUGE_ANGLE_SAMPLING = (WR_BASE_GRID << 8), WR_BASE_UNUSED_09 = (WR_BASE_GRID << 9), WR_BASE_UNUSED_10 = (WR_BASE_GRID << 10),
  WR_BASE_UNUSED_11 = (WR_BASE_GRID << 11), WR_BASE_UNUSED_12 = (WR_BASE_GRID << 12), WR_BASE_UNUSED_13 = (WR_BASE_GRID << 13), WR_BASE_BOUNDINGS = (WR_BASE_GRID << 14),
  WR_BASE_EXPLODE = (WR_BASE_GRID << 15), WR_BASE_LAST = (WR_BASE_EXPLODE), WR_BASE_MASK = datatools::bit_mask::nbits16
}
 Wires rendering optional flags. More...
 
enum  sampling_level_type {
  SL_NONE = 0, SL_LOW = 1, SL_NORMAL = 2, SL_HIGH = 3,
  SL_VERY_HIGH = 4, SL_HUGE = 5
}
 Sampling levels. More...
 

Detailed Description

A circular arc (1D shape)

Constructor & Destructor Documentation

◆ ellipse() [1/3]

geomtools::ellipse::ellipse ( )

Default constructor.

◆ ellipse() [2/3]

geomtools::ellipse::ellipse ( double  x_radius_,
double  y_radius_ 
)

Constructor.

◆ ellipse() [3/3]

geomtools::ellipse::ellipse ( double  x_radius_,
double  y_radius_,
double  start_angle_,
double  delta_angle_ 
)

Constructor.

◆ ~ellipse()

virtual geomtools::ellipse::~ellipse ( )
virtual

Destructor.

Member Function Documentation

◆ _set_defaults()

void geomtools::ellipse::_set_defaults ( )
protected

Set default attributes values.

◆ compute_squared_distance_to_point()

double geomtools::ellipse::compute_squared_distance_to_point ( double  t_,
double  xm_,
double  ym_ 
) const

Compute the squared distance between a point H on the helix with parameter t (xh = a * cos(t), yh = b * sin(t)) and an arbitrary position (xm, ym) in the X,Y plane

◆ compute_theta_from_x()

void geomtools::ellipse::compute_theta_from_x ( double  x_,
double &  theta_ 
) const

Compute the theta angle of the point on the ellipse with X coordinate.

◆ compute_x_y_from_theta()

void geomtools::ellipse::compute_x_y_from_theta ( double  theta_,
double &  x_,
double &  y_ 
) const

Compute the X and Y coordinates of the point on the ellipse with angle theta.

◆ ellipse_label()

static const std::string& geomtools::ellipse::ellipse_label ( )
static

Return the label of 1D shape.

◆ generate_wires_self()

virtual void geomtools::ellipse::generate_wires_self ( wires_type wires_,
uint32_t  options_ = 0 
) const
virtual

Generate a sequence of polylines for wires 3D rendering.

Implements geomtools::i_wires_3d_rendering.

◆ get_angle_domain()

const angular_range& geomtools::ellipse::get_angle_domain ( ) const

Return the angle domain.

◆ get_circumference()

double geomtools::ellipse::get_circumference ( ) const

Return the circumference.

◆ get_delta_angle()

double geomtools::ellipse::get_delta_angle ( ) const

Return the delta angle.

◆ get_direction_on_curve()

virtual vector_3d geomtools::ellipse::get_direction_on_curve ( const vector_3d a_tposition) const
virtual

Returns the direction of a point on the curve.

Implements geomtools::i_shape_1d.

◆ get_excentricity()

double geomtools::ellipse::get_excentricity ( ) const

Return the excentricity.

◆ get_focal_to_center()

double geomtools::ellipse::get_focal_to_center ( ) const

Return the distance between the focal and the center.

◆ get_length()

virtual double geomtools::ellipse::get_length ( uint32_t  flags_ = PATH_ALL_BITS) const
virtual

Return the length of the target paths.

Reimplemented from geomtools::i_shape_1d.

◆ get_number_of_path()

virtual unsigned int geomtools::ellipse::get_number_of_path ( ) const
virtual

Return the number of path.

◆ get_shape_name()

virtual std::string geomtools::ellipse::get_shape_name ( ) const
virtual

Return the name of this solid shape class.

Implements geomtools::i_object_3d.

◆ get_start_angle()

double geomtools::ellipse::get_start_angle ( ) const

Return the start angle.

◆ get_x_radius()

double geomtools::ellipse::get_x_radius ( ) const

Return the X radius.

◆ get_y_radius()

double geomtools::ellipse::get_y_radius ( ) const

Return the Y radius.

◆ has_delta_angle()

bool geomtools::ellipse::has_delta_angle ( ) const

Check the dedislta angle.

◆ has_partial_angle()

bool geomtools::ellipse::has_partial_angle ( ) const

Check for the partial arc.

◆ has_start_angle()

bool geomtools::ellipse::has_start_angle ( ) const

Check the start angle.

◆ initialize()

void geomtools::ellipse::initialize ( const datatools::properties ,
const handle_dict_type = 0 
)
virtual

Initialize from properties and a dictionary of 3D-objects.

Reimplemented from geomtools::i_object_3d.

◆ is_circle()

bool geomtools::ellipse::is_circle ( ) const

Check if the ellipse is a circle.

◆ is_on_curve()

virtual bool geomtools::ellipse::is_on_curve ( const vector_3d ,
double  a_tolerance = GEOMTOOLS_PROPER_TOLERANCE 
) const
virtual

Check if a point is on the curve (approximative algorithm)

Implements geomtools::i_shape_1d.

◆ is_valid()

bool geomtools::ellipse::is_valid ( ) const
virtual

Check the validity of the ellipse.

Implements geomtools::i_object_3d.

◆ is_x_oriented()

bool geomtools::ellipse::is_x_oriented ( ) const

Check if the ellipse is X oriented.

◆ is_y_oriented()

bool geomtools::ellipse::is_y_oriented ( ) const

Check if the ellipse is Y oriented.

◆ reset()

virtual void geomtools::ellipse::reset ( )
virtual

Reset.

Reimplemented from geomtools::i_object_3d.

◆ set_delta_angle()

void geomtools::ellipse::set_delta_angle ( double  )

Set the delta angle.

◆ set_radii()

void geomtools::ellipse::set_radii ( double  x_radius_,
double  y_radius_ 
)

Set the radii.

◆ set_start_angle()

void geomtools::ellipse::set_start_angle ( double  )

Set the start angle.

◆ set_x_radius()

void geomtools::ellipse::set_x_radius ( double  x_radius_)

Set the X radius.

◆ set_y_radius()

void geomtools::ellipse::set_y_radius ( double  y_radius_)

Set the Y radius.

◆ squared_distance_to_point()

static double geomtools::ellipse::squared_distance_to_point ( double  t_,
void *  params_ 
)
static

Compute the squared distance between a point H on the helix with parameter t (xh = a * cos(t), yh = b * sin(t)) and an arbitrary position (xm, ym) in the X,Y plane

◆ squared_distance_to_point_with_derivative()

static void geomtools::ellipse::squared_distance_to_point_with_derivative ( double  t_,
void *  params_,
double *  f_,
double *  df_ 
)
static

Compute the squared distance between a point H on the helix with parameter t (xh = a * cos(t), yh = b * sin(t)) and an arbitrary position (xm, ym) in the X,Y plane. Also compute the derivative of the squared distance with respect to the parameter t

◆ tree_dump()

virtual void geomtools::ellipse::tree_dump ( std::ostream &  a_out = std::clog,
const std::string &  a_title = "",
const std::string &  a_indent = "",
bool  a_inherit = false 
) const
virtual

Smart print.

Reimplemented from geomtools::i_object_3d.


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