Package com.openinventor.meshviz.graph
Class PoBase
- All Implemented Interfaces:
SafeDisposable
- Direct Known Subclasses:
Po3DdataMaster,PoGraphMaster
Abstract base class for all Graph Master & 3D Data Master classes.
All representations depend on the current domain which defines the data limits of the graphic to be generated. If the method setDomain(domain) is called, the current domain is "domain". Otherwise the current domain is specified in the current inherited state (cf property node
PoDomain).
Be careful, do not use the method rebuild() if you use MeshViz property nodes (PoDomain, PoMeshProperty,...), because a representation (axis, legend, 2D and 3D mesh representation,..) depends on the current inherited state. If you need to do an extra work after a representation has been built, do it in a post-rebuild callback (cf PoBase.addPostRebuildCallback).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumType of write format.static enumType of Text.static enumType of update method.Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModesNested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand -
Field Summary
Fields inherited from class com.openinventor.inventor.nodekits.SoBaseKit
boundingBoxIgnoringFields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPostRebuildCallback(PoRebuildCB cb, Object data) Add a callback function to call when the node kit is rebuilt.voidaddPreRebuildCallback(PoRebuildCB cb, Object data) Add a callback function to call when the node kit is rebuilt.static SoNodekitCatalogReturns theSoNodekitCatalogfor this class.Gets a reference to aPbDomainobject used to define the data limits of the graphics to be generated.static PoBase.NodeWriteFormatsGets the node write format.static PoBase.TextTypesGets the type of text used.Gets update method.booleanisBuilt()Indicates if the node kit has been built at least once.booleanReturn true, if the kit has been modified, else otherwise.static booleanGets the VRML2 mode (true = VRML2 mode, false Inventor mode)voidrebuild()Forces the node kit to be rebuilt immediately.voidSets a reference to aPbDomainobject used to define the data limits of the graphics to be generated.static voidSets the node write format.static voidsetTextType(PoBase.TextTypes type) Sets the type of text used.voidSets scene graph update method.static voidsetVRML2Mode(boolean flag) Set the VRML2 mode.voidtouchKit()Indicates the node kit is modified.Methods inherited from class com.openinventor.inventor.nodekits.SoBaseKit
getNodekitCatalog, getPart, getPart, getPartString, getViewportIsEnabled, getViewportOrigin, getViewportSize, isSearchingChildren, set, set, setPart, setSearchingChildrenMethods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, writeMethods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, setToDefaultsMethods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizableMethods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
Method Details
-
addPreRebuildCallback
Add a callback function to call when the node kit is rebuilt. This callback is called just before the kit is rebuilt. -
addPostRebuildCallback
Add a callback function to call when the node kit is rebuilt. This callback is called just after the kit is rebuilt. -
isBuilt
public boolean isBuilt()Indicates if the node kit has been built at least once. -
getTextType
Gets the type of text used. -
setNodeWriteFormat
Sets the node write format.FOLD_NODE_WRITE_FORMATindicates that all nodes will not be unfolded when they are written with aSoWriteAction.UNFOLD_NODE_WRITE_FORMATindicates on the contrary, that all nodes will be unfolded when they are written with aSoWriteAction. Be careful, when using the formatFOLD_NODE_WRITE_FORMAT, the basic objects (Pb objects) are not written in .iv file. In this case (and if you need to save this information), use the corresponding property node (for instance, replace thePbDomainobject with thePoDomainproperty node).(
FOLD_NODE_WRITE_FORMATby default). -
getClassNodekitCatalog
Returns theSoNodekitCatalogfor this class. -
setTextType
Sets the type of text used. Possible values :- type =
SO_TEXT3: All texts used for representations areSoText3nodes. - type =
SO_ANNO_TEXT3: All text used for representations areSoAnnoText3(this type of text has more attributes thanSoText3which can be specified with the property nodeSoAnnoText3Property).
type =
SO_ANNO_TEXT3by default. - type =
-
getNodeWriteFormat
Gets the node write format. See setNodeWriteFormat for more details. -
setVRML2Mode
public static void setVRML2Mode(boolean flag) Set the VRML2 mode. This mode allows the user to configure MeshViz to prepare the conversion in VRML2 format with the best possible result. In this way, MeshViz realizes some particular actions :- Whatever text type specified by the method
setTextType(), all texts used areSoAsciiTextin order to minimize VRML2 file size (other text types are tessellated during a VRML2 conversion which increases VRML2 file size). - For all materials generated by MeshViz where the light model is
SoLightModel.BASE_COLOR(There is no equivalence in VRML2), the emissive component is set at the same value as the diffuse components (By this way, we simulateSoLightModel.BASE_COLORlight model). - A Z Offset is added for all coplanar faces generated by MeshViz representation (All these representations are planar as for instance legends so the
SoAnnotationnode solves their problems, but there is no equivalence in VRML2).
This mode is inactive by default.
- Whatever text type specified by the method
-
touchKit
public void touchKit()Indicates the node kit is modified. (Simulates a change). -
getDomain
Gets a reference to aPbDomainobject used to define the data limits of the graphics to be generated. -
rebuild
public void rebuild()Forces the node kit to be rebuilt immediately. The rebuild consists in updating all catalog parts (which contains shapes forming the visualization) of the node kit according to field values and other property values (domain, data mapping,...). Be careful, do not use the methodrebuild()if you use MeshViz property nodes (PoDomain,PoMeshProperty,...), because a representation (axis, legend, 2D and 3D mesh representation,..) depends on the current inherited state. If you need to do an extra work after a representation has been built, do it in a post-rebuild callback (cf PoBase.addPostRebuildCallback). -
isModified
public boolean isModified()Return true, if the kit has been modified, else otherwise. -
setUpdateMethod
Sets scene graph update method.UPDATE_METHOD_IMMEDIATEindicates that each time a Graph Master or 3D Data Master object is modified, the scene graph must be updated.UPDATE_METHOD_ON_ACTIONindicates that the scene graph does not have to be modified when a Graph Master or 3D Data Master object changes; the scene graph being modified when it is necessary (before a rendering action for instance). The faster method isUPDATE_METHOD_ON_ACTIONand is particularly useful for representations where more than one field has to be set to obtain the definitive representation, because with the other method, each time a field is changed, the representation is rebuilt. (UPDATE_METHOD_ON_ACTIONby default). -
isVRML2Mode
public static boolean isVRML2Mode()Gets the VRML2 mode (true = VRML2 mode, false Inventor mode) -
setDomain
-
getUpdateMethod
Gets update method. See setUpdateMethod for more details.
-