Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
spat::Sphere< Valtype > Struct Template Reference

Sphere with center and radius. More...

#include <C:/Trend/Development/Trax3/Code/spat/Sphere.h>

Inheritance diagram for spat::Sphere< Valtype >:

Public Types

typedef Valtype value_type

Public Member Functions

void Init () noexcept
 Initializes the sphere to unit sphere around origin.
Position< Valtype > Center () const noexcept
Valtype Radius () const noexcept
bool Includes (Valtype x, Valtype y, Valtype z) const noexcept
bool Includes (const Position< Valtype > &pt) const noexcept
Box< Valtype > ExBox () const noexcept
 Gets the circumscribed box of the sphere.
Box< Valtype > InBox () const noexcept
 Gets the inscribed box of the sphere.
Construction
Parameters
center
radius
 Sphere () noexcept=default
 Does not initialize the members.
 Sphere (const Position< Valtype > &center, Valtype radius) noexcept
 Does not initialize the members.

Public Attributes

Position< Valtype > c
 Center of the sphere.
Valtype r
 Radius of the sphere.

Detailed Description

template<typename Valtype>
struct spat::Sphere< Valtype >

Sphere with center and radius.

Member Function Documentation

◆ Center()

template<typename Valtype>
Position< Valtype > spat::Sphere< Valtype >::Center ( ) const
inlinenoexcept
Returns
The geometric center of the sphere.

◆ Includes() [1/2]

template<typename Valtype>
bool spat::Sphere< Valtype >::Includes ( const Position< Valtype > & pt) const
inlinenoexcept
Returns
True if the point lays inside the sphere.

A point on the surface is not included in the sphere

◆ Includes() [2/2]

template<typename Valtype>
bool spat::Sphere< Valtype >::Includes ( Valtype x,
Valtype y,
Valtype z ) const
inlinenoexcept
Returns
True if the point lays inside the sphere.

A point on the surface is not included in the sphere

◆ Radius()

template<typename Valtype>
Valtype spat::Sphere< Valtype >::Radius ( ) const
inlinenoexcept
Returns
The radius of the sphere.

The documentation for this struct was generated from the following files:
  • C:/Trend/Development/Trax3/Code/spat/Box.h
  • C:/Trend/Development/Trax3/Code/spat/Sphere.h