BALL  1.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Private Attributes
BALL::VIEW::Tube Class Reference

#include <BALL/VIEW/PRIMITIVES/tube.h>

Inheritance diagram for BALL::VIEW::Tube:
BALL::VIEW::GeometricObject BALL::VIEW::Vertex2

List of all members.

Public Member Functions

Constructors
 Tube ()
 Tube (const Tube &tube)
Destructors
virtual ~Tube ()
virtual void clear ()
Assignment methods
void set (const Tube &tube)
const Tubeoperator= (const Tube &tube)
void swap (Tube &tube)
Accessors: inspectors and mutators
float getLength () const
float getSquareLength () const
debuggers and diagnostics
virtual bool isValid () const
virtual void dump (std::ostream &s=std::cout, Size depth=0) const
virtual void getVertices (vector< Vector3 > &vertices) const
Storers
float getRadius () const
void setRadius (float radius)

Private Attributes

float radius_

Detailed Description

Tube class. An instance of Tube represents an instance of the geometric representation "tube". A tube has the following properties.

Definition at line 37 of file tube.h.


Constructor & Destructor Documentation

Default Constructor. Construct new tube. The properties of this tube are set to:

  • color - to the color black
  • radius - set to 1
  • vertex1 - to the vector (0,0,0)
  • vertex2 - to the vector (0,0,0)
    Returns:
    Tube new constructed tube
    See also:
    GeometricObject
    Radius
    Vertex2
BALL::VIEW::Tube::Tube ( const Tube tube)

Copy constructor with cloning facility.

See also:
GeometricObject
Radius
Vertex2
virtual BALL::VIEW::Tube::~Tube ( ) [virtual]

Destructor. Default destruction of this tube.


Member Function Documentation

virtual void BALL::VIEW::Tube::clear ( ) [virtual]

Explicit default initialization. Calls GeometricObject::clear Calls Radius::clear Calls Vertex2::clear

See also:
GeometricObject::clear
Radius::clear
Vertex2::clear

Reimplemented from BALL::VIEW::Vertex2.

virtual void BALL::VIEW::Tube::dump ( std::ostream &  s = std::cout,
Size  depth = 0 
) const [virtual]

Internal value dump. Dump the current value of this tube to the output ostream s with dumping depth depth. Calls GeometricObject::dump. Calls Radius::dump. Calls Vertex2::dump.

Parameters:
soutput stream where to output the value of this tube
depththe dumping depth
See also:
GeometricObject::dump
Radius::dump
Vertex2::dump

Reimplemented from BALL::VIEW::Vertex2.

float BALL::VIEW::Tube::getLength ( ) const [inline]

Inspection of the length of the tube. Access the length of this tube.

Returns:
float the length of this tube

Definition at line 120 of file tube.h.

float BALL::VIEW::Tube::getRadius ( ) const [inline]

Get the radius.

Definition at line 171 of file tube.h.

Inspection of the square length of the tube. Access the square length of this tube.

Returns:
float the square length of this tube

Definition at line 127 of file tube.h.

virtual void BALL::VIEW::Tube::getVertices ( vector< Vector3 > &  vertices) const [virtual]

Reimplemented from BALL::VIEW::GeometricObject.

virtual bool BALL::VIEW::Tube::isValid ( ) const [virtual]

Internal state and consistency self-validation. Initiate self-validation of the internal state and data structure consistencies of this tube. If the internal state of this tube is correct (self-validated) and consistent true is returned, false otherwise. Calls GeometricObject::isValid. Calls Vertex2::isValid.

Returns:
bool true if the internal state of this tube is correct (self-validated) and consistent, false otherwise
See also:
GeometricObject::isValid
Vertex2::isValid

Reimplemented from BALL::VIEW::Vertex2.

const Tube& BALL::VIEW::Tube::operator= ( const Tube tube)

Assignment operator. Calls set.

void BALL::VIEW::Tube::set ( const Tube tube)

Assignment.

Parameters:
tubethe tube to be copied
See also:
Tube
void BALL::VIEW::Tube::setRadius ( float  radius) [inline]

Set the radius.

Definition at line 176 of file tube.h.

void BALL::VIEW::Tube::swap ( Tube tube)

Swapping of tube's. Swap the value of this tube with the tube tube.

Parameters:
tubethe tube being swapped with this tube

Member Data Documentation

Definition at line 183 of file tube.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines