24#ifndef __SO_VECTORIZE_ACTION_
25#define __SO_VECTORIZE_ACTION_
43#define POINT_TO_MM 0.3527777778F
54class SoHLHSRVectorize;
631 const float *widths = 0,
698 { m_HLHSRMode = mode; }
704 {
return m_HLHSRMode; }
714 { m_HLHSRRasterQuality = quality ; }
721 {
return m_HLHSRRasterQuality ; }
731 { m_HLHSRRasterCaching =
enable ; }
738 {
return m_HLHSRRasterCaching ; }
752 { m_isLightingEnabled = flag; }
758 {
return m_isLightingEnabled; }
764 { m_shadeModel = model ; }
770 {
return m_shadeModel ; }
790 { m_polyOffset = offset; }
795 { m_lineOffset = offset; }
800 { m_markOffset = offset; }
805 {
return m_polyOffset; }
810 {
return m_lineOffset; }
815 {
return m_markOffset; }
828 void setHLHSRRasterTileSize(
unsigned short tileSize)
829 { m_HLHSRRasterTileSize = tileSize ; }
836 unsigned short getHLHSRRasterTileSize()
const
837 {
return m_HLHSRRasterTileSize ; }
843 static void initClass();
844 static void exitClass();
854 virtual void beginTraversal();
855 virtual void beginTraversal(
SoNode *)
856 { beginTraversal(); }
857 virtual void endTraversal();
858 virtual void endTraversal(
SoNode *)
861 virtual void writeHeader() = 0;
862 virtual void writeFooter() = 0;
864 virtual void setHardwareClip() = 0;
867 virtual SbBox2f getClippingLimits()
const;
870 virtual void printPolyMark(
const SbVec4f *points,
876 virtual void printPolyMark(
const SbVec4f *points,
881 virtual void printImage(
const SbVec4f &origin,
882 const unsigned char *imagePixels,
890 virtual void printPolyLine(
const SbVec4f *points,
896 int linePatternScaleFactor = 1);
897 virtual void printPolygon(
const SbVec4f *points,
903 const unsigned char *pattern);
904 virtual void printText2(
const SbVec4f point,
913 virtual void printBorder() = 0;
914 virtual void printBackground() = 0;
917 virtual void penAssignment(
SbColor color,
float width,
918 int *ret_ind,
float *ret_width);
920 float getViewportWidth()
const;
921 float getViewportHeight()
const;
928 float getShiftX()
const;
929 float getShiftY()
const;
930 float getWidth()
const;
931 float getHeight()
const;
934 float getOffsetX()
const;
935 float getOffsetY()
const;
943 float m_border_width;
949 float m_nominal_width;
951 float m_linePatternSize;
953 float m_pixelImageSize;
966 SbBool m_isViewportRegionExist;
975 SbBool m_isMultiPlotPerPage;
1056 {
return m_HLHSRVectorize; }
1060 void projectPoints(
SbVec4f *points,
int n);
1064 void setProjectionSource(
const SbBox2f &projSrc) ;
1065 void setDefaultProjectionSource() ;
1075 SbBool &isFullyTransparent);
1079 SbBool &isFullyTransparent);
1080 void computeLightList(
SoState *state);
1081 void deleteLightsList();
1086 float getNormalizedWidth();
1087 float getNormalizedHeight();
1089 float fontSize,
float &angle);
1094 { m_viewportRegion = vp ; }
1101 static void drawTriangleCB(
void *
object,
1106 static void drawLineSegmentCB(
void *
object,
1110 static void drawPointCB(
void *
object,
1139 void addDelayedPath(
SoPath *path);
1140 void renderDelayedPaths();
1144 float m_shiftX, m_shiftY;
1147 float m_width, m_height;
1162 float m_HLHSRRasterQuality ;
1163 SbBool m_HLHSRRasterCaching ;
1164 unsigned short m_HLHSRRasterTileSize ;
1165 SbBool m_isAnnoText3Drawn;
1170 SbBool m_isLightingEnabled;
#define TRUE
Possible value of SbBool.
#define FALSE
Possible value of SbBool.
const SbColor & getColor()
#define SO_ACTION_HEADER_WITH_DEF(className)
List of generic (void *) pointers.
Class for smart character strings.
Class for representing a viewport.
Abstract base class for all actions.
Performs a generic traversal of a scene graph or path.
Response
Possible responses from a pre or post callback.
VertAlignment
Vertical alignment.
HorAlignment
Horizontal alignment.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Extension of Poi...
Abstract base class for all database nodes.
Maintains a list of pointers to nodes.
Path that points to a list of hierarchical nodes.
Maintains a list of pointers to paths.
Represents a vertex of a generated primitive.
<a href="IconLegend.html"><img src="extHC.gif" alt="HardCopy" border="0"></a> Abstract class used to...
virtual FILE * getFilePointer()
Returns the file pointer in use.
virtual void setFilePointer(FILE *newFP)
Sets file pointer to write to.
virtual ~SoVectorOutput()
Destructor.
virtual SbBool openFile(const SbString &file_name)
Opens named file (sets file pointer to result) .
SoVectorOutput()
Constructor.
virtual SoNONUNICODE SbBool openFile(const char *file_name)
Opens named file (sets file pointer to result) .
virtual void closeFile()
Closes the current file opened with openFile().
<a href="IconLegend.html"><img src="extHC.gif" alt="HardCopy" border="0"></a> Abstract class for vec...
float getMarkerOffset() const
Returns marker offset.
virtual void setBorder(float width)
Sets the width of the border of the clipping limits.
virtual JoinLineStyle getLineJoinsStyle() const
Returns the style for line joins.
virtual void setColorTranslationMethod(ColorTranslationMethod method)
Sets the method for choosing the color of the drawing on the sheet of paper.
float getPolygonOffset() const
Returns polygon offset.
virtual void getPenDescription(SbColor *colors, float *widths, DimensionUnit u=MM) const
Returns the description of the color and the width of each pen.
void setHLHSRRasterCaching(SbBool enable)
Enables/disables the use of OpenGL display lists to generate the raster image with the HLHSR_RASTER a...
virtual void setStartPosition(float x, float y, DimensionUnit u=MM)
Sets the start position of the drawing on the sheet of paper.
virtual float getMiterLimit() const
Returns the miter limit.
virtual void setNominalWidth(float w, DimensionUnit u=MM)
Sets the nominal width.
void setLineOffset(float offset)
Sets line offset.
virtual void endPage()
Ends a page.
virtual void setLineEndStyle(EndLineStyle style)
Sets the style for line ends.
virtual void setBackgroundColor(SbBool bg, SbColor color)
Sets the color of the background.
virtual void apply(SoNode *node)
Initiates an action on the graph specified by a node.
ShadeModel getShadeModel()
Returns the shade model.
friend class SoHLHSRImageVectorizer
virtual float getNominalWidth(DimensionUnit u=MM) const
Returns the nominal width.
virtual void setHLHSRMode(HLHSRMode mode)
Sets the Hidden Line and Hidden Surface Removal mode.
virtual void setDrawingDimensions(float w, float h, DimensionUnit u=MM)
Sets the dimensions 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 setDrawingDimensions(const SbVec2f &d, DimensionUnit u=MM)
Sets the dimensions of the drawing on the sheet of paper.
ShadeModel
Shading models.
@ SMOOTH
Smooth shading model.
@ FLAT
Flat shading model.
virtual void getBorder(float *w, SbColor *color) const
Returns the color and the width of the border of the clipping limits.
HLHSRMode getHLHSRMode() const
Returns the Hidden Line and Hidden Surface Removal mode.
virtual void apply(const SoPathList &pathList, SbBool obeysRules=FALSE)
Initiates an action on the graph specified by list of paths.
HLHSRMode
HLHSR (Hidden Line and Hidden Surface Removal) mode.
@ HLHSR_PAINTER_SURFACE_REMOVAL
Surfaces that are completely hidden are removed prior to application of the painter's algorithm.
@ HIDDEN_LINES_REMOVAL
The output is rendered with lines (regardless of the on-screen render style) and hidden lines are rem...
@ NO_HLHSR
No HLHSR is done.
@ HLHSR_PAINTER
Painter's algorithm is used.
@ HLHSR_RASTER
A raster-based algorithm is used.
@ HLHSR_SIMPLE_PAINTER
Simple painter's algorithm is used.
float getHLHSRRasterQuality() const
Returns the raster image quality value.
virtual float getLinePatternSize(DimensionUnit u=MM) const
Returns the line pattern scale factor.
virtual void beginPage(const SbVec2f &startPagePosition, const SbVec2f &pageSize, DimensionUnit u=MM)
Begin a new page.
virtual void enableLighting(SbBool flag)
Allows the user to enable/disable the taking into account of lights in the scene graph during the com...
virtual SbBool getColorPriority(void) const
Returns the color priority.
SbBool getHLHSRRasterCaching() const
Returns the raster caching flag.
friend class SoHLHSRVectorize
virtual Orientation getOrientation() const
Returns the orientation of the drawing on the sheet of paper.
virtual void setMiterLimit(float limit)
Sets the miter limit.
virtual void setColorPriority(SbBool priority)
Sets the color priority flag.
virtual void setLinePatternSize(float w, DimensionUnit u=MM)
Sets the line pattern size, i.e., the association between printer pattern (16 printer "points") and t...
EndLineStyle
End line style.
virtual int getPenNum() const
Returns the number of pens.
virtual ~SoVectorizeAction()
SbBool isLightingEnabled() const
Returns TRUE if lighting is enabled.
virtual void setPixelImageSize(float w, DimensionUnit u=MM)
Sets the size of a pixel for image primitives.
virtual void setLineJoinsStyle(JoinLineStyle style)
Sets the style for line joins.
JoinLineStyle
Join line style.
@ TRIANGULAR_JOIN
The line join style is triangular.
@ NO_JOIN
There is no line join style.
@ ROUNDED_JOIN
The line join style is rounded.
@ MITERED_BEVELED_JOIN
The line join style is mitered and beveled.
@ MITERED_JOIN
The line join style is mitered.
@ BEVELED_JOIN
The line join style is beveled.
virtual SoVectorOutput * getVectorOutput() const
Output access method.
virtual void setBorder(float width, SbColor color)
Sets the color and the width of the border of the clipping limits.
virtual SbBool getBackgroundColor(SbColor *color) const
Returns the color of the background.
DimensionUnit
Dimension unit.
virtual void setBackgroundColor(SbBool bg)
Enables or disables the background and sets its color to white.
virtual SbVec2f getDrawingDimensions(DimensionUnit u=MM) const
Returns the dimensions of the drawing on the sheet of paper.
void setMarkerOffset(float offset)
Sets marker offset.
virtual EndLineStyle getLineEndStyle() const
Returns the style for line ends.
ColorTranslationMethod
Color translation methods.
@ REVERSE_ONLY_BLACK_AND_WHITE
Only black and white are reversed (default).
@ REVERSE
All colors are reversed.
@ AS_IS
Colors stay as is.
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 setStartPosition(const SbVec2f &p, DimensionUnit u=MM)
Sets the start position of the drawing on the sheet of paper.
virtual float getPixelImageSize(DimensionUnit u=MM) const
Returns the size of a pixel.
virtual SbVec2f getStartPosition(DimensionUnit u=MM) const
Returns the start position of the drawing on the sheet of paper.
float getLineOffset() const
Returns line offset.
void setShadeModel(ShadeModel model)
Selects FLAT or SMOOTH shading.
void setHLHSRRasterQuality(float quality)
Sets the quality of the raster image generated to vectorize visible primitives with the HLHSR_RASTER ...
virtual void apply(SoPath *path)
Initiates an action on the graph specified by a path.
void setPolygonOffset(float offset)
Method to set the Z offset to be applied to polygons in normalized device coordinates (-1 to 1 space)...
Orientation
Orientation type.
@ PORTRAIT
The orientation is PORTRAIT.
@ LANDSCAPE
The orientation is LANDSCAPE.
virtual void setOrientation(Orientation o)
Sets the orientation of the drawing on the sheet of paper.