#include <Cylinder.h>
Inheritance diagram for Cylinder:
Public Member Functions | |
Cylinder () | |
virtual std::string | getKind () const |
virtual void | draw (const Vector3d &pointOfView, const VisualizationParameterSet &visParams) |
void | setRadius (double radius) |
void | setHeight (double height) |
void | setClosed (bool closed) |
virtual SimObject * | clone () const |
virtual double | getMaxDistanceTo (Vector3d &base) const |
Protected Member Functions | |
virtual bool | intersectWithRay (const Vector3d &pos, const Vector3d &ray, Vector3d &intersectPos) |
Protected Attributes | |
double | radius |
double | height |
bool | closed |
Definition at line 20 of file Cylinder.h.
Cylinder::Cylinder | ( | ) |
SimObject * Cylinder::clone | ( | ) | const [virtual] |
Clones the object and its child nodes
Reimplemented from SimObject.
Definition at line 54 of file Cylinder.cpp.
References SimObject::addChildNode(), SimObject::childNodes, closed, Cylinder(), SimObject::fullName, height, SimObject::invisible, SimObject::name, SimObject::position, radius, SimObject::rotation, SimObject::setFullName(), SimObject::setName(), SimObject::setPosition(), and DrawableObject::surface.
void Cylinder::draw | ( | const Vector3d & | pointOfView, | |
const VisualizationParameterSet & | visParams | |||
) | [virtual] |
Draws the cylinder and its child nodes
pointOfView | The point of view from which the scene is drawn | |
visParams | Parameters for Visualization |
Reimplemented from SimObject.
Definition at line 19 of file Cylinder.cpp.
References closed, SimObject::draw(), SimObject::drawForCamera, Surface::getColor(), Vector3d::getXRotation(), Vector3d::getYRotation(), height, DrawableObject::inverted, SimObject::invisible, M_PI, SimObject::position, radius, Vector3d::rotate(), Vector3d::rotateX(), SimObject::rotation, DrawableObject::surface, and Vector3d::v.
virtual std::string Cylinder::getKind | ( | ) | const [inline, virtual] |
Returns a string describing the kind of object
Reimplemented from DrawableObject.
Definition at line 45 of file Cylinder.h.
double Cylinder::getMaxDistanceTo | ( | Vector3d & | base | ) | const [virtual] |
Returns the maximum distance of any point in the subtree to a given point
base | The point to compute the distance to |
Reimplemented from SimObject.
Definition at line 76 of file Cylinder.cpp.
References SimObject::childNodes, dist(), Vector3d::getLength(), height, SimObject::position, and radius.
bool Cylinder::intersectWithRay | ( | const Vector3d & | pos, | |
const Vector3d & | ray, | |||
Vector3d & | intersectPos | |||
) | [protected, virtual] |
Intersects the cylinder and its children with a ray
pos | The starting position of the ray | |
ray | The ray | |
intersectPos | The intersection point nearest to pos (if found) |
Reimplemented from SimObject.
Definition at line 96 of file Cylinder.cpp.
void Cylinder::setClosed | ( | bool | closed | ) | [inline] |
Sets the closed flag
closed | The closed flag |
Definition at line 67 of file Cylinder.h.
Referenced by SAX2Handler::parseCylinderAttributes().
void Cylinder::setHeight | ( | double | height | ) | [inline] |
Sets the height of the cylinder
height | The height |
Definition at line 62 of file Cylinder.h.
Referenced by SAX2Handler::parseCylinderAttributes().
void Cylinder::setRadius | ( | double | radius | ) | [inline] |
Sets the radius of the cylinder
radius | The radius |
Definition at line 57 of file Cylinder.h.
Referenced by SAX2Handler::parseCylinderAttributes().
bool Cylinder::closed [protected] |
Flag: The cylinder is closed, if true
Definition at line 28 of file Cylinder.h.
Referenced by clone(), Cylinder(), and draw().
double Cylinder::height [protected] |
The height of the cylinder
Definition at line 26 of file Cylinder.h.
Referenced by clone(), draw(), and getMaxDistanceTo().
double Cylinder::radius [protected] |
The radius of the cylinder
Definition at line 24 of file Cylinder.h.
Referenced by clone(), draw(), and getMaxDistanceTo().