Loading...
Searching...
No Matches
BALL::VIEW::Tube Class Reference
Visualisation » Geometric Objects

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

Inheritance diagram for BALL::VIEW::Tube:

## Public Member Functions

Constructors
| Tube ()
| Tube (const Tube &tube)
Destructors
virtual | ~Tube ()
virtual void | clear ()
Assignment methods
void | set (const Tube &tube)
const Tube & | operator= (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
Public Member Functions inherited from BALL::VIEW::GeometricObject
| GeometricObject ()
| GeometricObject (const GeometricObject &object)
virtual | ~GeometricObject ()
void | set (const GeometricObject &object)
GeometricObject & | operator= (const GeometricObject &object)
void | swap (GeometricObject &object)
void | setComposite (const Composite *composite)
const Composite * | getComposite () const
void | setColor (const ColorRGBA &color)
void | setColor (const ColorUnit &red, const ColorUnit &green, const ColorUnit &blue, const ColorUnit &alpha=(float) 1)
const ColorRGBA & | getColor () const
ColorRGBA & | getColor ()
void | getColor (ColorUnit &red, ColorUnit &green, ColorUnit &blue, ColorUnit &alpha) const
void | getColors (HashSet< String > &colors)
| Insert the colors of this object into the hashset.
bool | operator== (const GeometricObject &object) const
| Needed for MSVC.
bool | operator< (const GeometricObject &object) const
| Needed for MSVC.
virtual void | getVertices (std::vector< Vector3 > &) const
Public Member Functions inherited from BALL::VIEW::Vertex2
| Vertex2 ()
| Vertex2 (const Vertex2 &vertex)
virtual | ~Vertex2 ()
void | set (const Vertex2 &vertex)
const Vertex2 & | operator= (const Vertex2 &vertex)
void | swap (Vertex2 &vertex)
void | setVertex1 (const Vector3 &v)
void | setVertex1 (const float x, const float y, const float z)
Vector3 & | getVertex1 ()
const Vector3 & | getVertex1 () const
void | getVertex1 (Vector3 &v) const
void | getVertex1 (float &x, float &y, float &z) const
void | setVertex1Address (const Vector3 &v)
void | setDefaultVertex1Address ()
Vector3 * | getVertex1Address () const
void | setVertex2 (const Vector3 &v)
void | setVertex2 (const float x, const float y, const float z)
Vector3 & | getVertex2 ()
const Vector3 & | getVertex2 () const
void | getVertex2 (Vector3 &v) const
void | getVertex2 (float &x, float &y, float &z) const
void | setVertex2Address (const Vector3 &v)
void | setDefaultVertex2Address ()
Vector3 * | getVertex2Address () const
void | setVertices (const Vector3 &vertex1, const Vector3 &vertex2)
void | setVertices (const float vertex1_x, const float vertex1_y, const float vertex1_z, const float vertex2_x, const float vertex2_y, const float vertex2_z)
void | setVertexAddresses (const Vector3 &vertex1, const Vector3 &vertex2)
void | getVertices (Vector3 &vertex1, Vector3 &vertex2)
void | getVertices (float &vertex1_x, float &vertex1_y, float &vertex1_z, float &vertex2_x, float &vertex2_y, float &vertex2_z)
void | setDefaultVertexAddresses ()
bool | isDefaultVertex1Address () const
bool | isDefaultVertex2Address () const
bool | isDefaultVertexAddresses () const

## Storers

float | getRadius () const
void | setRadius (float radius)

## Detailed Description

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

- color - the color of the tube
- radius - the radius of the tube
- vertex1 - the first vertex of the tube
- vertex2 - the second vertex of the tube
    The class Tube is derived from the classes GeometricObject Radius and Vertex2. See these classes for further information concerning interface and additional methods.

Definition at line 37 of file tube.h.

## Constructor & Destructor Documentation

## Tube() [1/2]

BALL::VIEW::Tube::Tube | ( |  | ) |

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

## Tube() [2/2]

BALL::VIEW::Tube::Tube | ( | const Tube & | tube | ) |

Copy constructor with cloning facility.

See also
  GeometricObject
  Radius
  Vertex2

## ~Tube()

virtual BALL::VIEW::Tube::~Tube | ( |  | ) |

virtual

Destructor. Default destruction of this tube.

## Member Function Documentation

## clear()

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::GeometricObject.

## dump()

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

  s | output stream where to output the value of this tube
  depth | the dumping depth

See also
  GeometricObject::dump
  Radius::dump
  Vertex2::dump

Reimplemented from BALL::VIEW::GeometricObject.

## getLength()

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.

## getRadius()

float BALL::VIEW::Tube::getRadius | ( |  | ) | const

inline

Get the radius.

Definition at line 171 of file tube.h.

## getSquareLength()

float BALL::VIEW::Tube::getSquareLength | ( |  | ) | const

inline

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.

## getVertices()

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

virtual

## isValid()

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::GeometricObject.

## operator=()

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

Assignment operator. Calls set.

## set()

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

Assignment.

Parameters

  tube | the tube to be copied

See also
  Tube

## setRadius()

void BALL::VIEW::Tube::setRadius | ( | float | radius | ) |

inline

Set the radius.

Definition at line 176 of file tube.h.

## swap()

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

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

Parameters

  tube | the tube being swapped with this tube