![]() |
http://www.sim.no http://www.coin3d.org |
The SoVectorizeAction class is the base class for vectorizing Coin scene graphs. More...
#include <HardCopy/SoVectorizeAction.h>
Public Types | |
enum | DimensionUnit { INCH , MM , METER } |
enum | Orientation { PORTRAIT , LANDSCAPE } |
enum | PageSize { A0 = 0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 } |
enum | PointStyle { CIRCLE , SQUARE } |
enum | ColorTranslationMethod { REVERSE_ONLY_BLACK_AND_WHITE , AS_IS , REVERSE } |
enum | JoinLineStyle { NO_JOIN , MITERED_JOIN , MITERED_BEVELED_JOIN , BEVELED_JOIN , TRIANGULAR_JOIN , ROUNDED_JOIN } |
enum | EndLineStyle { BUTT_END , SQUARE_END , TRIANGULAR_END , ROUND_END } |
enum | HLHSRMode { NO_HLHSR , HLHSR_SIMPLE_PAINTER , HLHSR_PAINTER , HLHSR_PAINTER_SURFACE_REMOVAL , HIDDEN_LINES_REMOVAL } |
![]() | |
enum | Response { CONTINUE , ABORT , PRUNE } |
typedef Response | SoCallbackActionCB(void *userdata, SoCallbackAction *action, const SoNode *node) |
![]() | |
enum | AppliedCode { NODE = 0 , PATH = 1 , PATH_LIST = 2 } |
enum | PathCode { NO_PATH = 0 , IN_PATH = 1 , BELOW_PATH = 2 , OFF_PATH = 3 } |
Static Public Member Functions | |
static SoType | getClassTypeId (void) |
static void | addMethod (const SoType type, SoActionMethod method) |
static void | enableElement (const SoType type, const int stackindex) |
static void | initClass (void) |
![]() | |
static SoType | getClassTypeId (void) |
static void | addMethod (const SoType type, SoActionMethod method) |
static void | enableElement (const SoType type, const int stackindex) |
static void | initClass (void) |
![]() | |
static void | initClass (void) |
static void | initClasses (void) |
static SoType | getClassTypeId (void) |
static void | nullAction (SoAction *action, SoNode *node) |
Protected Member Functions | |
virtual const SoEnabledElementsList & | getEnabledElements (void) const |
void | setOutput (SoVectorOutput *output) |
virtual float | pixelsToUnits (const int pixels) |
virtual void | printHeader (void) const =0 |
virtual void | printFooter (void) const |
virtual void | printBackground (void) const |
virtual void | printItem (const SoVectorizeItem *item) const =0 |
virtual void | printViewport (void) const |
SbVec2f | getRotatedViewportStartpos (void) const |
SbVec2f | getRotatedViewportSize (void) const |
const SbBSPTree & | getBSPTree (void) const |
![]() | |
virtual void | beginTraversal (SoNode *node) |
![]() | |
SoAction (void) | |
virtual void | endTraversal (SoNode *node) |
void | setTerminated (const SbBool flag) |
virtual SbBool | shouldCompactPathList (void) const |
Static Protected Member Functions | |
static SoEnabledElementsList * | getClassEnabledElements (void) |
static SoActionMethodList * | getClassActionMethods (void) |
![]() | |
static SoEnabledElementsList * | getClassEnabledElements (void) |
static SoActionMethodList * | getClassActionMethods (void) |
![]() | |
static SoEnabledElementsList * | getClassEnabledElements (void) |
static SoActionMethodList * | getClassActionMethods (void) |
Friends | |
class | SoVectorizeActionP |
Additional Inherited Members | |
![]() | |
SoState * | state |
SoActionMethodList * | traversalMethods |
The SoVectorizeAction class is the base class for vectorizing Coin scene graphs.
SoVectorizeAction will traverse the scene graph and convert all supported geometry into vectorized data. Subclasses can then use this data to produce vector files of different formats.
Currently supported geometry:
The geometry will be shaded based on the OpenGL shading model, so lights and material will affect the geometry in the same way as in a standard Coin viewer. Please note that neither transparency nor texture mapping is supported yet.
The unit used by the scene graph.
The drawing orientation.
SoVectorizeAction::SoVectorizeAction | ( | void | ) |
Default constructor.
|
virtual |
Destructor.
Returns the type identification of an action derived from a class inheriting SoAction. This is used for run-time type checking and "downward" casting.
Usage example:
For application programmers wanting to extend the library with new actions: this method needs to be overridden in all subclasses. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through Inventor/nodes/SoSubAction.h: SO_ACTION_SOURCE, SO_ACTION_INIT_CLASS and SO_ACTION_CONSTRUCTOR.
For more information on writing Coin extensions, see the SoAction class documentation.
Returns the actual type id of an object derived from a class inheriting SoAction. Needs to be overridden in all subclasses.
Reimplemented from SoCallbackAction.
Reimplemented in SoVectorizePSAction.
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
|
protectedvirtual |
Returns a list of the elements used by action instances of this class upon traversal operations.
Reimplemented from SoCallbackAction.
Reimplemented in SoVectorizePSAction.
SoVectorOutput * SoVectorizeAction::getOutput | ( | void | ) | const |
Returns the SoVectorOutput class used by this action. The output is written to stdout by default, but you can change this by using SoVectorOutput::openFile().
Referenced by SoVectorizePSAction::getOutput(), and SoVectorizePSAction::getPSOutput().
Applies the action to the scene graph rooted at root.
Note that you should not apply an action to a node with a zero reference count. The behavior in that case is undefined.
Reimplemented from SoAction.
References SoAction::apply().
Applies the action to the parts of the graph defined by path.
Note that an SoPath will also contain all nodes that may influence e.g. geometry nodes in the path. So for instance applying an SoGLRenderAction on an SoPath will render that path as expected in the view, where geometry will get its materials, textures, and other appearance settings correctly.
If the path ends in an SoGroup node, the action will also traverse the tail node's children.
Reimplemented from SoAction.
References SoAction::apply().
|
virtual |
Applies action to the graphs defined by pathlist. If obeysrules is set to TRUE
, pathlist must obey the following four conditions (which is the case for path lists returned from search actions for non-group nodes and path lists returned from picking actions):
All paths must start at the same head node. All paths must be sorted in traversal order. The paths must be unique. No path can continue through the end point of another path.
Reimplemented from SoAction.
References SoAction::apply().
|
virtual |
Begin writing a page. This will write file header information and print background (if enabled) and border.
References beginViewport(), getRotatedViewportSize(), printBackground(), printHeader(), and SoCallbackAction::setViewportRegion().
End page. This will write all remaining geometry, and write the file footer.
References endViewport(), and printFooter().
|
virtual |
Will calibrate pixel based attributes (font size, line width, points size, etc) so that it will match OpenGL rendering done in vp.
References getPageSize().
|
virtual |
Begin writing a viewport inside the current page.
References getRotatedViewportSize(), printViewport(), and SoCallbackAction::setViewportRegion().
Referenced by beginPage().
End writing a viewport. This will flush all vector items.
References SbList< Type >::getLength().
Referenced by endPage().
|
virtual |
Sets the orientation to o.
|
virtual |
Returns the current orientation.
Referenced by getRotatedViewportSize(), getRotatedViewportStartpos(), and SoVectorizePSAction::printHeader().
|
virtual |
Sets the background color. If bg is FALSE, the background will not be cleared before rendering. If bg is TRUE, the background will be cleared to col before in beginPage().
|
virtual |
Returns if the background will be cleared or not. When this function returns TRUE, col will be set to the background color.
Referenced by SoVectorizePSAction::printBackground().
|
virtual |
Sets how to convert pixel based attributes (line width and point size) to vector sizes. By default 1 pixel equals 0.35 mm.
|
virtual |
Sets how the images and 2D fonts are converted. By default 1 pixel equals 0.35 mm.
|
virtual |
|
virtual |
Sets the points rendering style. Default style is CIRCLE.
|
virtual |
Returns the points rendering style.
Returns the current page startpos.
Referenced by SoVectorizePSAction::printHeader().
Returns the current page size.
Referenced by calibrate(), pixelsToUnits(), and SoVectorizePSAction::printHeader().
|
virtual |
Sets the drawing dimensions. You can use this and setStartPosition() instead of using beginViewport(). Provided for TGS OIV compatibility.
|
virtual |
Returns the current drawing dimensions.
|
virtual |
Sets the drawing staring position. You can use this and setDrawingDimensions() instead of using beginViewport(). Provided for TGS OIV compatibility.
|
virtual |
Returns the current drawing starting position.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
SoVectorizeAction::HLHSRMode SoVectorizeAction::getHLHSRMode | ( | void | ) | const |
Not implemented yet. Provided for TGS OIV compatibility.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
Not implemented yet. Provided for TGS OIV compatibility.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
SbBool SoVectorizeAction::isLightingEnabled | ( | void | ) | const |
Not implemented yet. Provided for TGS OIV compatibility.
|
protected |
Should be used by subclasses to set the SoVectorOutput instance that should be used.
Referenced by SoVectorizePSAction::SoVectorizePSAction().
|
protectedvirtual |
Converts pixels to normalized units.
References getPageSize(), and getPixelImageSize().
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
Implemented in SoVectorizePSAction.
Referenced by beginPage().
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
Should be overridden by subclasses to print file footer data.
Reimplemented in SoVectorizePSAction.
Referenced by endPage().
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
Should be overridden by subclasses to print background data.
Reimplemented in SoVectorizePSAction.
Referenced by beginPage().
|
protectedpure virtual |
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
Should be overridden by subclasses to print an item.
Implemented in SoVectorizePSAction.
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
Should be overridden by subclasses to set up the current page viewport.
Reimplemented in SoVectorizePSAction.
Referenced by beginViewport().
Convenience method for subclasses. Will return the viewport startpos, taking the orientation into account
References getOrientation().
Referenced by SoVectorizePSAction::printBackground(), and SoVectorizePSAction::printViewport().
Convenience method for subclasses. Will return the viewport size, taking the orientation into account
References getOrientation().
Referenced by beginPage(), beginViewport(), SoVectorizePSAction::printBackground(), and SoVectorizePSAction::printViewport().
Returns the bps tree used to store triangle and line vertices.
Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.
Generated on Wed Jul 19 2023 for Coin by Doxygen. 1.9.8