Class PbDomain
- All Implemented Interfaces:
Cloneable
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):
- The transformation is a scaling and a translation (all representations are drawn between [0-1] x [0-1] x ([0-1])). (type of transformation = TRANSFORM_01).
- All representations are scaled with scaling factors x = 1, y = dx/dy, z = dx/dz. (type of transformation = SCALE_X_FIXED).
- All representations are scaled with scaling factors x = dy/dx, y =1, z = dy/dz. (type of transformation = SCALE_Y_FIXED).
- All representations are scaled with scaling factors x = dz/dx, y = dz/dy, z = 1. (type of transformation = SCALE_Z_FIXED).
- One of scale 2,3,4 is applied according to the max(dx,dy,dz). (type of transformation = SCALE_MAX_XYZ_FIXED).
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 :
- AS_IS: Data are not interpreted. This is the default value.
- MIN_BOUNDING_CUBE: The miminum bounding square(2D domain)/cube(3D domain) is computed from the user data to set the domain coordinates.
- MAX_BOUNDED_CUBE: The maximum bounded square(2D domain)/cube(3D domain) is computed from the user data to set the domain coordinates.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Bounding box interpretation.static enum
Transform type.Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
ConstructorsConstructorDescriptionPbDomain()
Default constructor.PbDomain
(float xmin, float ymin, float xmax, float ymax) Calls PbDomain(xmin, ymin, xmax, ymax, PbDomain.BoundingBoxTypes.valueOf( PbDomain.BoundingBoxTypes.AS_IS.getValue() )).PbDomain
(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax) Calls PbDomain(xmin, ymin, zmin, xmax, ymax, zmax, PbDomain.BoundingBoxTypes.valueOf( PbDomain.BoundingBoxTypes.AS_IS.getValue() )).PbDomain
(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax, PbDomain.BoundingBoxTypes type) Constructor of a 3D domain.PbDomain
(float xmin, float ymin, float xmax, float ymax, PbDomain.BoundingBoxTypes type) Constructor of a 2D domain.Calls PbDomain(box, PbDomain.BoundingBoxTypes.valueOf( PbDomain.BoundingBoxTypes.AS_IS.getValue() )).PbDomain
(SbBox2f box, PbDomain.BoundingBoxTypes type) Constructor of a 2D domain.Calls PbDomain(box, PbDomain.BoundingBoxTypes.valueOf( PbDomain.BoundingBoxTypes.AS_IS.getValue() )).PbDomain
(SbBox3f box, PbDomain.BoundingBoxTypes type) Constructor of a 3D domain.Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
Gets the 2D domain.Gets the 3D domain.Get the domain transform matrix in anSbMatrix
object.Get the domain transform matrix in anSoMatrixTransform
object.Get the domain transform matrix in anSoTransform
object.Gets the type of transformation.void
setDomain
(float xmin, float ymin, float xmax, float ymax) Calls setDomain(xmin, ymin, xmax, ymax, PbDomain.BoundingBoxTypes.valueOf( PbDomain.BoundingBoxTypes.AS_IS.getValue() )).void
setDomain
(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax) Calls setDomain(xmin, ymin, zmin, xmax, ymax, zmax, PbDomain.BoundingBoxTypes.valueOf( PbDomain.BoundingBoxTypes.AS_IS.getValue() )).void
setDomain
(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax, PbDomain.BoundingBoxTypes type) Sets a 3D domain.void
setDomain
(float xmin, float ymin, float xmax, float ymax, PbDomain.BoundingBoxTypes type) Sets a 2D domain.void
Calls setDomain(box, PbDomain.BoundingBoxTypes.valueOf( PbDomain.BoundingBoxTypes.AS_IS.getValue() )).void
setDomain
(SbBox2f box, PbDomain.BoundingBoxTypes type) Sets a 2D domain.void
Calls setDomain(box, PbDomain.BoundingBoxTypes.valueOf( PbDomain.BoundingBoxTypes.AS_IS.getValue() )).void
setDomain
(SbBox3f box, PbDomain.BoundingBoxTypes type) Sets a 3D domain.void
Sets the type of transformation.Methods inherited from class com.openinventor.meshviz.graph.PbBase
enableConnection, isConnectionEnabled, touch
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Constructor Details
-
PbDomain
public PbDomain(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax) Calls PbDomain(xmin, ymin, zmin, xmax, ymax, zmax, PbDomain.BoundingBoxTypes.valueOf( PbDomain.BoundingBoxTypes.AS_IS.getValue() )). -
PbDomain
Calls PbDomain(box, PbDomain.BoundingBoxTypes.valueOf( PbDomain.BoundingBoxTypes.AS_IS.getValue() )). -
PbDomain
public PbDomain(float xmin, float ymin, float xmax, float ymax) Calls PbDomain(xmin, ymin, xmax, ymax, PbDomain.BoundingBoxTypes.valueOf( PbDomain.BoundingBoxTypes.AS_IS.getValue() )). -
PbDomain
Calls PbDomain(box, PbDomain.BoundingBoxTypes.valueOf( PbDomain.BoundingBoxTypes.AS_IS.getValue() )). -
PbDomain
Constructor of a 2D domain. -
PbDomain
public PbDomain()Default constructor. -
PbDomain
Constructor of a 2D domain. -
PbDomain
Constructor of a 3D domain. -
PbDomain
Copy constructor. -
PbDomain
public PbDomain(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax, PbDomain.BoundingBoxTypes type) Constructor of a 3D domain.
-
-
Method Details
-
clone
-
setDomain
public void setDomain(float xmin, float ymin, float xmax, float ymax) Calls setDomain(xmin, ymin, xmax, ymax, PbDomain.BoundingBoxTypes.valueOf( PbDomain.BoundingBoxTypes.AS_IS.getValue() )). -
setDomain
Calls setDomain(box, PbDomain.BoundingBoxTypes.valueOf( PbDomain.BoundingBoxTypes.AS_IS.getValue() )). -
setDomain
public void setDomain(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax) Calls setDomain(xmin, ymin, zmin, xmax, ymax, zmax, PbDomain.BoundingBoxTypes.valueOf( PbDomain.BoundingBoxTypes.AS_IS.getValue() )). -
setDomain
Calls setDomain(box, PbDomain.BoundingBoxTypes.valueOf( PbDomain.BoundingBoxTypes.AS_IS.getValue() )). -
setTransformType
Sets the type of transformation. (SCALE_X_FIXED by default) -
setDomain
Sets a 2D domain. -
getTransformType
Gets the type of transformation. -
setDomain
public void setDomain(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax, PbDomain.BoundingBoxTypes type) Sets a 3D domain. -
get2DDomain
Gets the 2D domain. -
get3DDomain
Gets the 3D domain. -
setDomain
Sets a 3D domain. -
getMatrix
Get the domain transform matrix in anSbMatrix
object. -
equals
-
getTransform
Get the domain transform matrix in anSoTransform
object. -
setDomain
public void setDomain(float xmin, float ymin, float xmax, float ymax, PbDomain.BoundingBoxTypes type) Sets a 2D domain. -
getMatrixTransform
Get the domain transform matrix in anSoMatrixTransform
object.
-