![]() |
Coin3D is Free Software, published under the BSD 3-clause license. |
https://coin3d.github.io https://www.kongsberg.com/en/kogt/ |
The SoVectorizeAction class is the base class for vectorizing Coin scene graphs. More...
#include <Inventor/annex/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) |
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 object derived from a class inheriting SoAction. This is used for runtime type checking and "downward" casting.
Reimplemented from SoCallbackAction.
Reimplemented in SoVectorizePSAction.
This static method returns the SoType object associated with objects of this class.
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 list of enabled elements.
Reimplemented from SoCallbackAction.
Reimplemented in SoVectorizePSAction.
|
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.
|
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.
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().
Initializes the runtime type system for this class, and sets up the enabled elements and action method list.
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 |
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.
|
virtual |
Begin writing a page. This will write file header information and print background (if enabled) and border.
End page. This will write all remaining geometry, and write the file footer.
|
virtual |
Will calibrate pixel based attributes (font size, line width, points size, etc) so that it will match OpenGL rendering done in vp.
|
virtual |
Begin writing a viewport inside the current page.
End writing a viewport. This will flush all vector items.
|
virtual |
Sets the orientation to o.
|
virtual |
Returns the current orientation.
|
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.
|
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 |
Returns the pixel image size.
|
virtual |
Sets the points rendering style. Default style is CIRCLE.
|
virtual |
Returns the points rendering style.
Returns the current page startpos.
|
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.
|
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.
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 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.
Should be overridden by subclasses to print background data.
Reimplemented 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.
Convenience method for subclasses. Will return the viewport startpos, taking the orientation into account
Convenience method for subclasses. Will return the viewport size, taking the orientation into account
Returns the bps tree used to store triangle and line vertices.