Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
SoVectorizeAction Class Referenceabstract

HardCopy Abstract class for vectorizing a scene graph to a file. More...

#include <HardCopy/SoVectorizeAction.h>

+ Inheritance diagram for SoVectorizeAction:

Public Types

enum  DimensionUnit {
  INCH ,
  MM ,
  METER
}
 Dimension unit. More...
 
enum  ShadeModel {
  FLAT ,
  SMOOTH
}
 Shading models. More...
 
enum  Orientation {
  PORTRAIT ,
  LANDSCAPE
}
 Orientation type. More...
 
enum  ColorTranslationMethod {
  REVERSE_ONLY_BLACK_AND_WHITE ,
  AS_IS ,
  REVERSE
}
 Color translation methods. More...
 
enum  JoinLineStyle {
  NO_JOIN ,
  MITERED_JOIN ,
  MITERED_BEVELED_JOIN ,
  BEVELED_JOIN ,
  TRIANGULAR_JOIN ,
  ROUNDED_JOIN
}
 Join line style. More...
 
enum  EndLineStyle {
  BUTT_END ,
  SQUARE_END ,
  TRIANGULAR_END ,
  ROUND_END
}
 End line style. More...
 
enum  HLHSRMode {
  NO_HLHSR ,
  HLHSR_SIMPLE_PAINTER ,
  HLHSR_PAINTER ,
  HLHSR_PAINTER_SURFACE_REMOVAL ,
  HLHSR_RASTER ,
  HIDDEN_LINES_REMOVAL
}
 HLHSR (Hidden Line and Hidden Surface Removal) mode. More...
 
- 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...
 

Public Member Functions

virtual SoType getTypeId () const
 Returns the type identifier for this specific instance.
 
virtual ~SoVectorizeAction ()
 
virtual SoVectorOutputgetVectorOutput () const
 Output access method.
 
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.
 
virtual void beginPage (const SbVec2f &startPagePosition, const SbVec2f &pageSize, DimensionUnit u=MM)
 Begin a new page.
 
virtual void endPage ()
 Ends a page.
 
virtual void setDrawingDimensions (float w, float h, DimensionUnit u=MM)
 Sets the dimensions of the drawing on the sheet of paper.
 
virtual void setDrawingDimensions (const SbVec2f &d, DimensionUnit u=MM)
 Sets the dimensions of the drawing on the sheet of paper.
 
virtual SbVec2f getDrawingDimensions (DimensionUnit u=MM) const
 Returns the dimensions of the drawing on the sheet of paper.
 
virtual void setStartPosition (float x, float y, DimensionUnit u=MM)
 Sets the start position of the drawing on the sheet of paper.
 
virtual void setStartPosition (const SbVec2f &p, DimensionUnit u=MM)
 Sets the start position of the drawing on the sheet of paper.
 
virtual SbVec2f getStartPosition (DimensionUnit u=MM) const
 Returns the start position of the drawing on the sheet of paper.
 
virtual void setOrientation (Orientation o)
 Sets the orientation of the drawing on the sheet of paper.
 
virtual Orientation getOrientation () const
 Returns the orientation of the drawing on the sheet of paper.
 
virtual void setBorder (float width)
 Sets the width of the border of the clipping limits.
 
virtual void setBorder (float width, SbColor color)
 Sets the color and the width of the border of the clipping limits.
 
virtual void getBorder (float *w, SbColor *color) const
 Returns the color and the width of the border of the clipping limits.
 
virtual void setBackgroundColor (SbBool bg)
 Enables or disables the background and sets its color to white.
 
virtual void setBackgroundColor (SbBool bg, SbColor color)
 Sets the color of the background.
 
virtual SbBool getBackgroundColor (SbColor *color) const
 Returns the color of the background.
 
virtual void setNominalWidth (float w, DimensionUnit u=MM)
 Sets the nominal width.
 
virtual float getNominalWidth (DimensionUnit u=MM) const
 Returns the nominal width.
 
