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

3D torus function base class. 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::TorusBase:
[legend]

Public Member Functions

 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.
 

Static Protected Member Functions

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

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 base class. 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.

Constructor & Destructor Documentation

◆ TorusBase()

qugar::impl::funcs::TorusBase::TorusBase ( 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

◆ axis()

const Point< 3 > & qugar::impl::funcs::TorusBase::axis ( ) const
nodiscard

Gets the axis of the plane.

Returns
real The plane's axis.

◆ center()

const Point< 3 > & qugar::impl::funcs::TorusBase::center ( ) const
nodiscard

Gets the center of the plane.

Returns
real The plane's center.

◆ get_default_axis()

static Point< 3 > qugar::impl::funcs::TorusBase::get_default_axis ( )
staticnodiscardprotected

Gets the default axis of the torus. It is set to the z-axis of the Cartesian coordinate system.

◆ get_default_center()

static Point< 3 > qugar::impl::funcs::TorusBase::get_default_center ( )
staticnodiscardprotected

Gets the default center of the torus. It is set to the center of the Cartesian coordinate system.

◆ major_radius()

real qugar::impl::funcs::TorusBase::major_radius ( ) const
nodiscard

Gets the major radius of the torus.

Returns
real The torus' major radius.

◆ minor_radius()

real qugar::impl::funcs::TorusBase::minor_radius ( ) const
nodiscard

Gets the minor radius of the torus.

Returns
real The torus' minor radius.

Member Data Documentation

◆ axis_

Point<3> qugar::impl::funcs::TorusBase::axis_
protected

Axis of the torus.

◆ center_

Point<3> qugar::impl::funcs::TorusBase::center_
protected

Center of the torus.

◆ major_radius_

real qugar::impl::funcs::TorusBase::major_radius_
protected

Major radius of the torus.

◆ minor_radius_

real qugar::impl::funcs::TorusBase::minor_radius_
protected

Minor radius of the torus.


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