latest version v1.9 - last update 10 Apr 2010 |
parameters for draw3D. More...
#include <ltiDraw3D.h>
Public Member Functions | |
parameters () | |
parameters (const parameters &other) | |
virtual const char * | getTypeName () const |
parameters & | copy (const parameters &other) |
parameters & | operator= (const parameters &other) |
virtual parameters * | clone () const |
virtual bool | write (ioHandler &handler, const bool complete=true) const |
virtual bool | read (ioHandler &handler, const bool complete=true) |
void | setCamera (const double &x1, const double &y1, const double &z1, const double &x2, const double &y2, const double &z2) |
void | setCamera (const double &x1, const double &y1, const double &z1, const double &theElevation, const double &theAzimuth) |
void | setCamera (const dpoint3D &x1, const dpoint3D &x2) |
void | setCamera (const dpoint3D &x1, const double &theElevation, const double &theAzimuth) |
Public Attributes | |
double | zoom |
double | perspective |
dpoint | center |
dpoint3D | camPos |
double | elevation |
double | azimuth |
dpoint3D | lightPosition |
T | diffuseColor |
T | ambientColor |
parameters for draw3D.
Most of the parameters in this class can be accessed through access methods in the class draw3D directly. This simplifies changing the parameters and giving them to the drawer object again.
The camera position is given by the cam1
point. The direction of the camera is given through the second point cam2
. The projective algorithm used will ensure that this second point cam2 will be mapped exactly at the position given by center
.
lti::draw3D< T >::parameters::parameters | ( | void | ) | [inline] |
default constructor
Referenced by lti::draw3D< T >::parameters::clone().
lti::draw3D< T >::parameters::parameters | ( | const parameters & | other | ) | [inline] |
copy constructor
References lti::draw3D< T >::parameters::copy().
virtual parameters* lti::draw3D< T >::parameters::clone | ( | ) | const [inline, virtual] |
returns a pointer to a clone of the parameters.
References lti::draw3D< T >::parameters::parameters().
parameters& lti::draw3D< T >::parameters::copy | ( | const parameters & | other | ) | [inline] |
copy member
Reimplemented from lti::ioObject.
References lti::draw3D< T >::parameters::ambientColor, lti::draw3D< T >::parameters::azimuth, lti::draw3D< T >::parameters::camPos, lti::draw3D< T >::parameters::center, lti::draw3D< T >::parameters::diffuseColor, lti::draw3D< T >::parameters::elevation, lti::draw3D< T >::parameters::lightPosition, lti::draw3D< T >::parameters::perspective, and lti::draw3D< T >::parameters::zoom.
Referenced by lti::draw3D< T >::parameters::operator=(), and lti::draw3D< T >::parameters::parameters().
virtual const char* lti::draw3D< T >::parameters::getTypeName | ( | void | ) | const [inline, virtual] |
returns the name of this type
Reimplemented from lti::ioObject.
parameters& lti::draw3D< T >::parameters::operator= | ( | const parameters & | other | ) | [inline] |
alias for copy member
Reimplemented from lti::ioObject.
References lti::draw3D< T >::parameters::copy().
virtual bool lti::draw3D< T >::parameters::read | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | [inline, virtual] |
read the parameters from the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::ioObject.
References lti::draw3D< T >::parameters::ambientColor, lti::draw3D< T >::parameters::azimuth, lti::draw3D< T >::parameters::camPos, lti::draw3D< T >::parameters::center, lti::draw3D< T >::parameters::diffuseColor, lti::draw3D< T >::parameters::elevation, lti::draw3D< T >::parameters::lightPosition, lti::draw3D< T >::parameters::perspective, lti::ioHandler::readBegin(), lti::ioHandler::readEnd(), and lti::draw3D< T >::parameters::zoom.
void lti::draw3D< T >::parameters::setCamera | ( | const dpoint3D & | x1, | |
const double & | theElevation, | |||
const double & | theAzimuth | |||
) | [inline] |
set position and direction of the camera
References lti::draw3D< T >::parameters::azimuth, lti::draw3D< T >::parameters::camPos, lti::tpoint3D< T >::copy(), and lti::draw3D< T >::parameters::elevation.
void lti::draw3D< T >::parameters::setCamera | ( | const dpoint3D & | x1, | |
const dpoint3D & | x2 | |||
) | [inline] |
set position and target position of the camera
References lti::draw3D< T >::parameters::setCamera(), lti::tpoint3D< T >::x, lti::tpoint3D< T >::y, and lti::tpoint3D< T >::z.
void lti::draw3D< T >::parameters::setCamera | ( | const double & | x1, | |
const double & | y1, | |||
const double & | z1, | |||
const double & | theElevation, | |||
const double & | theAzimuth | |||
) | [inline] |
set position and direction of the camera
References lti::draw3D< T >::parameters::azimuth, lti::draw3D< T >::parameters::camPos, lti::tpoint3D< T >::copy(), and lti::draw3D< T >::parameters::elevation.
void lti::draw3D< T >::parameters::setCamera | ( | const double & | x1, | |
const double & | y1, | |||
const double & | z1, | |||
const double & | x2, | |||
const double & | y2, | |||
const double & | z2 | |||
) | [inline] |
set position and target position of the camera
References lti::abs(), lti::acos(), lti::Pi, and lti::sqrt().
Referenced by lti::draw3D< T >::parameters::setCamera().
virtual bool lti::draw3D< T >::parameters::write | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | const [inline, virtual] |
write the parameters in the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::ioObject.
References lti::draw3D< T >::parameters::ambientColor, lti::draw3D< T >::parameters::azimuth, lti::draw3D< T >::parameters::camPos, lti::draw3D< T >::parameters::center, lti::draw3D< T >::parameters::diffuseColor, lti::draw3D< T >::parameters::elevation, lti::draw3D< T >::parameters::lightPosition, lti::draw3D< T >::parameters::perspective, lti::ioHandler::writeBegin(), lti::ioHandler::writeEnd(), and lti::draw3D< T >::parameters::zoom.
T lti::draw3D< T >::parameters::ambientColor |
Color (or intensity) of the ambient light.
To avoid saturation ensure that diffuseColor+ambientColor is smaller than the maximum allowed value for T (i.e. 255 for ubyte, rgbPixel(255,255,255) or 1.0 for float)
Referenced by lti::draw3D< T >::parameters::copy(), lti::draw3D< T >::parameters::read(), and lti::draw3D< T >::parameters::write().
double lti::draw3D< T >::parameters::azimuth |
azimuth is the angle (in radians) between the x-axis and the projection of the camera axis on the xy plane.
Default value: 0.0
Referenced by lti::draw3D< T >::parameters::copy(), lti::draw3D< T >::parameters::read(), lti::draw3D< T >::parameters::setCamera(), and lti::draw3D< T >::parameters::write().
dpoint3D lti::draw3D< T >::parameters::camPos |
camera position (default value: (0,0,1))
Referenced by lti::draw3D< T >::parameters::copy(), lti::draw3D< T >::parameters::read(), lti::draw3D< T >::parameters::setCamera(), and lti::draw3D< T >::parameters::write().
dpoint lti::draw3D< T >::parameters::center |
view plane center in relative coordinates (default (0.5,0.5), i.e.
in the center of the used image)
Referenced by lti::draw3D< T >::parameters::copy(), lti::draw3D< T >::parameters::read(), and lti::draw3D< T >::parameters::write().
T lti::draw3D< T >::parameters::diffuseColor |
Color (or intensity) of the light source.
To avoid saturation ensure that diffuseColor+ambientColor is smaller than the maximum allowed value for T (i.e. 255 for ubyte, rgbPixel(255,255,255) or 1.0 for float)
Referenced by lti::draw3D< T >::parameters::copy(), lti::draw3D< T >::parameters::read(), and lti::draw3D< T >::parameters::write().
double lti::draw3D< T >::parameters::elevation |
elevation is the angle (in radians) between the z-axis and the camera axis.
Default value: 0.0
Referenced by lti::draw3D< T >::parameters::copy(), lti::draw3D< T >::parameters::read(), lti::draw3D< T >::parameters::setCamera(), and lti::draw3D< T >::parameters::write().
dpoint3D lti::draw3D< T >::parameters::lightPosition |
position of the light source.
Referenced by lti::draw3D< T >::parameters::copy(), lti::draw3D< T >::parameters::read(), and lti::draw3D< T >::parameters::write().
double lti::draw3D< T >::parameters::perspective |
camera perspective factor.
Set to zero for an orthographic projection or greater zero for perspective effects. You can consider this value as zoom/f with f the focal distance.
Referenced by lti::draw3D< T >::parameters::copy(), lti::draw3D< T >::parameters::read(), and lti::draw3D< T >::parameters::write().
double lti::draw3D< T >::parameters::zoom |
camera zoom factor (default value: 1.0)
Referenced by lti::draw3D< T >::parameters::copy(), lti::draw3D< T >::parameters::read(), and lti::draw3D< T >::parameters::write().