BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members
BALL::TCircle3< T > Class Template Reference

#include <BALL/MATHS/circle3.h>

Inheritance diagram for BALL::TCircle3< T >:
BALL::VIEW::Disc

Public Member Functions

Constructors and Destructors
 TCircle3 ()
 
 TCircle3 (const TCircle3 &circle)
 
 TCircle3 (const TVector3< T > &point, const TVector3< T > &normal, const T &radius)
 
virtual ~TCircle3 ()
 
virtual void clear ()
 
Assignment
void swap (TCircle3 &circle)
 
void set (const TCircle3 &circle)
 
void set (const TVector3< T > &point, const TVector3< T > &normal, const T &rad)
 
TCircle3operator= (const TCircle3 &circle)
 
void get (TCircle3 &circle) const
 
void get (TVector3< T > &point, TVector3< T > &normal, T &rhs) const
 
Predicates
bool operator== (const TCircle3 &circle) const
 
bool operator!= (const TCircle3 &circle) const
 
bool has (const TVector3< T > &point, bool on_surface=false) const
 
Debugging and Diagnostics
bool isValid () const
 
void dump (std::ostream &s=std::cout, Size depth=0) const
 

Public Attributes

Attributes
TVector3< T > p
 
TVector3< T > n
 
radius
 

Detailed Description

template<typename T>
class BALL::TCircle3< T >

Generic Circle in Three-Dimensional Space.

Definition at line 27 of file circle3.h.

Constructor & Destructor Documentation

template<typename T>
BALL::TCircle3< T >::TCircle3 ( )
inline

Default constructor. This method creates a new TCircle3 object. The three components are initialized to 0.

Definition at line 59 of file circle3.h.

template<typename T>
BALL::TCircle3< T >::TCircle3 ( const TCircle3< T > &  circle)
inline

Copy constructor. Create a new TCircle3 object from another.

Parameters
circlethe TCircle3 object to be copied

Definition at line 70 of file circle3.h.

template<typename T>
BALL::TCircle3< T >::TCircle3 ( const TVector3< T > &  point,
const TVector3< T > &  normal,
const T &  radius 
)
inline

Detailed constructor. Create a new TCircle3 object from the central point, the normal and a radius.

Parameters
pointassigned to the point
normalassigned to the normal
radiusassigned tp the radius

Definition at line 83 of file circle3.h.

template<typename T>
virtual BALL::TCircle3< T >::~TCircle3 ( )
inlinevirtual

Destructor. Destructs the TCircle3 object. As there are no dynamic data structures, nothing happens.

Definition at line 94 of file circle3.h.

Member Function Documentation

template<typename T>
virtual void BALL::TCircle3< T >::clear ( )
inlinevirtual

Clear method. The values are set to 0.

Reimplemented in BALL::VIEW::Disc.

Definition at line 101 of file circle3.h.

template<typename T>
void BALL::TCircle3< T >::dump ( std::ostream &  s = std::cout,
Size  depth = 0 
) const
inline

Internal state dump. Dump the current internal state of {*this} to the output ostream s with dumping depth depth .

Parameters
s- output stream where to output the internal state of {*this}
depth- the dumping depth

Definition at line 251 of file circle3.h.

template<typename T>
void BALL::TCircle3< T >::get ( TCircle3< T > &  circle) const
inline

Assign to another TCircle3. Assigns the components to another circle.

Parameters
circlethe circle to be assigned to

Definition at line 170 of file circle3.h.

template<typename T>
void BALL::TCircle3< T >::get ( TVector3< T > &  point,
TVector3< T > &  normal,
T &  rhs 
) const
inline

Assign to two variables of type TVector3 and one T value.

Parameters
pointthe center point
normalthe circle normal
rhsthe radius

Definition at line 182 of file circle3.h.

template<typename T>
bool BALL::TCircle3< T >::has ( const TVector3< T > &  point,
bool  on_surface = false 
) const
inline

Test if a given point is a member of the circle. Optional it can be testet, if the point lies on the surface.

Parameters
pointthe point to be tested
on_surfacetrue to test the surface (default = false)
Returns
bool, true or false

Definition at line 217 of file circle3.h.

template<typename T>
bool BALL::TCircle3< T >::isValid ( ) const
inline

Test if instance is valid. Always returns true

Returns
bool true

Definition at line 240 of file circle3.h.

template<typename T>
bool BALL::TCircle3< T >::operator!= ( const TCircle3< T > &  circle) const
inline

Inequality operator.

Returns
bool, false if all components are equal, true otherwise

Definition at line 206 of file circle3.h.

template<typename T>
TCircle3& BALL::TCircle3< T >::operator= ( const TCircle3< T > &  circle)
inline

Assignment operator. Assign the components from another circle.

Parameters
circlethe circle to assign from

Definition at line 157 of file circle3.h.

template<typename T>
bool BALL::TCircle3< T >::operator== ( const TCircle3< T > &  circle) const
inline

Equality operator.

Returns
bool, true if all components are equal, false otherwise

Definition at line 198 of file circle3.h.

template<typename T>
void BALL::TCircle3< T >::set ( const TCircle3< T > &  circle)
inline

Assign from another TCircle3.

Parameters
circlethe TCirce3 object to assign from

Definition at line 134 of file circle3.h.

template<typename T>
void BALL::TCircle3< T >::set ( const TVector3< T > &  point,
const TVector3< T > &  normal,
const T &  rad 
)
inline

Assign the circle components.

Parameters
pointassigned to the point
normalassigned to the normal
radassigned to the radius

Definition at line 146 of file circle3.h.

template<typename T>
void BALL::TCircle3< T >::swap ( TCircle3< T > &  circle)
inline

Swap the contents of two circles.

Parameters
circlethe circle to swap contents with

Definition at line 116 of file circle3.h.

Member Data Documentation

template<typename T>
TVector3<T> BALL::TCircle3< T >::n

Normal vector. This vector is orthogonal to the circle's plane.

Definition at line 282 of file circle3.h.

template<typename T>
TVector3<T> BALL::TCircle3< T >::p

Circle Center. This point describes the center of the circle.

Definition at line 277 of file circle3.h.

template<typename T>
T BALL::TCircle3< T >::radius

Radius. The radius of the circle.

Definition at line 287 of file circle3.h.