| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/superquad.h>

Public Member Functions | |
| SuperQuad (double northSouth=1, double eastWest=1, double holeDiameter=0, const Vector ¢er=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) | |
| 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.
| 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] |
| VRS::SuperQuad::VRS_SERIALIZABLE | ( | SuperQuad | ) |