Coin
4.0.3
Coin3D core library
|
The SoVectorizeAction class is the base class for vectorizing Coin scene graphs. More...
#include <Inventor/annex/HardCopy/SoVectorizeAction.h>
Public Types | |
enum | ColorTranslationMethod { REVERSE_ONLY_BLACK_AND_WHITE , AS_IS , REVERSE } |
enum | DimensionUnit { INCH , MM , METER } |
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 | JoinLineStyle { NO_JOIN , MITERED_JOIN , MITERED_BEVELED_JOIN , BEVELED_JOIN , TRIANGULAR_JOIN , ROUNDED_JOIN } |
enum | Orientation { PORTRAIT , LANDSCAPE } |
enum | PageSize { A0 = 0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 } |
enum | PointStyle { CIRCLE , SQUARE } |
Public Types inherited from SoCallbackAction | |
enum | Response { CONTINUE , ABORT , PRUNE } |
typedef Response | SoCallbackActionCB(void *userdata, SoCallbackAction *action, const SoNode *node) |
Public Types inherited from SoAction | |
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 void | addMethod (const SoType type, SoActionMethod method) |
static void | enableElement (const SoType type, const int stackindex) |
static SoType | getClassTypeId (void) |
static void | initClass (void) |
Static Public Member Functions inherited from SoCallbackAction | |
static void | addMethod (const SoType type, SoActionMethod method) |
static void | enableElement (const SoType type, const int stackindex) |
static SoType | getClassTypeId (void) |
static void | initClass (void) |
Static Public Member Functions inherited from SoAction | |
static SoType | getClassTypeId (void) |
static void | initClass (void) |
static void | initClasses (void) |
static void | nullAction (SoAction *action, SoNode *node) |
Protected Member Functions | |
const SbBSPTree & | getBSPTree (void) const |
virtual const SoEnabledElementsList & | getEnabledElements (void) const |
SbVec2f | getRotatedViewportSize (void) const |
SbVec2f | getRotatedViewportStartpos (void) const |
virtual float | pixelsToUnits (const int pixels) |
virtual void | printBackground (void) const |
virtual void | printFooter (void) const |
virtual void | printHeader (void) const =0 |
virtual void | printItem (const SoVectorizeItem *item) const =0 |
virtual void | printViewport (void) const |
void | setOutput (SoVectorOutput *output) |
Protected Member Functions inherited from SoCallbackAction | |
virtual void | beginTraversal (SoNode *node) |
Protected Member Functions inherited from SoAction | |
SoAction (void) | |
virtual void | endTraversal (SoNode *node) |
void | setTerminated (const SbBool flag) |
virtual SbBool | shouldCompactPathList (void) const |
Static Protected Member Functions | |
static SoActionMethodList * | getClassActionMethods (void) |
static SoEnabledElementsList * | getClassEnabledElements (void) |
Static Protected Member Functions inherited from SoCallbackAction | |
static SoActionMethodList * | getClassActionMethods (void) |
static SoEnabledElementsList * | getClassEnabledElements (void) |
Static Protected Member Functions inherited from SoAction | |
static SoActionMethodList * | getClassActionMethods (void) |
static SoEnabledElementsList * | getClassEnabledElements (void) |
Additional Inherited Members | |
Protected Attributes inherited from SoAction | |
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.
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
|
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.
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.
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.
|
virtual |
Begin writing a page. This will write file header information and print background (if enabled) and border.
|
virtual |
Begin writing a viewport inside the current page.
|
virtual |
Will calibrate pixel based attributes (font size, line width, points size, etc) so that it will match OpenGL rendering done in vp.
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
End page. This will write all remaining geometry, and write the file footer.
End writing a viewport. This will flush all vector items.
|
virtual |
Returns if the background will be cleared or not. When this function returns TRUE, col will be set to the background color.
Returns the bps tree used to store triangle and line vertices.
|
staticprotected |
Returns list of action methods for this class. The enabledElements and methods variables are protected in the original OIV API. This is not such a good idea, since exposed static class member variables is a major grievance with regard to Win32 DLLs. This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
|
staticprotected |
Returns list of enabled elements for this class. The enabledElements and methods variables are protected in the original OIV API. This is not such a good idea, since exposed static class member variables is a major grievance with regard to Win32 DLLs. This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
This static method returns the SoType object associated with objects of this class.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
|
virtual |
Returns the current drawing dimensions.
|
protectedvirtual |
Returns list of enabled elements.
Reimplemented from SoCallbackAction.
Reimplemented in SoVectorizePSAction.
SoVectorizeAction::HLHSRMode SoVectorizeAction::getHLHSRMode | ( | void | ) | const |
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 |
Returns the current orientation.
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().
Returns the current page startpos.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
|
virtual |
Returns the pixel image size.
|
virtual |
Returns the points rendering style.
Convenience method for subclasses. Will return the viewport size, taking the orientation into account
Convenience method for subclasses. Will return the viewport startpos, taking the orientation into account
|
virtual |
Returns the current drawing starting position.
Returns the type identification of an object derived from a class inheriting SoAction. This is used for runtime type checking and "downward" casting.
Reimplemented from SoCallbackAction.
Reimplemented in SoVectorizePSAction.
Initializes the runtime type system for this class, and sets up the enabled elements and action method list.
SbBool SoVectorizeAction::isLightingEnabled | ( | void | ) | const |
Not implemented yet. Provided for TGS OIV compatibility.
|
protectedvirtual |
Converts pixels to normalized units.
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.
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.
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.
|
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.
|
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 |
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 |
Sets the drawing dimensions. You can use this and setStartPosition() instead of using beginViewport(). 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 |
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 the orientation to o.
|
protected |
Should be used by subclasses to set the SoVectorOutput instance that should be used.
|
virtual |
Not implemented yet. Provided for TGS OIV compatibility.
|
virtual |
Sets how the images and 2D fonts are converted. By default 1 pixel equals 0.35 mm.
|
virtual |
Sets the points rendering style. Default style is CIRCLE.
|
virtual |
Sets the drawing staring position. You can use this and setDrawingDimensions() instead of using beginViewport(). Provided for TGS OIV compatibility.