VART::Cylinder Class Reference

A cylinder or cone. More...

#include <cylinder.h>

Inheritance diagram for VART::Cylinder:

VART::GraphicObj VART::SceneNode VART::MemoryObj

List of all members.

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::Cylinderoperator= (const VART::Cylinder &cylinder)
virtual VART::SceneNodeCopy ()
 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 ()


Detailed Description

A cylinder or cone.

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.


Member Enumeration Documentation

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 '|'.

Enumerator:
NONE 
BOTTOM 
SIDES 
NO_TOP 
TOP 
NO_SIDES 
NO_BOTTOM 
ALL 

Definition at line 24 of file cylinder.h.


Constructor & Destructor Documentation

VART::Cylinder::Cylinder (  ) 

Creates an uninitialized cylinder.

Definition at line 18 of file cylinder.cpp.

VART::Cylinder::Cylinder ( const VART::Cylinder cylinder  ) 

Definition at line 22 of file cylinder.cpp.

References operator=().

VART::Cylinder::Cylinder ( float  fHi,
float  fRad 
)

VART::Cylinder::Cylinder ( float  fHi,
float  fRad,
bool  bS,
bool  bT,
bool  bB 
)


Member Function Documentation

VART::Cylinder & VART::Cylinder::operator= ( const VART::Cylinder 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  ) 

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]

Sets the value of the top radius.

Definition at line 45 of file cylinder.h.

void VART::Cylinder::SetBottomRadius ( float  r  )  [inline]

Sets the value of the bottom radius.

Definition at line 47 of file cylinder.h.

void VART::Cylinder::SetMaterial ( const Material mat  )  [inline]

Material assignment.

Definition at line 50 of file cylinder.h.

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.

References BOTTOM, SIDES, and TOP.

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.

References BOTTOM, SIDES, and TOP.

VART::Cylinder::PartsID VART::Cylinder::GetPartsVisibility (  ) 

Returns internal visibility state as PartsID.

Definition at line 101 of file cylinder.cpp.

References BOTTOM, NONE, SIDES, and TOP.

void VART::Cylinder::ShowSide ( bool  yesno  ) 

Deprecated:
Use SetPartsVisibility or TogglePartsVisibilty instead.

Definition at line 110 of file cylinder.cpp.

void VART::Cylinder::ShowTop ( bool  yesno  ) 

Deprecated:
Use SetPartsVisibility or TogglePartsVisibilty instead.

Definition at line 116 of file cylinder.cpp.

void VART::Cylinder::ShowBottom ( bool  yesno  ) 

Deprecated:
Use SetPartsVisibility or TogglePartsVisibilty instead.

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   ) 

Returns the top radius.

Definition at line 133 of file cylinder.cpp.

float VART::Cylinder::GetBottomRadius ( void   ) 

Returns the bottom radius.

Definition at line 138 of file cylinder.cpp.

Material VART::Cylinder::GetMaterial (  )  const [inline]

Returns of copy of the cylinder's material.

Definition at line 77 of file cylinder.h.

bool VART::Cylinder::ShowSide ( void   ) 

Deprecated:
Use GetPartsVisibility instead.

Definition at line 143 of file cylinder.cpp.

bool VART::Cylinder::ShowTop ( void   ) 

Deprecated:
Use GetPartsVisibility instead.

Definition at line 149 of file cylinder.cpp.

bool VART::Cylinder::ShowBottom ( void   ) 

Deprecated:
Use GetPartsVisibility instead.

Definition at line 155 of file cylinder.cpp.


The documentation for this class was generated from the following files:

Generated on Mon Sep 8 15:56:50 2008 for V-ART by  doxygen 1.5.6