Class to define a domain. More...
#include <MeshViz/graph/PbDomain.h>
Public Types | |
enum | TransformType { TRANSFORM_01 , SCALE_X_FIXED , SCALE_Y_FIXED , SCALE_Z_FIXED , SCALE_MAX_XYZ_FIXED } |
Transform type. More... | |
enum | BoundingBoxType { AS_IS , MIN_BOUNDING_CUBE , MAX_BOUNDED_CUBE } |
Bounding box interpretation. More... | |
Public Member Functions | |
PbDomain () | |
Default constructor. | |
PbDomain (const PbDomain &domain) | |
Copy constructor. | |
PbDomain (SbBox2f &box, BoundingBoxType type=AS_IS) | |
Constructor of a 2D domain. | |
PbDomain (SbBox3f &box, BoundingBoxType type=AS_IS) | |
Constructor of a 3D domain. | |
PbDomain (float xmin, float ymin, float xmax, float ymax, BoundingBoxType type=AS_IS) | |
Constructor of a 2D domain. | |
PbDomain (float xmin, float ymin, float zmin, float xmax, float ymax, float zmax, BoundingBoxType type=AS_IS) | |
Constructor of a 3D domain. | |
void | setDomain (float xmin, float ymin, float xmax, float ymax, BoundingBoxType type=AS_IS) |
Sets a 2D domain. | |
void | setDomain (float xmin, float ymin, float zmin, float xmax, float ymax, float zmax, BoundingBoxType type=AS_IS) |
Sets a 3D domain. | |
void | setDomain (SbBox2f &box, BoundingBoxType type=AS_IS) |
Sets a 2D domain. | |
void | setDomain (SbBox3f &box, BoundingBoxType type=AS_IS) |
Sets a 3D domain. | |
void | getDomain (float &xmin, float &ymin, float &xmax, float &ymax) const |
Gets the 2D domain. | |
void | getDomain (float &xmin, float &ymin, float &zmin, float &xmax, float &ymax, float &zmax) const |
Gets the 3D domain. | |
void | getDomain (SbBox2f &box) const |
Gets the 2D domain. | |
void | getDomain (SbBox3f &box) const |
Gets the 3D domain. | |
void | setTransformType (TransformType type) |
Sets the type of transformation. | |
TransformType | getTransformType () const |
Gets the type of transformation. | |
SoMatrixTransform * | getMatrixTransform () const |
Get the domain transform matrix in an SoMatrixTransform object. | |
SoTransform * | getTransform () const |
Get the domain transform matrix in an SoTransform object. | |
SbMatrix | getMatrix () const |
Get the domain transform matrix in an SbMatrix object. | |
int | operator== (const PbDomain &dom) |
Equality comparison operator. | |
int | operator!= (const PbDomain &dom) |
Inequality comparison operator. | |
PbDomain & | operator= (const PbDomain &domain) |
Assignment operator. | |
Public Member Functions inherited from PbBase | |
void | enableConnection (SbBool flag) |
Activates/deactivates the mechanism of connection. | |
SbBool | isConnectionEnabled () const |
Returns TRUE if the connection mechanism is active, otherwise FALSE. | |
void | touch () |
Simulates the changing of an instance of this object, so all connected objects are informed of this change. | |
PbBase & | operator= (const PbBase &base) |
Assignment operator. | |
This class is used to define a 2D/3D domain. It is the reference of all Graph Master & 3D Data Master nodekits classes and some fields of these classes are expressed in a 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 refer to.
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.
All methods concerning 2D domain, set the value zmin to 0 and the value zmax to 1. By default xmin = ymin = zmin = 0, xmax = ymax = zmax = 1 and the type of transformation is SCALE_X_FIXED.
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 :
Definition at line 92 of file PbDomain.h.
Bounding box interpretation.
Enumerator | |
---|---|
AS_IS | |
MIN_BOUNDING_CUBE | |
MAX_BOUNDED_CUBE |
Definition at line 115 of file PbDomain.h.
Transform type.
Enumerator | |
---|---|
TRANSFORM_01 | |
SCALE_X_FIXED | |
SCALE_Y_FIXED | |
SCALE_Z_FIXED | |
SCALE_MAX_XYZ_FIXED |
Definition at line 102 of file PbDomain.h.
PbDomain::PbDomain | ( | ) |
Default constructor.
PbDomain::PbDomain | ( | const PbDomain & | domain | ) |
Copy constructor.
PbDomain::PbDomain | ( | SbBox2f & | box, |
BoundingBoxType | type = AS_IS |
||
) |
Constructor of a 2D domain.
PbDomain::PbDomain | ( | SbBox3f & | box, |
BoundingBoxType | type = AS_IS |
||
) |
Constructor of a 3D domain.
PbDomain::PbDomain | ( | float | xmin, |
float | ymin, | ||
float | xmax, | ||
float | ymax, | ||
BoundingBoxType | type = AS_IS |
||
) |
Constructor of a 2D domain.
PbDomain::PbDomain | ( | float | xmin, |
float | ymin, | ||
float | zmin, | ||
float | xmax, | ||
float | ymax, | ||
float | zmax, | ||
BoundingBoxType | type = AS_IS |
||
) |
Constructor of a 3D domain.
void PbDomain::getDomain | ( | float & | xmin, |
float & | ymin, | ||
float & | xmax, | ||
float & | ymax | ||
) | const |
Gets the 2D domain.
void PbDomain::getDomain | ( | float & | xmin, |
float & | ymin, | ||
float & | zmin, | ||
float & | xmax, | ||
float & | ymax, | ||
float & | zmax | ||
) | const |
Gets the 3D domain.
void PbDomain::getDomain | ( | SbBox2f & | box | ) | const |
Gets the 2D domain.
void PbDomain::getDomain | ( | SbBox3f & | box | ) | const |
Gets the 3D domain.
SoMatrixTransform * PbDomain::getMatrixTransform | ( | ) | const |
Get the domain transform matrix in an SoMatrixTransform object.
SoTransform * PbDomain::getTransform | ( | ) | const |
Get the domain transform matrix in an SoTransform object.
|
inline |
Gets the type of transformation.
Definition at line 205 of file PbDomain.h.
|
inline |
Inequality comparison operator.
Definition at line 231 of file PbDomain.h.
int PbDomain::operator== | ( | const PbDomain & | dom | ) |
Equality comparison operator.
void PbDomain::setDomain | ( | float | xmin, |
float | ymin, | ||
float | xmax, | ||
float | ymax, | ||
BoundingBoxType | type = AS_IS |
||
) |
Sets a 2D domain.
void PbDomain::setDomain | ( | float | xmin, |
float | ymin, | ||
float | zmin, | ||
float | xmax, | ||
float | ymax, | ||
float | zmax, | ||
BoundingBoxType | type = AS_IS |
||
) |
Sets a 3D domain.
void PbDomain::setDomain | ( | SbBox2f & | box, |
BoundingBoxType | type = AS_IS |
||
) |
Sets a 2D domain.
void PbDomain::setDomain | ( | SbBox3f & | box, |
BoundingBoxType | type = AS_IS |
||
) |
Sets a 3D domain.
void PbDomain::setTransformType | ( | TransformType | type | ) |
Sets the type of transformation.
(SCALE_X_FIXED by default)