virtual void setLinePatternSize (float w, DimensionUnit u=MM)
 Sets the line pattern size, i.e., the association between printer pattern (16 printer "points") and the size of the line pattern on the hard copy output.
 
virtual float getLinePatternSize (DimensionUnit u=MM) const
 Returns the line pattern scale factor.
 
virtual void setPixelImageSize (float w, DimensionUnit u=MM)
 Sets the size of a pixel for image primitives.
 
virtual float getPixelImageSize (DimensionUnit u=MM) const
 Returns the size of a pixel.
 
virtual void setColorTranslationMethod (ColorTranslationMethod method)
 Sets the method for choosing the color of the drawing on the sheet of paper.
 
virtual ColorTranslationMethod getColorTranslationMethod () const
 Returns the method for choosing the color of the drawing on the sheet of paper.
 
virtual void setLineEndStyle (EndLineStyle style)
 Sets the style for line ends.
 
virtual EndLineStyle getLineEndStyle () const
 Returns the style for line ends.
 
virtual void setLineJoinsStyle (JoinLineStyle style)
 Sets the style for line joins.
 
virtual JoinLineStyle getLineJoinsStyle () const
 Returns the style for line joins.
 
virtual void setMiterLimit (float limit)
 Sets the miter limit.
 
virtual float getMiterLimit () const
 Returns the miter limit.
 
virtual void setPenDescription (int num_pens, const SbColor *colors=0, const float *widths=0, DimensionUnit u=MM)
 Sets the description of the color and the width of each pen.
 
virtual void getPenDescription (SbColor *colors, float *widths, DimensionUnit u=MM) const
 Returns the description of the color and the width of each pen.
 
virtual int getPenNum () const
 Returns the number of pens.
 
virtual void setColorPriority (SbBool priority)
 Sets the color priority flag.
 
virtual SbBool getColorPriority (void) const
 Returns the color priority.
 
virtual void setHLHSRMode (HLHSRMode mode)
 Sets the Hidden Line and Hidden Surface Removal mode.
 
HLHSRMode getHLHSRMode () const
 Returns the Hidden Line and Hidden Surface Removal mode.
 
void setHLHSRRasterQuality (float quality)
 Sets the quality of the raster image generated to vectorize visible primitives with the HLHSR_RASTER algorithm.
 
float getHLHSRRasterQuality () const
 Returns the raster image quality value.
 
void setHLHSRRasterCaching (SbBool enable)
 Enables/disables the use of OpenGL display lists to generate the raster image with the HLHSR_RASTER algorithm.
 
SbBool getHLHSRRasterCaching () const
 Returns the raster caching flag.
 
virtual void enableLighting (SbBool flag)
 Allows the user to enable/disable the taking into account of lights in the scene graph during the computation of the vectorized file.
 
SbBool isLightingEnabled () const
 Returns TRUE if lighting is enabled.
 
void setShadeModel (ShadeModel model)
 Selects FLAT or SMOOTH shading.
 
ShadeModel getShadeModel ()
 Returns the shade model.
 
void setPolygonOffset (float offset)
 Method to set the Z offset to be applied to polygons in normalized device coordinates (-1 to 1 space).
 
void setLineOffset (float offset)
 Sets line offset.
 
void setMarkerOffset (float offset)
 Sets marker offset.
 
float getPolygonOffset () const
 Returns polygon offset.
 
float getLineOffset () const
 Returns line offset.
 
float getMarkerOffset () const
 Returns marker offset.
 
- 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 ).
 
SoSceneManagergetSceneManager () const
 Return the SoSceneManager associated with this action.
 
virtual void forwardTraversal (SoNode *node)
 Traverse a node that is not part of the current scenegraph.
 
virtual void forwardTraversal (SoPath *path)
 Traverse a path that is not part of the current scenegraph.
 
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.
 
SoNodegetNodeAppliedTo () const
 Returns the node the action is being applied to.
 
SoPathgetPathAppliedTo () const
 Returns the path the action is being applied to.
 
const SoPathListgetPathListAppliedTo () const
 Returns the path list the action is being applied to.
 
