Node to define a domain. More...
#include <MeshViz/nodes/PoDomain.h>
Public Types | |
enum | TransformType { TRANSFORM_01, SCALE_X_FIXED, SCALE_Y_FIXED, SCALE_Z_FIXED, SCALE_MAX_XYZ_FIXED } |
enum | BoundingBoxType { AS_IS, MIN_BOUNDING_CUBE, MAX_BOUNDED_CUBE } |
Public Member Functions | |
virtual SoType | getTypeId () const |
void | setValues (const SbVec2f &min, const SbVec2f &max, BoundingBoxType type=AS_IS) |
void | setValues (const SbVec3f &min, const SbVec3f &max, BoundingBoxType type=AS_IS) |
SoTransform * | getTransform () |
SoMatrixTransform * | getMatrixTransform () |
PoDomain () | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoSFVec3f | min |
SoSFVec3f | max |
SoSFEnum | transformType |
This node defines the current domain for all subsequent MeshViz representations. This class is used to define a 2D/3D domain.
The domain usually defines the data coordinate limits of graphics to be generated. Graph Master & 3D Data Master do not calculate these limits, so this class provides them. In conceptual terms, a 2D domain (3D domain) is the smallest rectangle (parallelepiped) capable of containing the data for the image to be generated. The sides of this rectangle (parallelepiped) are parallel to the axis. Furthermore all Graph Master & 3D Data Master nodekits classes may be transformed according to the domain which they depend on.
There are five possible transformations (we note dx = xmax - xmin, dy = ymax - ymin and dz = zmax - zmin, xmin, ymin,..., zmax are the limits of the domain):
Except the first transformation type, the others compute a scaling only if the domain is heterogeneous.
Data given by the user to define the coordinates of the domain (xmin, ymin, zmin, xmax,...) can be interpreted if the user wants to. The interpretation of these data depends on the value of the last attribute (of type BoundingBoxType) of each method for setting domain coordinates. Values for this attribute can be :
NOTE: PoDomain is effectively a transform node, but ONLY affects MeshViz nodes. If you want the PoDomain transform to apply to other geometry, use the getTransform() method to get an SoTransform node and insert that node in the scene graph above the other geometry.
min | 0 0 0 |
max | 1 1 1 |
transformType | SCALE_X_FIXED |
PoDomain::PoDomain | ( | ) |
Constructor.
static SoType PoDomain::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from PoNode.
SoMatrixTransform* PoDomain::getMatrixTransform | ( | ) |
Get the domain transform matrix in an SbMatrix object.
SoTransform* PoDomain::getTransform | ( | ) |
Get the domain transform matrix in an SoTransform object.
virtual SoType PoDomain::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from PoNode.
void PoDomain::setValues | ( | const SbVec3f & | min, | |
const SbVec3f & | max, | |||
BoundingBoxType | type = AS_IS | |||
) |
Convenience method to define a 3D domain.
void PoDomain::setValues | ( | const SbVec2f & | min, | |
const SbVec2f & | max, | |||
BoundingBoxType | type = AS_IS | |||
) |
Convenience method to define a 2D domain.
Define the maximum of the domain.
Define the minimum of the domain.
Define the transformation type of the domain.