Class for exporting a scene graph to a PDF file. More...
#include <HardCopy/SoToPDFAction.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
Returns the type identifier for this specific instance. | |
SoToPDFAction () | |
virtual | ~SoToPDFAction () |
virtual SoNONUNICODE bool | openFile (const char *filename) |
Set the PDF output file. | |
virtual bool | openFile (const SbString &filename) |
Set the PDF output file. | |
virtual bool | closeFile () |
finalize export to the U3D output file. | |
SoNONUNICODE void | setPassword (const char *writePass, const char *readPass=NULL) |
[Optional] Set passwords to lock write & read access to the PDF file contents. | |
void | setPassword (const SbString &writePass, const SbString &readPass="") |
[Optional] Set passwords to lock write & read access to the PDF file contents. | |
SoNONUNICODE void | setTitle (const char *title) |
[Optional] Set a title into the output PDF file. | |
void | setTitle (const SbString &title) |
[Optional] Set a title into the output PDF file. | |
SoNONUNICODE void | setText (const char *text) |
[Optional] Add a text block into the output PDF file. | |
void | setText (const SbString &text) |
[Optional] Add a text block into the output PDF file. | |
void | setLandscape (const SbBool enable) |
[Optional] Changes the page orientation from portrait to landscape. | |
Public Member Functions inherited from SoToU3DAction | |
SoToU3DAction () | |
virtual | ~SoToU3DAction () |
virtual void | apply (SoNode *node) |
Initiates an action on the graph specified by a node. | |
virtual void | apply (SoPath *path) |
Initiates an action on the graph specified by a path. | |
virtual void | apply (const SoPathList &pathList, SbBool obeysRules=false) |
Initiates an action on the graph specified by list of paths. | |
void | forcePolygonalText3 (bool force) |
Forces SoText2 nodes to be exported using SoText3 (default is true). | |
bool | isPolygonalText3Forced () const |
Returns true if polygonal text3 is forced (see forcePolygonalText3). | |
void | setExportDraggers (bool force) |
Allow the export of draggers (default is true). | |
bool | areDraggersExported () const |
Returns true if draggers are exported. | |
virtual void | forwardTraversal (SoNode *node) |
Traverse a node that is not part of the current scenegraph. | |
virtual void | forwardTraversal (SoPath *path) |
Traverse a node that is not part of the current scenegraph. | |
Public Member Functions inherited from SoCallbackAction | |
SoCallbackAction () | |
The constructor. | |
void | addPreCallback (SoType type, SoCallbackActionCB *cb, void *data) |
Adds a callback function to call when a node of the given type is encountered during traversal. | |
void | addPostCallback (SoType type, SoCallbackActionCB *cb, void *data) |
Adds a callback function to call when a node of the given type is encountered during traversal. | |
void | addPreTailCallback (SoCallbackActionCB *cb, void *data) |
Sets up a callback function to call when the action is applied to a path. | |
void | addPostTailCallback (SoCallbackActionCB *cb, void *data) |
Sets up a callback function to call when the action is applied to a path. | |
void | addTriangleCallback (SoType type, SoTriangleCB *cb, void *data) |
Routine to add callbacks for generated primitives (triangles) for all shapes of the given type. | |
void | addLineSegmentCallback (SoType type, SoLineSegmentCB *cb, void *data) |
Routine to add callbacks for generated primitives (line segments) for all shapes of the given type. | |
void | addPointCallback (SoType type, SoPointCB *cb, void *data) |
Routine to add callbacks for generated primitives (points) for all shapes of the given type. | |
float | getComplexity () const |
Returns complexity information from the state. | |
SoComplexity::Type | getComplexityType () const |
Returns complexity information from the state. | |
int32_t | getNumCoordinates () const |
Returns the current coordinates from the state. | |
const SbVec3f & | getCoordinate3 (int index) const |
Returns the current coordinates from the state. | |
const SbVec4f & | getCoordinate4 (int index) const |
Returns the current coordinates from the state. | |
SoDecimationTypeElement::Type | getDecimationType () const |
Returns the current decimation type from the state. | |
float | getDecimationPercentage () const |
Returns the current decimation percentage from the state. | |
SoDrawStyle::Style | getDrawStyle () const |
Returns the current drawing style information from the state. | |
u_short | getLinePattern () const |
Returns the current drawing style information from the state. | |
int | getLinePatternScaleFactor () const |
Returns the current drawing style information from the state. | |
float | getLineWidth () const |
Returns the current drawing style information from the state. | |
float | getPointSize () const |
Returns the current drawing style information from the state. | |
const SbString & | getFontName () const |
Returns the current font information from the state. | |
float | getFontSize () const |
Returns the current font information from the state. | |
SoFont::RenderStyle | getFontRenderStyle () const |
Returns the current font information from the state. | |
SoLightModel::Model | getLightModel () const |
Returns the current lighting model information from the state. | |
const SbVec3f & | getLightAttenuation () const |
Returns the current lighting model information from the state. | |
void | getMaterial (SbColor &ambient, SbColor &diffuse, SbColor &specular, SbColor &emission, float &shininess, float &transparency, int mtlIndex=0) const |
Returns the current material information from the state. | |
SoMaterialBinding::Binding | getMaterialBinding () const |
Returns the current material information from the state. | |
SoGLRenderAction::TransparencyType | getTransparencyType () const |
Returns the current Transparency Type information from the state. | |
int32_t | getNumNormals () const |
Returns the current normal information from the state. | |
const SbVec3f & | getNormal (int index) const |
Returns the current normal information from the state. | |
SoNormalBinding::Binding | getNormalBinding () const |
Returns the current normal information from the state. | |
int32_t | getNumProfileCoordinates () const |
Returns the current profiles and their coordinates from the state. | |
const SbVec2f & | getProfileCoordinate2 (int index) const |
Returns the current profiles and their coordinates from the state. | |
const SbVec3f & | getProfileCoordinate3 (int index) const |
Returns the current profiles and their coordinates from the state. | |
const SoNodeList & | getProfile () const |
Returns the current profiles and their coordinates from the state. | |
SoShapeHints::VertexOrdering | getVertexOrdering () const |
Returns the current shape hints from the state. | |
SoShapeHints::ShapeType | getShapeType () const |
Returns the current shape hints from the state. | |
SoShapeHints::FaceType | getFaceType () const |
Returns the current shape hints from the state. | |
float | getCreaseAngle () const |
Returns the current shape hints from the state. | |
int32_t | getNumTextureCoordinates () const |
Returns texture information from the state. | |
const SbVec2f & | getTextureCoordinate2 (int index) const |
Returns texture information from the state. | |
const SbVec4f & | getTextureCoordinate4 (int index) const |
Returns texture information from the state. | |
SoTextureCoordinateBinding::Binding | getTextureCoordinateBinding () const |
Returns texture information from the state. | |
const SbColor & | getTextureBlendColor () const |
const unsigned char * | getTextureImage (SbVec2i32 &size, int &numComps) const |
Returns texture information from the state. | |
const SbName & | getTextureFileName () const |
Returns texture information from the state. | |
const SbMatrix & | getTextureMatrix () const |
Returns the current texture mapping information from the state. | |
const SoTexture2Transform * | getTextureTransformNode () const |
Returns the current texture mapping information from the state. | |
SoTexture::Model | getTextureModel () const |
Returns the current texture mapping information from the state. | |
SoTexture::Wrap | getTextureWrapS () const |
Returns the current texture mapping information from the state. | |
SoTexture::Wrap | getTextureWrapT () const |
Returns the current texture mapping information from the state. | |
const SbMatrix & | getModelMatrix () const |
Returns the current modeling transformation from the state. | |
SoUnits::Units | getUnits () const |
Returns the current units from the state. | |
float | getFocalDistance () const |
Returns the current camera and viewing information from the state. | |
const SbMatrix & | getProjectionMatrix () const |
Returns the current camera and viewing information from the state. | |
const SbMatrix & | getViewingMatrix () const |
Returns the current camera and viewing information from the state. | |
const SbViewVolume & | getViewVolume () const |
Returns the current camera and viewing information from the state. | |
SoPickStyle::Style | getPickStyle () const |
Returns the current picking style. | |
int32_t | getSwitch () const |
Returns the current switch value. | |
void | setCallbackAll (SbBool flag) |
Sets whether the callback uses normal traversal (switches, etc.) or whether it traverses every single node. | |
SbBool | isCallbackAll () const |
Returns whether the callback uses normal traversal (switches, etc.) or whether it traverses every single node. | |
SoDEPRECATED const unsigned char * | getTextureImage (SbVec2s &size, int &numComps) const |
Returns texture information from the state. | |
Public Member Functions inherited from SoAction | |
virtual | ~SoAction () |
Destructor. | |
virtual void | clearApplyResult () |
When applied, an action may reference nodes or create objects (e.g. | |
virtual void | invalidateState () |
Invalidates the current traversal state in the action, forcing it to be recreated when the action is next applied. | |
void | stopActionInBranch () |
This function stops the action in the current Scene Graph branch. | |
SbBool | getContinueActionInBranchFlag () const |
This function indicates if the action must stop in the current branch. | |
void | resetContinueActionInBranchFlag () |
This function resets the continue action flag. | |
void | useAlternateRep (const SbBool enable) |
Tell the action to use alternate representations during traversal when available. | |
SbBool | isUsingAlternateRep () const |
Returns TRUE if current action is using alternate representations. | |
void | setSceneManager (SoSceneManager *mgr) |
Set the scene manager associated with this action (if any ). | |
SoSceneManager * | getSceneManager () const |
Return the SoSceneManager associated with this action. | |
DistribMode | getDistribMode () const |
Returns the distribution mode of this action across a cluster (ScaleViz-Cluster only). | |
AppliedCode | getWhatAppliedTo () const |
Returns code indicating what action is being applied to. | |
SoNode * | getNodeAppliedTo () const |
Returns the node the action is being applied to. | |
SoPath * | getPathAppliedTo () const |
Returns the path the action is being applied to. | |
const SoPathList * | getPathListAppliedTo () const |
Returns the path list the action is being applied to. | |
const SoPathList * | getOriginalPathListAppliedTo () const |
Returns the original path list the action is being applied to. | |
SbBool | isLastPathListAppliedTo () const |
Returns TRUE if the current list is the last one from the original. | |
PathCode | getPathCode (int &numIndices, const int *&indices) |
Returns path code based on where current node (the node at the end of the current path) lies with respect to the path(s) the action is being applied to. | |
PathCode | getPathCodeMI (int &numIndices, const int *&indices, const int *&instanceIndices) |
Extender API: available to programmers who wish to extend the toolkit | |
void | traverse (SoNode *node) |
Does traversal of a graph rooted by a node. | |
SbBool | hasTerminated () const |
Returns TRUE if the traversal has reached a termination condition. | |
const SoPath * | getCurPath () |
Returns the path accumulated during traversal, i.e., the chain of nodes from the root of the traversed graph to the current node being traversed. | |
SoState * | getState () const |
Gets the state from the action. | |
virtual void | setUpState () |
Creates state if it is NULL or it is no longer valid because new elements have been enabled since it was created. | |
void | setPipeId (int id) |
Sets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration. | |
int | getPipeId () const |
Gets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration. | |
bool | isBeingApplied () |
Returns TRUE if this action is currently being applied. | |
virtual bool | preDelayedTraversal () |
Method called by SoMultiPassManager before delayed pass traversals. | |
virtual void | postDelayedTraversal () |
Method called by SoMultiPassManager after delayed pass traversals. | |
Public Member Functions inherited from SoTypedObject | |
SbBool | isOfType (const SoType &type) const |
Returns TRUE if this object is of the type specified in type or is derived from that type. | |
template<typename TypedObjectClass > | |
SbBool | isOfType () const |
Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class. | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
Static Public Member Functions inherited from SoToU3DAction | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
Static Public Member Functions inherited from SoCallbackAction | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
Static Public Member Functions inherited from SoAction | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
static void | nullAction (SoAction *, SoNode *) |
Null action method that can be stored in lookup table when desired. | |
Static Public Member Functions inherited from SoTypedObject | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
Additional Inherited Members | |
Public Types inherited from SoCallbackAction | |
enum | Response { CONTINUE , ABORT , PRUNE } |
Possible responses from a pre or post callback. More... | |
typedef Response | SoCallbackActionCB(void *userData, SoCallbackAction *action, const SoNode *node) |
The SoCallbackActionCB typedef is defined within the class, since it needs to refer to the Response enumerated type. | |
Public Types inherited from SoAction | |
enum | DistribMode { LOCAL_ONLY , CLUSTER_ONLY , ALL } |
This is used to define the way an action is distributed across a cluster. More... | |
enum | AppliedCode { NODE , PATH , PATH_LIST } |
This enum is used to determine what the action is being applied to. More... | |
enum | PathCode { NO_PATH , IN_PATH , BELOW_PATH , OFF_PATH } |
This enum may be used during traversal of nodes to indicate where the node is with respect to the path being traversed. More... | |
Class for exporting a scene graph to a PDF file.
This class can export an Open Inventor scenegraph into a simple PDF file. In addition to 3D scene encapsulation, the exporter can insert a title to the document and an unique block of text. Moreover, PDF encryption can lock access to the file contents. To import a 3D model inside a more complex PDF file, prefer SoToU3DAction. U3D files can be used to import 3D models inside PDF files by advanced PDF editors.
Limitations
Use case
Warning
Definition at line 130 of file SoToPDFAction.h.
SoToPDFAction::SoToPDFAction | ( | ) |
|
virtual |
|
virtual |
finalize export to the U3D output file.
Returns false if an error has occured.
Reimplemented from SoToU3DAction.
|
static |
Returns the type identifier for this class.
|
virtual |
Returns the type identifier for this specific instance.
Reimplemented from SoToU3DAction.
|
virtual |
Set the PDF output file.
Returns false if an error has occured.
Non Unicode: This function should not be used in a Unicode application.
Reimplemented from SoToU3DAction.
|
virtual |
void SoToPDFAction::setLandscape | ( | const SbBool | enable | ) |
[Optional] Changes the page orientation from portrait to landscape.
SoNONUNICODE void SoToPDFAction::setPassword | ( | const char * | writePass, |
const char * | readPass = NULL |
||
) |
[Optional] Set passwords to lock write & read access to the PDF file contents.
Passwords are optional. A write password is required before setting a read password. Write and read passwords must be different.
Non Unicode: This function should not be used in a Unicode application.
[Optional] Set passwords to lock write & read access to the PDF file contents.
Passwords are optional. A write password is required before setting a read password. Write and read passwords must be different.
SoNONUNICODE void SoToPDFAction::setText | ( | const char * | text | ) |
[Optional] Add a text block into the output PDF file.
Non Unicode: This function should not be used in a Unicode application.
void SoToPDFAction::setText | ( | const SbString & | text | ) |
[Optional] Add a text block into the output PDF file.
SoNONUNICODE void SoToPDFAction::setTitle | ( | const char * | title | ) |
[Optional] Set a title into the output PDF file.
Non Unicode: This function should not be used in a Unicode application.
void SoToPDFAction::setTitle | ( | const SbString & | title | ) |
[Optional] Set a title into the output PDF file.