CMS 3D CMS Logo

IgSbGraphicContext.h

Go to the documentation of this file.
00001 #ifndef IG_OPEN_INVENTOR_IG_SB_GRAPHIC_CONTEXT_H
00002 # define IG_OPEN_INVENTOR_IG_SB_GRAPHIC_CONTEXT_H
00003 
00004 # ifndef IGUANA_OBSOLETE
00005 #  error This code is probably broken.  If you use it, please let us know.
00006 #  error If it is needed, it should be cleaned up and use IgSoShapeKit.
00007 #  error Do not release it in CMS IGUANA before it is rewritten.
00008 # endif
00009 
00010 //<<<<<< INCLUDES                                                       >>>>>>
00011 
00012 # include "Iguana/Inventor/interface/config.h"
00013 # include <Inventor/SbLinear.h>
00014 # include <Inventor/SbString.h>
00015  
00016 //<<<<<< PUBLIC DEFINES                                                 >>>>>>
00017 //<<<<<< PUBLIC CONSTANTS                                               >>>>>>
00018 //<<<<<< PUBLIC TYPES                                                   >>>>>>
00019 //<<<<<< PUBLIC VARIABLES                                               >>>>>>
00020 //<<<<<< PUBLIC FUNCTIONS                                               >>>>>>
00021 //<<<<<< CLASS DECLARATIONS                                             >>>>>>
00022 
00023 typedef enum
00024 {
00025     SbPrimitivePoints,
00026     SbPrimitiveLineStrip,
00027     SbPrimitiveLineLoop,
00028     SbPrimitiveLines,
00029     SbPrimitivePolygon
00030 } SbPrimitiveType;
00031 
00032 typedef enum
00033 {
00034     SbLineSolid = 0,
00035     SbLineDashed,
00036     SbLineDotted,
00037     SbLineDashDotted
00038 } SbLineStyle; 
00039 
00040 typedef enum
00041 {
00042     SbMarkerDot = 0,
00043     SbMarkerPlus,
00044     SbMarkerAsterisk,
00045     SbMarkerCircle,
00046     SbMarkerCross,
00047     SbMarkerStar,
00048     SbMarkerTriangle
00049 } SbMarkerStyle;
00050 
00051 typedef enum
00052 {
00053     SbAreaSolid = 0,
00054     SbAreaHatched,
00055     SbAreaChecker
00056 } SbAreaStyle;
00057 
00058 typedef enum
00059 {
00060     SbModelingWireFrame,
00061     SbModelingSolid,
00062     SbModelingCloud,
00063     SbModelingSegments,
00064     SbModelingPoints
00065 } SbModelingPolicy;
00066 
00067 typedef enum
00068 {
00069     SbPaintingColor,
00070     SbPaintingShadow,
00071     SbPaintingLUT,
00072     SbPaintingGradient
00073 } SbPaintingPolicy;
00074 
00075 typedef enum
00076 {
00077     SbColorAquamarine = 0,
00078     SbColorMediumaquamarine,
00079     SbColorBlack,    /*2*/
00080     SbColorBlue,     /*3*/
00081     SbColorCadetblue,
00082     SbColorCornflowerblue,
00083     SbColorDarkslateblue,
00084     SbColorLightblue,
00085     SbColorLightsteelblue,
00086     SbColorMediumblue,
00087     SbColorMediumslateblue, /*10*/
00088     SbColorMidnightblue,
00089     SbColorNavyblue,
00090     SbColorNavy,
00091     SbColorSkyblue,
00092     SbColorSlateblue,
00093     SbColorSteelblue,
00094     SbColorCoral,
00095     SbColorCyan,      /*18*/
00096     SbColorFirebrick,
00097     SbColorBrown,     /*20*/
00098     SbColorGold,
00099     SbColorGoldenrod,
00100     SbColorGreen,     /*23*/
00101     SbColorDarkgreen,
00102     SbColorDarkolivegreen,
00103     SbColorForestgreen,
00104     SbColorLimegreen,
00105     SbColorMediumseagreen,
00106     SbColorMediumspringgreen,
00107     SbColorPalegreen, /*30*/
00108     SbColorSeagreen,
00109     SbColorSpringgreen,
00110     SbColorYellowgreen,
00111     SbColorDarkslategrey,
00112     SbColorDimgrey,
00113     SbColorLightgrey,
00114     SbColorGrey,
00115     SbColorKhaki,
00116     SbColorMagenta, /*39*/
00117     SbColorMaroon,  /*40*/
00118     SbColorOrange,
00119     SbColorOrchid,
00120     SbColorDarkorchid,
00121     SbColorMediumorchid,
00122     SbColorPink,
00123     SbColorPlum,
00124     SbColorRed,    /*47*/
00125     SbColorIndianred,
00126     SbColorMediumvioletred,
00127     SbColorOrangered, /*50*/
00128     SbColorVioletred,
00129     SbColorSalmon,
00130     SbColorSienna,
00131     SbColorTan,
00132     SbColorThistle,
00133     SbColorTurquoise,   
00134     SbColorDarkturquoise,
00135     SbColorMediumturquoise,
00136     SbColorViolet,
00137     SbColorBlueviolet,  /*60*/
00138     SbColorWheat,
00139     SbColorWhite,       /*62*/
00140     SbColorYellow,      /*63*/
00141     SbColorGreenyellow  /*64*/
00142 } SbColorName; 
00143 
00144 class IG_OPEN_INVENTOR_API SbGraphicContext
00145 {
00146 public:
00147     
00148     SbGraphicContext ();
00149     ~SbGraphicContext ();
00150     void reset ();
00151     void dump ();
00152     void setFromScript (const SbString&);
00153     const SbVec3f& getRGB () const;
00154     void setColorIndex (int);
00155     int getColorIndex () const;
00156     void setModelingPolicy (SbModelingPolicy);
00157     SbModelingPolicy getModelingPolicy () const;
00158     void setLineStyle (SbLineStyle);
00159     SbLineStyle getLineStyle () const;
00160     int getLineWidth () const;
00161     void setMarkerStyle (SbMarkerStyle);
00162     SbMarkerStyle getMarkerStyle () const;
00163     int getMarkerSize () const;
00164     int getFontSize () const;
00165     void setAreaStyle (SbAreaStyle);
00166     SbAreaStyle getAreaStyle () const;
00167     SbPaintingPolicy getPaintingPolicy () const;
00168     void setFontName (const SbName&);
00169     const SbName& getFontName () const;
00170     int getMultiNodeLimit () const;
00171     static int getValueColorMapping (const SbString&, float** ,int**);
00172 
00173 private:
00174     
00175     int fColorIndex;
00176     int fLineWidth;
00177     int fMarkerSize;
00178     int fFontSize;
00179     SbLineStyle fLineStyle;
00180     SbMarkerStyle fMarkerStyle;
00181     SbAreaStyle fAreaStyle;
00182     SbModelingPolicy fModelingPolicy; 
00183     SbPaintingPolicy fPaintingPolicy;
00184     SbName fFontName;
00185     int fMultiNodeLimit;
00186 };
00187 
00188 SbString* SbStringCreateF (int, char*, ...);
00189 
00190 class SbPainterContext
00191 {
00192 public:
00193     float fRed;
00194     float fGreen;
00195     float fBlue;
00196     int fLineWidth;
00197     SbLineStyle fLineStyle;
00198     int fMarkerSize;
00199     SbMarkerStyle fMarkerStyle;
00200     SbAreaStyle fAreaStyle;
00201     int fPolygonMode;
00202 };
00203 
00204 //<<<<<< INLINE PUBLIC FUNCTIONS                                        >>>>>>
00205 //<<<<<< INLINE MEMBER FUNCTIONS                                        >>>>>>
00206 
00207 #endif // IG_OPEN_INVENTOR_IG_SB_GRAPHIC_CONTEXT_H

Generated on Tue Jun 9 17:38:43 2009 for CMSSW by  doxygen 1.5.4