const SoPathListgetOriginalPathListAppliedTo () 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 SoPathgetCurPath ()
 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.
 
SoStategetState () 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 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.
 

Friends

class SoHLHSRVectorize
 
class SoHLHSRImageVectorizer
 

Detailed Description

HardCopy Abstract class for vectorizing a scene graph to a file.

This class is an abstract class for all vectorize actions. The supported subclasses are SoVectorizeCGMAction, SoVectorizeGDIAction (Win32 only), SoVectorizeHPGLAction, and SoVectorizePSAction. As with SoWriteAction, these subclasses contain an SoVectorOutput instance (or derived) which writes by default to standard output. Methods on SoVectorOutput can be called to specify what file to write to.

Default values:

  • Orientation: PORTRAIT
  • Start position: X=10.0 mm and Y=10.0 mm
  • Dimensions: Width=190.0 mm and Height=277.0 mm
  • Border width: 2.0 mm
  • Border color: (1.,1.,1.)
  • Background: no background
  • Nominal width: 0.35 mm
  • Pixel image size: 0.35mm
  • Color Translation method: REVERSE_ONLY_BLACK_AND_WHITE
  • Number of pens: 0
  • Color priority: TRUE
  • Line End Style: BUTT_END
  • Line Join Style: NO_JOIN
  • Miter limit: 1.5 (Miter Length / Line Width)
  • HLHSR mode: NO_HLHSR
  • Lighting enabled: FALSE
  • Polygon/Line/Marker offset: 0
  • Shade model: FLAT
  • HLHSR raster quality: 0.5

Line end styles description:

Force black and white rendering:
It is possible to force black and white rendering by setting the environment variable OIV_HC_BLACK_AND_WHITE (see SoPreferences). In this mode all non-white colors are set to full black. This is useful because selecting "black & white" in the printer setup dialog normally produces gray scale rendering and some colors may be difficult to see. This option is applied after color translation (e.g. REVERSE_ONLY_BLACK_AND_WHITE). The variable must be set before creating an instance of the class.

Performance:
The HLHSR modes NO_HLHSR and HLHSR_SIMPLE_PAINTER are generally quite fast and should be used whenever possible (when the resulting image quality is acceptable or when a quick preview is desired). The other HLHSR modes involve computations that are very CPU intensive. In other words, the time required to produce an image depends almost entirely on the machine's processor speed. HLHSR_PAINTER_SURFACE_REMOVAL has a very small dependency on the graphics board (because it does one offscreen render) whereas HLHSR_RASTER performance is completely linked to the graphics board performance. The other modes are not affected by the graphics board performance. One implication of the CPU dependency is that the release libraries will generally be much faster than the debug libraries (because of compiler optimizations). Benchmarking should always be done using the release libraries.

Performance is directly related to the number of primitives (individual faces and line segments, not the number of nodes in the scene graph) and the number of intersecting or difficult-to-sort primitives. Performance decreases rapidly (worse than linear) for large numbers of primitives. Therefore algorithms that can reduce the number of primitives may be needed for large scenes (see, for example, SoSimplifyAction).

