CMS 3D CMS Logo

Ig2DModel.h

Go to the documentation of this file.
00001 #ifndef IGUANA_GL_MODELS_IG_2D_MODEL_H
00002 # define IGUANA_GL_MODELS_IG_2D_MODEL_H
00003 
00004 //<<<<<< INCLUDES                                                       >>>>>>
00005 
00006 # include "Iguana/GLModels/interface/config.h"
00007 # include "Iguana/GLModels/interface/Ig3DBaseModel.h"
00008 # include <string>
00009 # include <set>
00010 
00011 //<<<<<< PUBLIC DEFINES                                                 >>>>>>
00012 //<<<<<< PUBLIC CONSTANTS                                               >>>>>>
00013 //<<<<<< PUBLIC TYPES                                                   >>>>>>
00014 
00015 class Ig2DRep;
00016 class SoTransform;
00017 class SoIndexedFaceSet;
00018 class SoNode;
00019 class SbVec3f;
00020 class SoShapeHints;
00021 class SoGroup;
00022 
00023 //<<<<<< PUBLIC VARIABLES                                               >>>>>>
00024 //<<<<<< PUBLIC FUNCTIONS                                               >>>>>>
00025 //<<<<<< CLASS DECLARATIONS                                             >>>>>>
00026 
00027 class IGUANA_GL_MODELS_API Ig2DModel : public Ig3DBaseModel
00028 {
00029 public:
00030     Ig2DModel (IgState *state, Ig3DBaseModel *sourceModel);
00031 
00032     Ig3DBaseModel *     sourceModel (void) const;
00033     void                setCutTransform (SbVec3f axis, float angle);
00034     SoNode *            cutTransform (void) const;
00035     SoNode *            cutPlane (void) const;
00036     void                setCutPlanePosition (float x, float y);
00037     void                setCutPlaneSize (float w, float h);
00038     
00039     Ig2DRep *           getLayer (const std::string &name);   
00040     bool                isToBeCut (std::string);
00041     
00042 private:
00043     Ig2DRep *           createFull (Ig2DRep *parent, const std::string &str);
00044     Ig2DRep *           fullMatch (Ig3DBaseRep *from, const std::string &str);
00045     std::string         closestMatchName (const std::string &str);
00046     std::string         getFirst (const std::string &str);
00047     std::string         getLast (const std::string &str);
00048     std::string         removeFirst (const std::string &str);
00049     std::string         removeLast (const std::string &str);    
00050 
00051     Ig3DBaseModel       *m_sourceModel;
00052     SoIndexedFaceSet    *m_plane;    
00053     SoTransform         *m_objectTransform;
00054     SoGroup             *m_cutGroup;
00055     SoShapeHints        *m_cutHints;
00056     SoTransform         *m_cutScale;
00057     SoTransform         *m_cutPosition;    
00058 
00059     // Configuration for the model.
00060     typedef std::set<std::string>       NotCutTwigSet;
00061     NotCutTwigSet                       m_cutConf;    
00062 };
00063 
00064 //<<<<<< INLINE PUBLIC FUNCTIONS                                        >>>>>>
00065 //<<<<<< INLINE MEMBER FUNCTIONS                                        >>>>>>
00066 
00067 #endif // IGUANA_GL_MODELS_IG_2D_MODEL_H

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