Loading...
Searching...
No Matches
tube.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: tube.h,v 1.11.16.1 2007-03-25 21:26:12 oliver Exp $
//
#ifndef BALL_VIEW_PRIMITIV_TUBE_H
#define BALL_VIEW_PRIMITIV_TUBE_H
#ifndef BALL_VIEW_KERNEL_GEOMETRICOBJECT_H
# include <BALL/VIEW/KERNEL/geometricObject.h>
#endif
#ifndef BALL_VIEW_DATATYPE_VERTEX2_H
# include <BALL/VIEW/DATATYPE/vertex2.h>
#endif
namespace BALL
{
namespace VIEW
{
class BALL_VIEW_EXPORT Tube
: public GeometricObject,
public Vertex2
{
public:
BALL_CREATE(Tube)
//@{
Tube();
Tube(const Tube& tube);
virtual ~Tube();
virtual void clear();
void set(const Tube& tube);
const Tube& operator = (const Tube& tube);
void swap(Tube& tube);
float getLength() const
{return (getVertex1() - getVertex2()).getLength();}
float getSquareLength() const
{return (getVertex1() - getVertex2()).getSquareLength();}
virtual bool isValid() const;
virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
// Method to get all vertices from a geometric object
virtual void getVertices(vector<Vector3>& vertices) const;
float getRadius() const
{ return radius_;}
void setRadius(float radius)
{ radius_ = radius;}
private:
float radius_;
};
} // namespace VIEW
} // namespace BALL
#endif // BALL_VIEW_PRIMITIV_TUBE_H
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
BALL::VIEW::GeometricObject::GeometricObject
GeometricObject()
BALL::VIEW::Tube::swap
void swap(Tube &tube)
BALL::VIEW::Tube::clear
virtual void clear()
BALL::VIEW::Tube::getLength
float getLength() const
Definition tube.h:120
BALL::VIEW::Tube::isValid
virtual bool isValid() const
BALL::VIEW::Tube::setRadius
void setRadius(float radius)
Definition tube.h:176
BALL::VIEW::Tube::Tube
Tube()
BALL::VIEW::Tube::getRadius
float getRadius() const
Definition tube.h:171
BALL::VIEW::Tube::dump
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
BALL::VIEW::Tube::getSquareLength
float getSquareLength() const
Definition tube.h:127
BALL::VIEW::Tube::set
void set(const Tube &tube)
BALL::VIEW::Tube::getVertices
virtual void getVertices(vector< Vector3 > &vertices) const
BALL::VIEW::Vertex2::Vertex2
Vertex2()
BALL::VIEW::Vertex2::getVertex2
Vector3 & getVertex2()
BALL::VIEW::Vertex2::getVertex1
Vector3 & getVertex1()
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
geometricObject.h
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
vertex2.h