In some cases setting a small polygon offset can improve performance by reducing interference between faces and lines (used only with the Painter's algorithm HLHSR modes).

HIDDEN_LINES_REMOVAL mode is very slow and should not be used unless very precise output is required.

Generally HLHSR_RASTER mode gives the best combination of performance and image quality.

Limitations

  • Modeling clipping (SoClipPlane) is ignored.
  • Textures are ignored (polygons are drawn as if no texture is applied).
  • Transparency is ignored.
  • SoAnnotation nodes are handled like SoSeparator nodes.
  • Smooth shading is only supported with PostScript Level 3.
  • SoText2 (and SoAnnoText3 using an xxx_PRINT_RASTER option) will be rendered using native fonts, so the requested font name must be available on the rendering device.
  • VolumeViz representations are not supported (because texturing is not possible).

Definition at line 158 of file SoVectorizeAction.h.

Member Enumeration Documentation

◆ ColorTranslationMethod

Color translation methods.

Enumerator
REVERSE_ONLY_BLACK_AND_WHITE 

Only black and white are reversed (default).

AS_IS 

Colors stay as is.

REVERSE 

All colors are reversed.

Definition at line 223 of file SoVectorizeAction.h.

◆ DimensionUnit

Dimension unit.

Enumerator
INCH 

Inch.

MM 

Millimeter.

METER 

Meter.

Definition at line 171 of file SoVectorizeAction.h.

◆ EndLineStyle

End line style.

Enumerator
BUTT_END 
SQUARE_END 
TRIANGULAR_END 
ROUND_END 

Definition at line 271 of file SoVectorizeAction.h.

◆ HLHSRMode

HLHSR (Hidden Line and Hidden Surface Removal) mode.

For additional info, see setHLHSRMode.

Enumerator
NO_HLHSR 

No HLHSR is done.

HLHSR_SIMPLE_PAINTER 

Simple painter's algorithm is used.

HLHSR_PAINTER 

Painter's algorithm is used.

Interpenetrating primitives are split to provide more correct visual results.

HLHSR_PAINTER_SURFACE_REMOVAL 

Surfaces that are completely hidden are removed prior to application of the painter's algorithm.

HLHSR_RASTER 

A raster-based algorithm is used.

HIDDEN_LINES_REMOVAL 

The output is rendered with lines (regardless of the on-screen render style) and hidden lines are removed.

Definition at line 283 of file SoVectorizeAction.h.

◆ JoinLineStyle

Join line style.

Enumerator
NO_JOIN 

There is no line join style.

MITERED_JOIN 

The line join style is mitered.

MITERED_BEVELED_JOIN 

The line join style is mitered and beveled.


BEVELED_JOIN 

The line join style is beveled.

TRIANGULAR_JOIN 

The line join style is triangular.

ROUNDED_JOIN 

The line join style is rounded.

Definition at line 241 of file SoVectorizeAction.h.

◆ Orientation

Orientation type.

Enumerator
PORTRAIT 

The orientation is PORTRAIT.

LANDSCAPE 

The orientation is LANDSCAPE.

Definition at line 209 of file SoVectorizeAction.h.

◆ ShadeModel

Shading models.

Enumerator
FLAT 

Flat shading model.

Each polygon is filled with a unique color which is the average of the colors associated with each vertex of the original polygon.

SMOOTH 

Smooth shading model.

Each polygon is filled with shaded colors which are interpolations of of the colors associated with each vertex of the original polygon. NOTE: Only supported with PostScript Level 3 format.

Definition at line 189 of file SoVectorizeAction.h.

Constructor & Destructor Documentation

◆ ~SoVectorizeAction()

virtual SoVectorizeAction::~SoVectorizeAction ( )
virtual

Member Function Documentation

◆ apply() [1/3]

virtual void SoVectorizeAction::apply ( const SoPathList pathList,
SbBool  obeysRules = FALSE 
)
virtual

Initiates an action on the graph specified by list of paths.

TRUE can be passed for the obeysRules flag if the given path list has the following four properties:

  • All paths have the same head node,
  • Paths are sorted in traversal order,
  • If one path ends at node A, no other path continues through A,
  • No two paths are the same.

These rules will be obeyed by path lists returned by picking and by searches for non-group nodes.

Reimplemented from SoAction.

◆ apply() [2/3]

virtual void SoVectorizeAction::apply ( SoNode node)
virtual

Initiates an action on the graph specified by a node.

Reimplemented from SoAction.

◆ apply() [3/3]

virtual void SoVectorizeAction::apply ( SoPath path)
virtual

Initiates an action on the graph specified by a path.

Reimplemented from SoAction.

◆ beginPage()

virtual void SoVectorizeAction::beginPage ( const SbVec2f startPagePosition,
const SbVec2f pageSize,
DimensionUnit  u = MM 
)
virtual

Begin a new page.

Allows the user to generate multiple plots per page.
A typical use is:

vectPS.beginPage(startPos, pageSize);
// Draw the scene graph root1 from the start point
// (x1, y1) to the end point(x1+width1, y1+height1)
vectPS.setStartPosition(x1, y1);
vectPS.setDrawingDimensions(width1, height1);
vectPS.setBorder(2.0);
vectPS.apply(root1);
vectPS.setStartPosition(x2, y2);
vectPS.setDrawingDimensions(width2, height2);
vectPS.apply(root2);
...
vectPS.setStartPosition(xi, yi);
vectPS.setDrawingDimensions(widthi, heighti);
vectPS.apply(rooti);
vectPS.endPage();
virtual void setBorder(float width)
Sets the width of the border of the clipping limits.
virtual void setStartPosition(float x, float y, DimensionUnit u=MM)
Sets the start position of the drawing on the sheet of paper.
virtual void endPage()
Ends a page.
virtual void apply(SoNode *node)
Initiates an action on the graph specified by a node.
virtual void setDrawingDimensions(float w, float h, DimensionUnit u=MM)
Sets the dimensions of the drawing on the sheet of paper.
virtual void beginPage(const SbVec2f &startPagePosition, const SbVec2f &pageSize, DimensionUnit u=MM)
Begin a new page.
<a href="IconLegend.html"><img src="extHC.gif" alt="HardCopy" border="0"></a> Realizes the vectoriza...

◆ enableLighting()

virtual void SoVectorizeAction::enableLighting ( SbBool  flag)
inlinevirtual

Allows the user to enable/disable the taking into account of lights in the scene graph during the computation of the vectorized file.

If ...

  • flag = FALSE, whatever the light model, the color of an object is its diffuse color.
  • flag = TRUE and the light model is PHONG, the color of an object depends on its orientation, its material (ambient, diffuse, ..., specular color) and the lights illuminating the object.

Definition at line 751 of file SoVectorizeAction.h.

◆ endPage()

virtual void SoVectorizeAction::endPage ( )
virtual

Ends a page.

Allows the user to generate multiple plots per page.

◆ getBackgroundColor()

virtual SbBool SoVectorizeAction::getBackgroundColor ( SbColor color) const
virtual

Returns the color of the background.

◆ getBorder()

virtual void SoVectorizeAction::getBorder ( float *  w,
SbColor color 
) const
virtual

Returns the color and the width of the border of the clipping limits.

If width = 0, there is no border.

◆ getClassTypeId()

static SoType SoVectorizeAction::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getColorPriority()

virtual SbBool SoVectorizeAction::getColorPriority ( void  ) const
virtual

Returns the color priority.

◆ getColorTranslationMethod()

virtual ColorTranslationMethod SoVectorizeAction::getColorTranslationMethod ( ) const
virtual

Returns the method for choosing the color of the drawing on the sheet of paper.

◆ getDrawingDimensions()

virtual SbVec2f SoVectorizeAction::getDrawingDimensions ( DimensionUnit  u = MM) const
virtual

Returns the dimensions of the drawing on the sheet of paper.

◆ getHLHSRMode()

HLHSRMode SoVectorizeAction::getHLHSRMode ( ) const
inline

Returns the Hidden Line and Hidden Surface Removal mode.

Definition at line 703 of file SoVectorizeAction.h.

◆ getHLHSRRasterCaching()

SbBool SoVectorizeAction::getHLHSRRasterCaching ( ) const
inline

Returns the raster caching flag.

See setHLHSRRasterCaching().

Definition at line 737 of file SoVectorizeAction.h.

◆ getHLHSRRasterQuality()

float SoVectorizeAction::getHLHSRRasterQuality ( ) const
inline

Returns the raster image quality value.

See setHLHSRRasterQuality().

Definition at line 720 of file SoVectorizeAction.h.

◆ getLineEndStyle()

virtual EndLineStyle SoVectorizeAction::getLineEndStyle ( ) const
virtual

Returns the style for line ends.

◆ getLineJoinsStyle()

virtual JoinLineStyle SoVectorizeAction::getLineJoinsStyle ( ) const
virtual

Returns the style for line joins.

◆ getLineOffset()

float SoVectorizeAction::getLineOffset ( ) const
inline

Returns line offset.

See setPolygonOffset.

Definition at line 809 of file SoVectorizeAction.h.

◆ getLinePatternSize()

virtual float SoVectorizeAction::getLinePatternSize ( DimensionUnit  u = MM) const
virtual

Returns the line pattern scale factor.

◆ getMarkerOffset()

float SoVectorizeAction::getMarkerOffset ( ) const
inline

Returns marker offset.

See setPolygonOffset.

Definition at line 814 of file SoVectorizeAction.h.

◆ getMiterLimit()

virtual float SoVectorizeAction::getMiterLimit ( ) const
virtual

Returns the miter limit.

◆ getNominalWidth()

virtual float SoVectorizeAction::getNominalWidth ( DimensionUnit  u = MM) const
virtual

Returns the nominal width.

◆ getOrientation()

virtual Orientation SoVectorizeAction::getOrientation ( ) const
virtual

Returns the orientation of the drawing on the sheet of paper.

◆ getPenDescription()

virtual void SoVectorizeAction::getPenDescription ( SbColor colors,
float *  widths,
DimensionUnit  u = MM 
) const
virtual

Returns the description of the color and the width of each pen.

◆ getPenNum()

virtual int SoVectorizeAction::getPenNum ( ) const
virtual

Returns the number of pens.

◆ getPixelImageSize()

virtual float SoVectorizeAction::getPixelImageSize ( DimensionUnit  u = MM) const
virtual

Returns the size of a pixel.

◆ getPolygonOffset()

float SoVectorizeAction::getPolygonOffset ( ) const
inline

Returns polygon offset.

See setPolygonOffset.

Definition at line 804 of file SoVectorizeAction.h.

◆ getShadeModel()

ShadeModel SoVectorizeAction::getShadeModel ( )
inline

Returns the shade model.

Definition at line 769 of file SoVectorizeAction.h.

◆ getStartPosition()

virtual SbVec2f SoVectorizeAction::getStartPosition ( DimensionUnit  u = MM) const
virtual

Returns the start position of the drawing on the sheet of paper.

◆ getTypeId()

virtual SoType SoVectorizeAction::getTypeId ( ) const
virtual

Returns the type identifier for this specific instance.

Implements SoTypedObject.

Reimplemented in SoVectorizeCGMAction, SoVectorizeGDIAction, SoVectorizeHPGLAction, and SoVectorizePSAction.

◆ getVectorOutput()

virtual SoVectorOutput * SoVectorizeAction::getVectorOutput ( ) const
virtual

Output access method.

Returns the SoOutput instance in action.

◆ isLightingEnabled()

SbBool SoVectorizeAction::isLightingEnabled ( ) const
inline

Returns TRUE if lighting is enabled.

Definition at line 757 of file SoVectorizeAction.h.

◆ setBackgroundColor() [1/2]

virtual void SoVectorizeAction::setBackgroundColor ( SbBool  bg)
inlinevirtual

Enables or disables the background and sets its color to white.

If bg = FALSE, there is no background.

Definition at line 509 of file SoVectorizeAction.h.

◆ setBackgroundColor() [2/2]

virtual void SoVectorizeAction::setBackgroundColor ( SbBool  bg,
SbColor  color 
)
virtual

Sets the color of the background.

If bg = FALSE, there is no background.

◆ setBorder() [1/2]

virtual void SoVectorizeAction::setBorder ( float  width)
inlinevirtual

Sets the width of the border of the clipping limits.

The color of the border is set to white. If width = 0, there is no border.

Definition at line 487 of file SoVectorizeAction.h.

◆ setBorder() [2/2]

virtual void SoVectorizeAction::setBorder ( float  width,
SbColor  color 
)
virtual

Sets the color and the width of the border of the clipping limits.

If width = 0, there is no border.

◆ setColorPriority()

virtual void SoVectorizeAction::setColorPriority ( SbBool  priority)
virtual

Sets the color priority flag.

If priority = TRUE, a pen will be chosen according to its color. Otherwise, it will be chosen according to its width.

◆ setColorTranslationMethod()

virtual void SoVectorizeAction::setColorTranslationMethod ( ColorTranslationMethod  method)
virtual

Sets the method for choosing the color of the drawing on the sheet of paper.

The default value is REVERSE_ONLY_BLACK_AND_WHITE. This method is applied for all colors.

◆ setDrawingDimensions() [1/2]

virtual void SoVectorizeAction::setDrawingDimensions ( const SbVec2f d,
DimensionUnit  u = MM 
)
virtual

Sets the dimensions of the drawing on the sheet of paper.

◆ setDrawingDimensions() [2/2]

virtual void SoVectorizeAction::setDrawingDimensions ( float  w,
float  h,
DimensionUnit  u = MM 
)
virtual

Sets the dimensions of the drawing on the sheet of paper.

◆ setHLHSRMode()

virtual void SoVectorizeAction::setHLHSRMode ( HLHSRMode  mode)
inlinevirtual

Sets the Hidden Line and Hidden Surface Removal mode.

Possible values of mode:

  • NO_HLHSR. Hidden lines and hidden surfaces are not removed.
  • HLHSR_SIMPLE_PAINTER. Simple painter's algorithm is used for HLHSR. Lines and surfaces are sorted by their maximum Z depth and displayed in order from front to back so lines and surfaces that are in the foreground are drawn last. If the scene contains interpenetrating primitives, there may be visibility errors in the resulting output.
  • HLHSR_PAINTER. Like the simple painter's algorithm, the primitives are depth sorted and displayed from front to back. In addition, some ambiguities where the polygons' Z extents overlap are resolved. Primitives that intersect other primitives are split and the new pieces sorted to provide more correct visual results. This mode is slower than the HLHSR_SIMPLE_PAINTER mode.
  • HLHSR_PAINTER_SURFACE_REMOVAL. This mode is the same as the previous, but a first pass removes surfaces that are completely hidden. The method used to remove hidden surfaces is a pixel rendering method, so for very small surfaces, some accuracy errors can occur. Because some surfaces are removed before the painter's algorithm is applied, this method can be significantly faster than the previous one. Generally output files are smaller than using the previous method.
  • HLHSR_RASTER. A raster image is generated and vectorized to determine visible primitives.
  • HIDDEN_LINES_REMOVAL. This mode removes all hidden lines. Whether the screen render style is FILLED or LINES, the output render style will be lines. This mode is very slow but gives correct results.

Definition at line 697 of file SoVectorizeAction.h.

◆ setHLHSRRasterCaching()

void SoVectorizeAction::setHLHSRRasterCaching ( SbBool  enable)
inline

Enables/disables the use of OpenGL display lists to generate the raster image with the HLHSR_RASTER algorithm.

Enabled by default.

Definition at line 730 of file SoVectorizeAction.h.

◆ setHLHSRRasterQuality()

void SoVectorizeAction::setHLHSRRasterQuality ( float  quality)
inline

Sets the quality of the raster image generated to vectorize visible primitives with the HLHSR_RASTER algorithm.

0 is the worst quality, 1 is the best.

Definition at line 713 of file SoVectorizeAction.h.

◆ setLineEndStyle()

virtual void SoVectorizeAction::setLineEndStyle ( EndLineStyle  style)
virtual

Sets the style for line ends.

◆ setLineJoinsStyle()

virtual void SoVectorizeAction::setLineJoinsStyle ( JoinLineStyle  style)
virtual

Sets the style for line joins.

◆ setLineOffset()

void SoVectorizeAction::setLineOffset ( float  offset)
inline

Sets line offset.

See setPolygonOffset.

Definition at line 794 of file SoVectorizeAction.h.

◆ setLinePatternSize()

virtual void SoVectorizeAction::setLinePatternSize ( float  w,
DimensionUnit  u = MM 
)
virtual

Sets the line pattern size, i.e., the association between printer pattern (16 printer "points") and the size of the line pattern on the hard copy output.

One printer pattern is equal to SoDrawStyleElement::linePatternScaleFactor * w units where units are millimeters, meters, inches. By default one printer pattern equals 5.6444 millimeters (16 * .3527 mm/point). Used for the following attributes: line pattern length.

◆ setMarkerOffset()

void SoVectorizeAction::setMarkerOffset ( float  offset)
inline

Sets marker offset.

See setPolygonOffset.

Definition at line 799 of file SoVectorizeAction.h.

◆ setMiterLimit()

virtual void SoVectorizeAction::setMiterLimit ( float  limit)
virtual

Sets the miter limit.

◆ setNominalWidth()

virtual void SoVectorizeAction::setNominalWidth ( float  w,
DimensionUnit  u = MM 
)
virtual

Sets the nominal width.

For sizes specified in "points" (equals 1/72 inch), specifies the physical size of the "point" on the hard copy output. One printer point is equal to w units where units are millimeters, meters, inches. By default 1 printer point equals approximately 0.3527 millimeters. Used for the following attributes: line width, point size, text size, and text space.

◆ setOrientation()

virtual void SoVectorizeAction::setOrientation ( Orientation  o)
virtual

Sets the orientation of the drawing on the sheet of paper.

◆ setPenDescription()

virtual void SoVectorizeAction::setPenDescription ( int  num_pens,
const SbColor colors = 0,
const float *  widths = 0,
DimensionUnit  u = MM 
)
virtual

Sets the description of the color and the width of each pen.

The function is useful for pen plotters, but can also be used for raster plotters. For raster plotters, the drawing color is the color of the chosen pen. This is useful to force the plotter to use a set of colors. If the width parameter is not specified, a 0.35 mm value is assumed.

◆ setPixelImageSize()

virtual void SoVectorizeAction::setPixelImageSize ( float  w,
DimensionUnit  u = MM 
)
virtual

Sets the size of a pixel for image primitives.

For sizes specified in pixels, specifies the physical size of a "pixel" on the hard copy output. One pixel is equal to w units
where units are millimeters, meters, inches. By default 1 pixel equals 0.35 millimeters. Used for the following attributes: images.

◆ setPolygonOffset()

void SoVectorizeAction::setPolygonOffset ( float  offset)
inline

Method to set the Z offset to be applied to polygons in normalized device coordinates (-1 to 1 space).

This is useful for separating coplanar lines and polygons. Similar to SoPolygonOffset, a positive offset value moves the primitives away from the camera and a negative value pulls them closer. There are separate methods for lines (setLineOffset) and markers (setMarkerOffset). The default value for the offset methods is zero.

Generally applications should avoid using lines and polygons that are exactly coplanar. Correct results cannot be guaranteed for normal or vectorized rendering. SoPolygonOffset can significantly reduce the problem for normal rendering, but has no effect on vectorized rendering. However a Z offset of approximately 0.01 applied to polygons will usually improve the appearance of vectorized coplanar primitives. Applying too large an offset may cause the converse visual artifact where lines that should be hidden become visible.

Definition at line 789 of file SoVectorizeAction.h.

◆ setShadeModel()

void SoVectorizeAction::setShadeModel ( ShadeModel  model)
inline

Selects FLAT or SMOOTH shading.

Definition at line 763 of file SoVectorizeAction.h.

◆ setStartPosition() [1/2]

virtual void SoVectorizeAction::setStartPosition ( const SbVec2f p,
DimensionUnit  u = MM 
)
virtual

Sets the start position of the drawing on the sheet of paper.

◆ setStartPosition() [2/2]

virtual void SoVectorizeAction::setStartPosition ( float  x,
float  y,
DimensionUnit  u = MM 
)
virtual

Sets the start position of the drawing on the sheet of paper.

Friends And Related Symbol Documentation

◆ SoHLHSRImageVectorizer

friend class SoHLHSRImageVectorizer
friend

Definition at line 1189 of file SoVectorizeAction.h.

◆ SoHLHSRVectorize

friend class SoHLHSRVectorize
friend

Definition at line 1188 of file SoVectorizeAction.h.


The documentation for this class was generated from the following file: