public class SoToU3DAction extends SoCallbackAction
SoToPDFAction
.
U3D is a much simpler format than the Open Inventor scene graph and limits what can be exported.
Limitations of U3D:
PoSceneView
, PoView
, PoBaseView
) are not supported.
SoClipPlane
) is ignored.
SoText2
, SoBillboard
, etc) is not supported.
Tips
SoSeparator
and SoShape
, as well as all derived classes. These names will appear in the "Model Tree" in Acrobat Reader. The end user can set visibility, render mode, etc for each object. You can also use these names in JavaScript functions that manipulate the model in the PDF file.
SoGradientBackground
node. The exported color will be the average of the color0 and color1 fields. However you can also change the background color using Adobe Acrobat Pro after inserting the U3D file in a PDF.
Use case
// setup the root scene graph to export SoSeparator root = new SoSeparator(); ... SoToU3DAction u3dAction = new SoToU3DAction(); boolean result = u3dAction.openFile( "output.u3d" ); if ( !result ) { // Report error } u3dAction.apply( root ); result = u3dAction.closeFile(); if ( !result ) { // Report error }
Warning
SoNode
derived class (if one exists).
See also:
SoCallbackAction.Material, SoCallbackAction.Responses, SoCallbackAction.TextureImage
SoAction.AppliedCodes, SoAction.DistribModes, SoAction.PathCodes, SoAction.PathIndices
Inventor.ConstructorCommand
ABORT, CONTINUE, PRUNE
ALL, BELOW_PATH, CLUSTER_ONLY, IN_PATH, LOCAL_ONLY, NO_PATH, NODE, OFF_PATH, PATH, PATH_LIST
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoToU3DAction() |
Modifier and Type | Method and Description |
---|---|
boolean |
areDraggersExported()
Returns true if draggers are exported.
|
boolean |
closeFile()
Finalize export to the U3D output file.
|
static void |
enableElement(java.lang.Class<? extends Inventor> t,
int stkIndex) |
void |
forcePolygonalText3(boolean force)
|
boolean |
isPolygonalText3Forced()
Returns true if polygonal text3 is forced (see forcePolygonalText3).
|
boolean |
openFile(java.lang.String filename)
Set the U3D output file.
|
void |
setExportDraggers(boolean force)
Allow the export of draggers (default is true).
|
addLineSegmentCallback, addPointCallback, addPostCallback, addPostTailCallback, addPreCallback, addPreTailCallback, addTriangleCallback, getComplexity, getComplexityType, getCoordinate3, getCoordinate4, getCreaseAngle, getCurrentResponse, getDecimationPercentage, getDecimationType, getDrawStyle, getFaceType, getFocalDistance, getFontName, getFontRenderStyle, getFontSize, getLightAttenuation, getLightModel, getLinePattern, getLinePatternScaleFactor, getLineWidth, getMaterial, getMaterial, getMaterialBinding, getModelMatrix, getNormal, getNormalBinding, getNumCoordinates, getNumNormals, getNumProfileCoordinates, getNumTextureCoordinates, getPickStyle, getPointSize, getProfile, getProfileCoordinate2, getProfileCoordinate3, getProjectionMatrix, getShapeType, getSwitch, getTextureBlendColor, getTextureCoordinate2, getTextureCoordinate4, getTextureCoordinateBinding, getTextureFileName, getTextureImage, getTextureMatrix, getTextureModel, getTextureTransformNode, getTextureWrapS, getTextureWrapT, getTransparencyType, getUnits, getVertexOrdering, getViewingMatrix, getViewVolume, invokeLineSegmentCallbacks, invokePointCallbacks, invokePostCallbacks, invokePreCallbacks, invokeTriangleCallbacks, isCallbackAll, setCallbackAll, shouldGeneratePrimitives
apply, apply, clearApplyResult, forwardTraversal, getContinueActionInBranchFlag, getCurPath, getNodeAppliedTo, getOriginalPathListAppliedTo, getPathAppliedTo, getPathCode, getPathListAppliedTo, getPipeId, getSceneManager, getState, getWhatAppliedTo, hasTerminated, invalidateState, isBeingApplied, isLastPathListAppliedTo, isUsingAlternateRep, nullAction, postDelayedTraversal, preDelayedTraversal, resetContinueActionInBranchFlag, setPipeId, setSceneManager, setUpState, stopActionInBranch, traverse, useAlternateRep
dispose, getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
public boolean openFile(java.lang.String filename)
Use the String version instead.
public static void enableElement(java.lang.Class<? extends Inventor> t, int stkIndex)
public boolean isPolygonalText3Forced()
public void setExportDraggers(boolean force)
public boolean areDraggersExported()
public boolean closeFile()
public void forcePolygonalText3(boolean force)
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com