Class PoDomain
- java.lang.Object
-
- All Implemented Interfaces:
SafeDisposable
public class PoDomain extends PoNode
Node to define a domain. 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):
- 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.
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.
NOTE:
PoDomain
is effectively a transform node, but ONLY affects MeshViz nodes. If you want thePoDomain
transform to apply to other geometry, use thegetTransform()
method to get anSoTransform
node and insert that node in the scene graph above the other geometry.File format/default:
PoDomain
{min 0 0 0 max 1 1 1 transformType SCALE_X_FIXED
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PoDomain.BoundingBoxTypes
Bounding box interpretation.static class
PoDomain.TransformTypes
Transform type.-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoSFVec3f
max
Define the maximum of the domain.SoSFVec3f
min
Define the minimum of the domain.SoSFEnum<PoDomain.TransformTypes>
transformType
Define the transformation type of the domain.-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description PoDomain()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SoMatrixTransform
getMatrixTransform()
Get the domain transform matrix in anSbMatrix
object.SoTransform
getTransform()
Get the domain transform matrix in anSoTransform
object.void
setValues(SbVec2f min, SbVec2f max)
Calls setValues(min, max, PoDomain.BoundingBoxTypes.valueOf( PoDomain.BoundingBoxTypes.AS_IS.getValue() )).void
setValues(SbVec2f min, SbVec2f max, PoDomain.BoundingBoxTypes type)
Convenience method to define a 2D domain.void
setValues(SbVec3f min, SbVec3f max)
Calls setValues(min, max, PoDomain.BoundingBoxTypes.valueOf( PoDomain.BoundingBoxTypes.AS_IS.getValue() )).void
setValues(SbVec3f min, SbVec3f max, PoDomain.BoundingBoxTypes type)
Convenience method to define a 3D domain.-
Methods inherited from class com.openinventor.meshviz.nodes.PoNode
callback, doAction, getBoundingBox, getMatrix, getPrimitiveCount, GLRender, handleEvent, pick, search, write
-
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, copy, copy, distribute, getAlternateRep, getByName, getRenderEngineMode, getRenderUnitID, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, isBoundingBoxIgnoring, isOverride, rayPick, setOverride, touch
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Field Detail
-
min
public final SoSFVec3f min
Define the minimum of the domain.
-
max
public final SoSFVec3f max
Define the maximum of the domain.
-
transformType
public final SoSFEnum<PoDomain.TransformTypes> transformType
Define the transformation type of the domain.
-
-
Method Detail
-
setValues
public void setValues(SbVec2f min, SbVec2f max)
Calls setValues(min, max, PoDomain.BoundingBoxTypes.valueOf( PoDomain.BoundingBoxTypes.AS_IS.getValue() )).
-
setValues
public void setValues(SbVec3f min, SbVec3f max)
Calls setValues(min, max, PoDomain.BoundingBoxTypes.valueOf( PoDomain.BoundingBoxTypes.AS_IS.getValue() )).
-
getTransform
public SoTransform getTransform()
Get the domain transform matrix in anSoTransform
object.
-
getMatrixTransform
public SoMatrixTransform getMatrixTransform()
Get the domain transform matrix in anSbMatrix
object.
-
setValues
public void setValues(SbVec2f min, SbVec2f max, PoDomain.BoundingBoxTypes type)
Convenience method to define a 2D domain.
-
setValues
public void setValues(SbVec3f min, SbVec3f max, PoDomain.BoundingBoxTypes type)
Convenience method to define a 3D domain.
-
-