#include <cylinder.h>

Public Types | |
| enum | PartsID { NONE, BOTTOM, SIDES, NO_TOP, TOP, NO_SIDES, NO_BOTTOM, ALL } |
| Bitmask for cylinder parts. More... | |
Public Member Functions | |
| Cylinder () | |
| Creates an uninitialized cylinder. | |
| Cylinder (const VART::Cylinder &cylinder) | |
| VART::Cylinder & | operator= (const VART::Cylinder &cylinder) |
| virtual VART::SceneNode * | Copy () |
| Returns a copy of an cylinder. Every derived class must reimplements this method, to avoid errors with VART::SceneNode::RecursiveCopy. | |
| Cylinder (float fHi, float fRad) | |
| Cylinder (float fHi, float fRad, bool bS, bool bT, bool bB) | |
| virtual void | ComputeBoundingBox () |
| Computes the bounding box. | |
| void | SetHeight (float h) |
| void | SetRadius (float r) |
| Sets the value of top and bottom radius. | |
| void | SetTopRadius (float r) |
| Sets the value of the top radius. | |
| void | SetBottomRadius (float r) |
| Sets the value of the bottom radius. | |
| void | SetMaterial (const Material &mat) |
| Material assignment. | |
| void | SetPartsVisibility (PartsID parts) |
| Sets which parts are visible. | |
| void | TogglePartsVisibilty (PartsID parts) |
| Toogle visibility of marked parts. | |
| PartsID | GetPartsVisibility () |
| Returns internal visibility state as PartsID. | |
| void | ShowSide (bool yesno) |
| void | ShowTop (bool yesno) |
| void | ShowBottom (bool yesno) |
| float | GetHeight () |
| float | GetTopRadius () |
| Returns the top radius. | |
| float | GetBottomRadius () |
| Returns the bottom radius. | |
| Material | GetMaterial () const |
| Returns of copy of the cylinder's material. | |
| bool | ShowSide () |
| bool | ShowTop () |
| bool | ShowBottom () |
Cylinders are created along the z axis, with bottom at zero and top at height. Cones are considered a special case of cylinder, where the top or bottom has zero radius.
Definition at line 18 of file cylinder.h.
Bitmask for cylinder parts.
The bit meanings from right (lower) to left are: bottom disc, sides and top disc. IDs may combied using operators '&' and '|'.
Definition at line 24 of file cylinder.h.
| VART::Cylinder::Cylinder | ( | ) |
| VART::Cylinder::Cylinder | ( | const VART::Cylinder & | cylinder | ) |
| VART::Cylinder::Cylinder | ( | float | fHi, | |
| float | fRad | |||
| ) |
Definition at line 45 of file cylinder.cpp.
References VART::GraphicObj::bBox, VART::GraphicObj::recBBox, and VART::BoundingBox::SetBoundingBox().
| VART::Cylinder::Cylinder | ( | float | fHi, | |
| float | fRad, | |||
| bool | bS, | |||
| bool | bT, | |||
| bool | bB | |||
| ) |
Definition at line 54 of file cylinder.cpp.
References VART::GraphicObj::bBox, VART::GraphicObj::recBBox, and VART::BoundingBox::SetBoundingBox().
| VART::Cylinder & VART::Cylinder::operator= | ( | const VART::Cylinder & | cylinder | ) |
Definition at line 27 of file cylinder.cpp.
References bottomVisible, btRadius, height, material, VART::SceneNode::operator=(), sidesVisible, topRadius, and topVisible.
Referenced by Cylinder().
| VART::SceneNode * VART::Cylinder::Copy | ( | ) | [virtual] |
Returns a copy of an cylinder. Every derived class must reimplements this method, to avoid errors with VART::SceneNode::RecursiveCopy.
Implements VART::SceneNode.
Definition at line 40 of file cylinder.cpp.
| void VART::Cylinder::ComputeBoundingBox | ( | ) | [virtual] |
Computes the bounding box.
Implements VART::GraphicObj.
Definition at line 66 of file cylinder.cpp.
References VART::GraphicObj::bBox, and VART::BoundingBox::SetBoundingBox().
| void VART::Cylinder::SetHeight | ( | float | h | ) |
Definition at line 72 of file cylinder.cpp.
References VART::GraphicObj::bBox, VART::GraphicObj::ComputeRecursiveBoundingBox(), and VART::BoundingBox::SetBoundingBox().
| void VART::Cylinder::SetRadius | ( | float | r | ) |
Sets the value of top and bottom radius.
Definition at line 80 of file cylinder.cpp.
References VART::GraphicObj::bBox, VART::GraphicObj::ComputeRecursiveBoundingBox(), and VART::BoundingBox::SetBoundingBox().
| void VART::Cylinder::SetTopRadius | ( | float | r | ) | [inline] |
| void VART::Cylinder::SetBottomRadius | ( | float | r | ) | [inline] |
| void VART::Cylinder::SetMaterial | ( | const Material & | mat | ) | [inline] |
| void VART::Cylinder::SetPartsVisibility | ( | PartsID | parts | ) |
Sets which parts are visible.
All three bits present in the bitmask are copied to internal visibility state.
Definition at line 87 of file cylinder.cpp.
| void VART::Cylinder::TogglePartsVisibilty | ( | PartsID | parts | ) |
Toogle visibility of marked parts.
Toggle visibility of all parts whose bits are set in given bitmask.
Definition at line 94 of file cylinder.cpp.
| VART::Cylinder::PartsID VART::Cylinder::GetPartsVisibility | ( | ) |
| void VART::Cylinder::ShowSide | ( | bool | yesno | ) |
Definition at line 110 of file cylinder.cpp.
| void VART::Cylinder::ShowTop | ( | bool | yesno | ) |
Definition at line 116 of file cylinder.cpp.
| void VART::Cylinder::ShowBottom | ( | bool | yesno | ) |
Definition at line 122 of file cylinder.cpp.
| float VART::Cylinder::GetHeight | ( | void | ) |
Definition at line 128 of file cylinder.cpp.
| float VART::Cylinder::GetTopRadius | ( | void | ) |
| float VART::Cylinder::GetBottomRadius | ( | void | ) |
| Material VART::Cylinder::GetMaterial | ( | ) | const [inline] |
| bool VART::Cylinder::ShowSide | ( | void | ) |
| bool VART::Cylinder::ShowTop | ( | void | ) |
| bool VART::Cylinder::ShowBottom | ( | void | ) |
1.5.6