SoVectorizePSAction(3)
π¦ SoVectorizePSAction(3) β Library Functions Manual π¦
okay so bestie, welcome to the Library Functions Manual entry for SoVectorizePSAction(3) π this is the page you want when you're like "I have a scene graph and I want it to come out the other side as a Postscript file." no cap.
π NAME π
SoVectorizePSAction β the class that's literally built for rendering to a Postscript file β¨
πΈ SYNOPSIS πΈ
#include <HardCopy/SoVectorizePSAction.h>
Inherits SoVectorizeAction. yes she has a whole ancestry, we'll get to all of it, every single inherited function, don't worry π«Ά
π«Ά Public Member Functions π«Ά
virtual SoType getTypeId (void) constβ the virtual type-id getter, type-checking icon πSoVectorizePSAction (void)β constructor, takes literally nothing, she's low-maintenancevirtual ~SoVectorizePSAction ()β virtual destructor, cleans up her own messvoid setDefault2DFont (const SbString &fontname)β set the default 2D font by nameconst SbString & getDefault2DFont (void) constβ hand back that font name you setvoid setGouraudThreshold (const double eps)β set the Gouraud threshold,epsis adoubleSoPSVectorOutput * getOutput (void) constβ give me theSoPSVectorOutputpointer plsSoPSVectorOutput * getPSOutput (void) constβ same energy, Postscript-flavored name π
π Public Member Functions inherited from SoVectorizeAction π
SoVectorizeAction (void)β grandmama constructorvirtual ~SoVectorizeAction ()β grandmama virtual destructorSoVectorOutput * getOutput (void) constβ returns anSoVectorOutput *virtual void apply (SoNode *node)β apply the action to a nodevirtual void apply (SoPath *path)β apply it to a pathvirtual void apply (const SoPathList &pathlist, SbBool obeysrules=FALSE)β apply to a whole path list,obeysrulesdefaults toFALSEvoid beginStandardPage (const PageSize &pagesize, const float border=10.0f)β kick off a standard page,borderdefaults to10.0fvirtual void beginPage (const SbVec2f &startpagepos, const SbVec2f &pagesize, DimensionUnit u=MM)β start a page, units default toMMvirtual void endPage (void)β done with the page, byevirtual void calibrate (const SbViewportRegion &vp)β calibrate against a viewport regionvirtual void beginViewport (const SbVec2f &startpos=SbVec2f(-1.0f, 1.0f), const SbVec2f &size=SbVec2f(-1.0f, -1.0f), DimensionUnit u=MM)β open a viewport; defaults areSbVec2f(-1.0f, 1.0f)for startpos,SbVec2f(-1.0f, -1.0f)for size,MMfor unitsvirtual void endViewport (void)β close that viewportvirtual void setOrientation (Orientation o)β set the orientationvirtual Orientation getOrientation (void) constβ get the orientationvirtual void setBackgroundColor (SbBool bg, const SbColor &col=SbColor(0.0f, 0.0f, 0.0f))β background on/off plus a color, default blackSbColor(0.0f, 0.0f, 0.0f)virtual SbBool getBackgroundColor (SbColor &col) constβ reads the background color out intocolvirtual void setNominalWidth (float w, DimensionUnit u=MM)β set nominal width, units defaultMMvirtual float getNominalWidth (DimensionUnit u=MM) constβ get nominal width, units defaultMMvirtual void setPixelImageSize (float w, DimensionUnit u=MM)β set pixel image size, units defaultMMvirtual float getPixelImageSize (DimensionUnit u=MM) constβ get pixel image size, units defaultMMvirtual void setPointStyle (const PointStyle &style)β set the point stylevirtual PointStyle getPointStyle (void) constβ get the point styleconst SbVec2f & getPageStartpos (void) constβ where the page startsconst SbVec2f & getPageSize (void) constβ how big the page isvirtual void setDrawingDimensions (const SbVec2f &d, DimensionUnit u=MM)β set drawing dimensions from a vector, units defaultMMvirtual void setDrawingDimensions (float w, float h, DimensionUnit u=MM)β same but with plainwandhfloats, units defaultMMvirtual SbVec2f getDrawingDimensions (DimensionUnit u=MM) constβ get the drawing dimensions, units defaultMMvirtual void setStartPosition (const SbVec2f &p, DimensionUnit u=MM)β set start position from a vector, units defaultMMvirtual void setStartPosition (float x, float y, DimensionUnit u=MM)β set start position fromx/y, units defaultMMvirtual SbVec2f getStartPosition (DimensionUnit u=MM) constβ get the start position, units defaultMMvirtual void setColorTranslationMethod (ColorTranslationMethod method)β choose how colors get translatedvirtual ColorTranslationMethod getColorTranslationMethod (void) constβ read that method backvirtual void setLineEndStyle (EndLineStyle style)β line end style, set itvirtual EndLineStyle getLineEndStyle (void) constβ line end style, get itvirtual void setLineJoinsStyle (JoinLineStyle style)β line join style, set itvirtual JoinLineStyle getLineJoinsStyle (void) constβ line join style, get itvirtual void setHLHSRMode (HLHSRMode mode)β set the HLHSR modeHLHSRMode getHLHSRMode (void) constβ get the HLHSR modevirtual void setBorder (float width)β border width onlyvirtual void setBorder (float width, SbColor color)β border width plus a colorvirtual void setMiterLimit (float limit)β set the miter limitvirtual float getMiterLimit (void) constβ get the miter limitvirtual void setPenDescription (int num_pens, const SbColor *colors=0, const float *widths=0, DimensionUnit u=MM)β describe your pens:num_pens, optionalcolors(defaults0), optionalwidths(defaults0), units defaultMMvirtual void getPenDescription (SbColor *colors, float *widths, DimensionUnit u=MM) constβ read the pen description back out intocolorsandwidths, units defaultMMvirtual int getPenNum (void) constβ how many pens we talkingvirtual void setColorPriority (SbBool priority)β set color priorityvirtual SbBool getColorPriority (void) constβ get color priorityvirtual void enableLighting (SbBool flag)β lighting on/offSbBool isLightingEnabled (void) constβ is the lighting on tho
π§ Public Member Functions inherited from SoCallbackAction π§
SoCallbackAction (void)β constructor, no argsSoCallbackAction (const SbViewportRegion &vp)β constructor, but with a viewport regionvirtual ~SoCallbackAction (void)β virtual destructorvoid setViewportRegion (const SbViewportRegion &vp)β set the viewport regionvoid addPreCallback (const SoType type, SoCallbackActionCB *cb, void *userdata)β register a pre callback for a type, withcbanduserdatavoid addPostCallback (const SoType type, SoCallbackActionCB *cb, void *userdata)β same but postvoid addPreTailCallback (SoCallbackActionCB *cb, void *userdata)β pre-tail callback,cb+userdatavoid addPostTailCallback (SoCallbackActionCB *cb, void *userdata)β post-tail callback,cb+userdatavoid addTriangleCallback (const SoType type, SoTriangleCB *cb, void *userdata)β triangle callback time πΊvoid addLineSegmentCallback (const SoType type, SoLineSegmentCB *cb, void *userdata)β line segment callback timevoid addPointCallback (const SoType type, SoPointCB *cb, void *userdata)β point callback timeSoDecimationTypeElement::Type getDecimationType (void) constβ the decimation type getterfloat getDecimationPercentage (void) constβ decimation percentage, as a floatfloat getComplexity (void) constβ complexity, as a floatSoComplexity::Type getComplexityType (void) constβ complexity typeint32_t getNumCoordinates (void) constβ count the coordinatesconst SbVec3f & getCoordinate3 (const int index) constβ 3D coordinate atindexconst SbVec4f & getCoordinate4 (const int index) constβ 4D coordinate atindexSoDrawStyle::Style getDrawStyle (void) constβ the draw styleunsigned short getLinePattern (void) constβ line pattern,unsigned shortfloat getLineWidth (void) constβ line width,floatfloat getPointSize (void) constβ point size,floatconst SbName & getFontName (void) constβ font name, as anSbNamefloat getFontSize (void) constβ font size,floatSoLightModel::Model getLightModel (void) constβ the light modelconst SbVec3f & getLightAttenuation (void) constβ light attenuation vectorvoid getMaterial (SbColor &ambient, SbColor &diffuse, SbColor &specular, SbColor &emission, float &shininess, float &transparency, const int index=0) constβ dump the whole material intoambient,diffuse,specular,emission,shininess,transparency, withindexdefaulting to0πSoMaterialBinding::Binding getMaterialBinding (void) constβ material bindinguint32_t getNumNormals (void) constβ count the normalsconst SbVec3f & getNormal (const int index) constβ normal atindexSoNormalBinding::Binding getNormalBinding (void) constβ normal bindingint32_t getNumProfileCoordinates (void) constβ how many profile coordinatesconst SbVec2f & getProfileCoordinate2 (const int index) constβ 2D profile coordinate atindexconst SbVec3f & getProfileCoordinate3 (const int index) constβ 3D profile coordinate atindexconst SoNodeList & getProfile (void) constβ the profile, as anSoNodeListSoShapeHints::VertexOrdering getVertexOrdering (void) constβ vertex orderingSoShapeHints::ShapeType getShapeType (void) constβ shape typeSoShapeHints::FaceType getFaceType (void) constβ face typefloat getCreaseAngle (void) constβ crease angle,floatint32_t getNumTextureCoordinates (void) constβ texture coordinate countconst SbVec2f & getTextureCoordinate2 (const int index) constβ 2D texture coordinate atindexconst SbVec3f & getTextureCoordinate3 (const int index) constβ 3D texture coordinate atindexconst SbVec4f & getTextureCoordinate4 (const int index) constβ 4D texture coordinate atindexSoTextureCoordinateBinding::Binding getTextureCoordinateBinding (void) constβ texture coordinate bindingconst SbColor & getTextureBlendColor (void) constβ texture blend colorconst unsigned char * getTextureImage (SbVec2s &size, int &numcomps) constβ texture image, 2D size version, fillssizeandnumcompsconst unsigned char * getTextureImage (SbVec3s &size, int &numcomps) constβ texture image, 3D size version, fillssizeandnumcompsconst SbMatrix & getTextureMatrix (void) constβ texture matrixSoTexture2::Model getTextureModel (void) constβ texture modelSoTexture2::Wrap getTextureWrapS (void) constβ wrap SSoTexture2::Wrap getTextureWrapT (void) constβ wrap TSoTexture2::Wrap getTextureWrapR (void) constβ wrap Rconst SbMatrix & getModelMatrix (void) constβ model matrixSoUnits::Units getUnits (void) constβ unitsfloat getFocalDistance (void) constβ focal distance,floatconst SbMatrix & getProjectionMatrix (void) constβ projection matrixconst SbMatrix & getViewingMatrix (void) constβ viewing matrixconst SbViewVolume & getViewVolume (void) constβ view volumeconst SbViewportRegion & getViewportRegion (void) constβ viewport regionSoPickStyle::Style getPickStyle (void) constβ pick styleint32_t getSwitch (void) constβ the switch valueResponse getCurrentResponse (void) constβ current responsevoid invokePreCallbacks (const SoNode *const node)β fire the pre callbacks fornodevoid invokePostCallbacks (const SoNode *const node)β fire the post callbacks fornodevoid invokeTriangleCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2, const SoPrimitiveVertex *const v3)β fire the triangle callbacks withshapeand the three verticesv1,v2,v3void invokeLineSegmentCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2)β fire the line segment callbacks withshape,v1,v2void invokePointCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v)β fire the point callbacks withshapeandvSbBool shouldGeneratePrimitives (const SoShape *shape) constβ should we generate primitives for thisshape?virtual SoNode * getCurPathTail (void)β the tail of the current pathvoid setCurrentNode (SoNode *const node)β set the current nodevoid setCallbackAll (SbBool callbackall)β set thecallbackallflagSbBool isCallbackAll (void) constβ iscallbackallon?
β Public Member Functions inherited from SoAction β
virtual ~SoAction (void)β virtual destructor, top of the family treevirtual SbBool isOfType (SoType type) constβ is it thistype?void apply (SoAction *beingApplied)β apply with another actionvirtual void invalidateState (void)β invalidate the stateAppliedCode getWhatAppliedTo (void) constβ what did it apply to?SoNode * getNodeAppliedTo (void) constβ the node it applied toSoPath * getPathAppliedTo (void) constβ the path it applied toconst SoPathList * getPathListAppliedTo (void) constβ the path list it applied toconst SoPathList * getOriginalPathListAppliedTo (void) constβ the original path list it applied toSbBool isLastPathListAppliedTo (void) constβ was it the last path list?PathCode getPathCode (int &numindices, const int *&indices)β path code, fillsnumindicesandindicesvoid traverse (SoNode *const node)β traversenodeSbBool hasTerminated (void) constβ has it terminated?const SoPath * getCurPath (void)β the current pathSoState * getState (void) constβ the statePathCode getCurPathCode (void) constβ the current path codevoid usePathCode (int &numindices, const int *&indices)β use a path code withnumindicesandindicesvoid pushCurPath (const int childindex, SoNode *node=NULL)β push current path withchildindex,nodedefaults toNULLvoid popCurPath (const PathCode prevpathcode)β pop with the previous path codevoid pushCurPath (void)β push current path, no argsvoid popPushCurPath (const int childindex, SoNode *node=NULL)β pop then push,childindexandnode(defaultNULL)void popCurPath (void)β pop current path, no argsvoid switchToPathTraversal (SoPath *path)β switch to path traversalvoid switchToNodeTraversal (SoNode *node)β switch to node traversal
π Static Public Member Functions π
static SoType getClassTypeId (void)β class type id, static flavorstatic void addMethod (const SoType type, SoActionMethod method)β register a method for atypestatic void enableElement (const SoType type, const int stackindex)β enable an element atstackindexstatic void initClass (void)β init the class, iconic
π Static Public Member Functions inherited from SoVectorizeAction π
static SoType getClassTypeId (void)β class type idstatic void addMethod (const SoType type, SoActionMethod method)β add a method fortypestatic void enableElement (const SoType type, const int stackindex)β enable element atstackindexstatic void initClass (void)β init the class
π Static Public Member Functions inherited from SoCallbackAction π
static SoType getClassTypeId (void)β class type idstatic void addMethod (const SoType type, SoActionMethod method)β add a method fortypestatic void enableElement (const SoType type, const int stackindex)β enable element atstackindexstatic void initClass (void)β init the class
π Static Public Member Functions inherited from SoAction π
static void initClass (void)β init the classstatic void initClasses (void)β init all the classes, plural, she's thoroughstatic SoType getClassTypeId (void)β class type idstatic void nullAction (SoAction *action, SoNode *node)β the null action, does exactly what it says on the tin
π Protected Member Functions π
virtual const SoEnabledElementsList & getEnabledElements (void) constβ the enabled elements listvirtual void printHeader (void) constβ print the headervirtual void printFooter (void) constβ print the footervirtual void printBackground (void) constβ print the backgroundvirtual void printItem (const SoVectorizeItem *item) constβ print a singleitemvirtual void printViewport (void) constβ print the viewport
π Protected Member Functions inherited from SoVectorizeAction π
void setOutput (SoVectorOutput *output)β set the output objectvirtual float pixelsToUnits (const int pixels)β convertpixelsto units, returns afloatSbVec2f getRotatedViewportStartpos (void) constβ rotated viewport start positionSbVec2f getRotatedViewportSize (void) constβ rotated viewport sizeconst SbBSPTree & getBSPTree (void) constβ the BSP tree
π Protected Member Functions inherited from SoCallbackAction π
virtual void beginTraversal (SoNode *node)β begin the traversal atnode
π Protected Member Functions inherited from SoAction π
SoAction (void)β protected constructor, you don't get to call this one directly bestievirtual void endTraversal (SoNode *node)β end the traversal atnodevoid setTerminated (const SbBool flag)β set the terminatedflagvirtual SbBool shouldCompactPathList (void) constβ should the path list get compacted?
and that's just part one of this absolute unit of a manpage, keep scrolling bestie, there's more πβ¨
πΈ Static Protected Member Functions πΈ
Bestie, these are the static protected function besties that live in the shadows. They're giving "for internal use only" energy, but we still list them because every detail matters, periodt.
static SoEnabledElementsList * getClassEnabledElements (void)static SoActionMethodList * getClassActionMethods (void)
π« Static Protected Member Functions inherited from SoVectorizeAction
Same duo, inherited from SoVectorizeAction:
static SoEnabledElementsList * getClassEnabledElements (void)static SoActionMethodList * getClassActionMethods (void)
π« Static Protected Member Functions inherited from SoCallbackAction
And again from SoCallbackAction:
static SoEnabledElementsList * getClassEnabledElements (void)static SoActionMethodList * getClassActionMethods (void)
π« Static Protected Member Functions inherited from SoAction
And one more time from SoAction:
static SoEnabledElementsList * getClassEnabledElements (void)static SoActionMethodList * getClassActionMethods (void)
π Additional Inherited Members π
π Public Types inherited from SoVectorizeAction
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 }
π 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 }
π Protected Attributes inherited from SoAction
SoState * stateSoActionMethodList * traversalMethods
π Detailed Description π
The SoVectorizePSAction class is used for rendering to a Postscript file. It's giving vector-to-PostScript realness.
Since: Coin 2.1
TGS provides HardCopy support as a separate extension for TGS Inventor.
π οΈ Constructor & Destructor Documentation π οΈ
SoVectorizePSAction::SoVectorizePSAction (void )
Default constructor. No args, just constructor things. β¨
SoVectorizePSAction::~SoVectorizePSAction () [virtual]
Default destructor. Say bye, bestie. π
β¨ Member Function Documentation β¨
SoType SoVectorizePSAction::getTypeId (void ) const [virtual]
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:
void bar(SoAction * action)
{
if (action->getTypeId() == SoGLRenderAction::getClassTypeId()) {
// safe downward cast, know the type
SoGLRenderAction * glrender = (SoGLRenderAction *)action;
}
return; // ignore if not renderaction
}
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 SoVectorizeAction.
void SoVectorizePSAction::addMethod (const SoType type, SoActionMethod method) [static]
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
void SoVectorizePSAction::enableElement (const SoType type, const int stackindex) [static]
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
const SoEnabledElementsList & SoVectorizePSAction::getEnabledElements (void ) const [protected], [virtual]
Returns a list of the elements used by action instances of this class upon traversal operations.
Reimplemented from SoVectorizeAction.
void SoVectorizePSAction::setDefault2DFont (const SbString & fontname)
Sets the default font name. This font will be used for rendering Text2-nodes which have no Font-nodes preceding them. The default value is "Courier".
const SbString & SoVectorizePSAction::getDefault2DFont (void ) const
Returns the default font name.
See also setDefault2DFont().
void SoVectorizePSAction::setGouraudThreshold (const double eps)
Sets the Gouraud shading threshold. A threshold of 0.0 will disable Gouraud shading. A smaller value will yield more accurate Gouraud shading. Default is 0.1.
Since the postscript language has no support for Gouraud shaded triangles, each triangle will be split into subtriangles approximately of size eps postscript units. One postscript unit is approximately 1/72 inch.
SoPSVectorOutput * SoVectorizePSAction::getOutput (void ) const
Returns the SoPSVectorOutput used by this instance.
SoPSVectorOutput * SoVectorizePSAction::getPSOutput (void ) const
Returns the SoPSVectorOutput used by this instance. Provided for API compatibility with TGS HardCopy support.
void SoVectorizePSAction::printHeader (void ) const [protected], [virtual]
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
Implements SoVectorizeAction.
void SoVectorizePSAction::printFooter (void ) const [protected], [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 file footer data.
Reimplemented from SoVectorizeAction.
void SoVectorizePSAction::printBackground (void ) const [protected], [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 background data.
Reimplemented from SoVectorizeAction.
void SoVectorizePSAction::printItem (const SoVectorizeItem * item) const [protected], [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.
Implements SoVectorizeAction.
void SoVectorizePSAction::printViewport (void ) const [protected], [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 set up the current page viewport.
Reimplemented from SoVectorizeAction.
π Author π
Generated automatically by Doxygen for Coin from the source code.
Okay bestie, that's the whole page! This lil manual came from Coin, version 3.1.3, and it's the SoVectorizePSAction(3) page. The footer date didn't show up in this copy, but the source and version are right there. Stay iconic, and may your PostScript always render. πβ¨
π¦ where this page comes from
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms