QUGaR 0.0.4
Loading...
Searching...
No Matches
qugar::impl::funcs::Torus Class Reference

3D torus function. The function is defined by the torus center, axis, and major and inner radii. The function presents a negative sign inside the torus, and positive outside. More...

#include <primitive_funcs_lib.hpp>

Inheritance diagram for qugar::impl::funcs::Torus:
[legend]
Collaboration diagram for qugar::impl::funcs::Torus:
[legend]

Public Member Functions

 Torus (real major_radius, real minor_radius)
 Constructor.
 
 Torus (real major_radius, real minor_radius, const Point< 3 > &center)
 Constructor.
 
 Torus (real major_radius, real minor_radius, const Point< 3 > &center, const Point< 3 > &axis)
 Constructor.
 
template<typename T >
Point< 3, T > compute_P_x_0 (const Point< 3, T > &point) const
 Computes the normal component of the a vector respect to the origin.
 
- Public Member Functions inherited from qugar::impl::funcs::TorusBase
 TorusBase (real major_radius, real minor_radius, const Point< 3 > &center, const Point< 3 > &axis)
 Constructor.
 
real major_radius () const
 Gets the major radius of the torus.
 
real minor_radius () const
 Gets the minor radius of the torus.
 
const Point< 3 > & center () const
 Gets the center of the plane.
 
const Point< 3 > & axis () const
 Gets the axis of the plane.
 
- Public Member Functions inherited from qugar::impl::DomainFunc< dim, range >
 DomainFunc ()=default
 Default constructor.
 
 DomainFunc (const DomainFunc &)=default
 Default copy constructor.
 
 DomainFunc (DomainFunc &&)=default
 Default move constructor.
 
DomainFuncoperator= (const DomainFunc &)=default
 Default copy assignment operator.
 
DomainFuncoperator= (DomainFunc &&)=default
 Default move assignment operator.
 
virtual ~DomainFunc ()=default
 Default virtual destructor.
 
virtual Value< realoperator() (const Point< dim > &point) const =0
 Evaluator operator.
 
virtual Value< Interval< dim > > operator() (const Point< dim, Interval< dim > > &point) const =0
 Evaluator operator.
 
virtual Gradient< realgrad (const Point< dim > &point) const =0
 Gradient evaluator operator.
 
virtual Gradient< Interval< dim > > grad (const Point< dim, Interval< dim > > &point) const =0
 Gradient evaluator operator.
 
virtual Hessian< realhessian (const Point< dim > &point) const =0
 Hessian evaluator operator.
 

Public Attributes

 declare_impl_func_virtual_interface_3D
 

Additional Inherited Members

- Public Types inherited from qugar::impl::DomainFunc< dim, range >
template<int N>
using Interval = ::algoim::Interval<N>
 Algoim's interval alias.
 
template<typename T >
using Value = std::conditional_t<range == 1, T, Vector<T, range>>
 Value type.
 
template<typename T >
using Gradient = Vector<Value<T>, dim>
 Gradient type.
 
template<typename T >
using Hessian = Vector<Value<T>, num_hessian>
 Hessian (symmetric type).
 
- Static Public Attributes inherited from qugar::impl::DomainFunc< dim, range >
static const int num_hessian = dim * (dim + 1) / 2
 Number of Hessian (symmetric) components.
 
- Static Protected Member Functions inherited from qugar::impl::funcs::TorusBase
static Point< 3 > get_default_center ()
 Gets the default center of the torus. It is set to the center of the Cartesian coordinate system.
 
static Point< 3 > get_default_axis ()
 Gets the default axis of the torus. It is set to the z-axis of the Cartesian coordinate system.
 
- Protected Attributes inherited from qugar::impl::funcs::TorusBase
real major_radius_
 Major radius of the torus.
 
real minor_radius_
 Minor radius of the torus.
 
Point< 3 > center_
 Center of the torus.
 
Point< 3 > axis_
 Axis of the torus.
 

Detailed Description

3D torus function. The function is defined by the torus center, axis, and major and inner radii. The function presents a negative sign inside the torus, and positive outside.

Note
Non-Bezier version.

Constructor & Destructor Documentation

◆ Torus() [1/3]

qugar::impl::funcs::Torus::Torus ( real major_radius,
real minor_radius )

Constructor.

Center is set to (0,0,0) and axis to (0,0,1).

Parameters
major_radiusRadius of the major circle.
minor_radiusRadius of the inner circle.

◆ Torus() [2/3]

qugar::impl::funcs::Torus::Torus ( real major_radius,
real minor_radius,
const Point< 3 > & center )

Constructor.

The axis is set to (0,0,1).

Parameters
major_radiusRadius of the major circle.
minor_radiusRadius of the inner circle.
centerTorus' center.

◆ Torus() [3/3]

qugar::impl::funcs::Torus::Torus ( real major_radius,
real minor_radius,
const Point< 3 > & center,
const Point< 3 > & axis )

Constructor.

Parameters
major_radiusRadius of the major circle.
minor_radiusRadius of the inner circle.
centerTorus' center.
axisTorus' axis (perpendicular to the major circle plane).

Member Function Documentation

◆ compute_P_x_0()

template<typename T >
Point< 3, T > qugar::impl::funcs::Torus::compute_P_x_0 ( const Point< 3, T > & point) const

Computes the normal component of the a vector respect to the origin.

Given a point, computes the relative vector respect to the origin, and then computes the normal component of the vector respect to the torus' axis.

Template Parameters
TThe type of the coordinates of the point.
Parameters
pointThe input 3D point for which the P_x_0 value is to be computed.
Returns
A 3D point representing the computed P_x_0 value.

Member Data Documentation

◆ declare_impl_func_virtual_interface_3D

qugar::impl::funcs::Torus::declare_impl_func_virtual_interface_3D

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