cgv
Loading...
Searching...
No Matches
cgv::media::sphere< T, N > Class Template Reference

A sphere data structure. More...

#include <sphere.h>

Public Member Functions

 sphere ()
 create a unit sphere
 
 sphere (const cgv::math::vec< T > &c, const T &radius)
 construct from center and radius
 

Public Attributes

cgv::math::vec< T > h
 

Detailed Description

template<typename T, int N>
class cgv::media::sphere< T, N >

A sphere data structure.

The sphere is defined by a homogeneous vector which keeps the center point in the first components and the radius in the last component.

Definition at line 14 of file sphere.h.

Constructor & Destructor Documentation

◆ sphere() [1/2]

template<typename T , int N>
cgv::media::sphere< T, N >::sphere ( )
inline

create a unit sphere

Definition at line 19 of file sphere.h.

◆ sphere() [2/2]

template<typename T , int N>
cgv::media::sphere< T, N >::sphere ( const cgv::math::vec< T > &  c,
const T &  radius 
)
inline

construct from center and radius

Definition at line 23 of file sphere.h.

References cgv::math::vec< T >::resize(), and cgv::math::vec< T >::size().

Member Data Documentation

◆ h

template<typename T , int N>
cgv::math::vec<T> cgv::media::sphere< T, N >::h

Definition at line 17 of file sphere.h.


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