version 3.3

VRS::SuperQuad Class Reference

Super Quadric Shape. More...

#include <vrs/superquad.h>

Inheritance diagram for VRS::SuperQuad:

VRS::Shape VRS::RenderObj VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 SuperQuad (double northSouth=1, double eastWest=1, double holeDiameter=0, const Vector &center=Vector(0, 0, 0))
void setNorthSouth (double)
 set roundness of the superquad.in north-south (y) direction
void setEastWest (double)
 set roundness of the superquad.in east-west (x and z) direction
double getNorthSouth () const
 get roundness of the superquad.in north-south (y) direction
double getEastWest () const
 get roundness of the superquad.in east-west (x and z) direction
void setHoleDiameter (double)
 set diameter of the SuperQuad's hole
double getHoleDiameter () const
 get diameter of the SuperQuad's hole
void setCenter (const Vector &)
 set the center.
Vector getCenter () const
 get the center.
virtual Bounds boundingBox () const
 bounding box of the SuperQuad.
 VRS_TYPEINFO (SuperQuad, Shape)
 VRS_SERIALIZABLE (SuperQuad)


Detailed Description

Super Quadric Shape.

Constructor & Destructor Documentation

VRS::SuperQuad::SuperQuad ( double  northSouth = 1,
double  eastWest = 1,
double  holeDiameter = 0,
const Vector center = Vector(0, 0, 0) 
)

A super quadric is defined by its north-south and east-west roundness (>=0, perhaps smaller than 3 for meaningful results), by its hole diameter (0: ellipsoid, >0: toroid), and its midpoint. If the superquad has a hole, the axis of the resulting toroid shape is in the y-axis.


Member Function Documentation

void VRS::SuperQuad::setNorthSouth ( double   ) 

set roundness of the superquad.in north-south (y) direction

void VRS::SuperQuad::setEastWest ( double   ) 

set roundness of the superquad.in east-west (x and z) direction

double VRS::SuperQuad::getNorthSouth (  )  const [inline]

get roundness of the superquad.in north-south (y) direction

double VRS::SuperQuad::getEastWest (  )  const [inline]

get roundness of the superquad.in east-west (x and z) direction

A roundness of (1,1) defines a circle border, a roundness of (0,0) defines a quad-like borders. The roundness in each direction is implemented by taking trigonometric functions (abs(sin) and abs(cos)) to the power of the roundness.

void VRS::SuperQuad::setHoleDiameter ( double   ) 

set diameter of the SuperQuad's hole

double VRS::SuperQuad::getHoleDiameter (  )  const [inline]

get diameter of the SuperQuad's hole

The diameter must be greater or equal than 0. A diameter of 0 defines sphere-like objects; a diameter of >0 defines torus-like objects.

void VRS::SuperQuad::setCenter ( const Vector  ) 

set the center.

Vector VRS::SuperQuad::getCenter (  )  const [inline]

get the center.

virtual Bounds VRS::SuperQuad::boundingBox (  )  const [virtual]

bounding box of the SuperQuad.

Implements VRS::Shape.

VRS::SuperQuad::VRS_TYPEINFO ( SuperQuad  ,
Shape   
)

VRS::SuperQuad::VRS_SERIALIZABLE ( SuperQuad   ) 


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

Generated on Wed May 23 06:00:30 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact