QUGaR 0.0.4
Loading...
Searching...
No Matches
qugar::impl::funcs::SphereBase< dim > Class Template Reference

Dimension independent spherical function. More...

#include <primitive_funcs_lib.hpp>

Inheritance diagram for qugar::impl::funcs::SphereBase< dim >:
[legend]

Public Member Functions

 SphereBase (real radius, const Point< dim > &center)
 Constructs a Sphere object with a specified center and radius.
 
real radius () const
 Gets the radius of the sphere.
 
const Point< dim > & center () const
 Gets the center of the sphere.
 

Static Protected Member Functions

static Point< dim > get_default_center ()
 Gets the default center of the sphere. It is set to the origin of the Cartesian coordinate system.
 

Protected Attributes

real radius_ { 0 }
 Radius of the sphere.
 
Point< dim > center_
 Center of the sphere.
 

Detailed Description

template<int dim>
class qugar::impl::funcs::SphereBase< dim >

Dimension independent spherical function.

Note
This is the base class for Bezier and general implementations.
Template Parameters
dimParametric dimension.

Constructor & Destructor Documentation

◆ SphereBase()

template<int dim>
qugar::impl::funcs::SphereBase< dim >::SphereBase ( real radius,
const Point< dim > & center )

Constructs a Sphere object with a specified center and radius.

Parameters
radiusThe radius of the sphere.
centerThe center of the sphere.

Member Function Documentation

◆ center()

template<int dim>
const Point< dim > & qugar::impl::funcs::SphereBase< dim >::center ( ) const
nodiscard

Gets the center of the sphere.

Returns
real The sphere's center.

◆ get_default_center()

template<int dim>
static Point< dim > qugar::impl::funcs::SphereBase< dim >::get_default_center ( )
staticnodiscardprotected

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

◆ radius()

template<int dim>
real qugar::impl::funcs::SphereBase< dim >::radius ( ) const
nodiscard

Gets the radius of the sphere.

Returns
real The sphere's radius.

Member Data Documentation

◆ center_

template<int dim>
Point<dim> qugar::impl::funcs::SphereBase< dim >::center_
protected

Center of the sphere.

◆ radius_

template<int dim>
real qugar::impl::funcs::SphereBase< dim >::radius_ { 0 }
protected

Radius of the sphere.


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