CMS 3D CMS Logo

IgSoPcon.h

Go to the documentation of this file.
00001 #ifndef IG_OPEN_INVENTOR_IG_SO_PCON_H
00002 # define IG_OPEN_INVENTOR_IG_SO_PCON_H
00003 
00004 //<<<<<< INCLUDES                                                       >>>>>>
00005 
00006 # include "Iguana/Inventor/interface/IgSoShapeKit.h"
00007 # include <Inventor/fields/SoSFFloat.h>
00008 # include <Inventor/fields/SoSFVec3f.h>
00009 # include <Inventor/fields/SoMFVec3f.h>
00010 
00011 #include <vector>
00012 
00013 # ifdef WIN32
00014 #  include <SoWinLeaveScope.h>
00015 # endif
00016 
00017 //<<<<<< PUBLIC DEFINES                                                 >>>>>>
00018 //<<<<<< PUBLIC CONSTANTS                                               >>>>>>
00019 //<<<<<< PUBLIC TYPES                                                   >>>>>>
00020 //<<<<<< PUBLIC VARIABLES                                               >>>>>>
00021 //<<<<<< PUBLIC FUNCTIONS                                               >>>>>>
00022 //<<<<<< CLASS DECLARATIONS                                             >>>>>>
00023 
00047 class IG_OPEN_INVENTOR_API IgSoPcon : public IgSoShapeKit
00048 {
00049     SO_KIT_HEADER (IgSoPcon);
00050     SO_KIT_CATALOG_ENTRY_HEADER (translation);
00051     SO_KIT_CATALOG_ENTRY_HEADER (outerCoords);
00052     SO_KIT_CATALOG_ENTRY_HEADER (outerSurface);
00053     SO_KIT_CATALOG_ENTRY_HEADER (innerCoords);
00054     SO_KIT_CATALOG_ENTRY_HEADER (innerSurface);
00055     SO_KIT_CATALOG_ENTRY_HEADER (topCoords);
00056     SO_KIT_CATALOG_ENTRY_HEADER (topSurface);
00057     SO_KIT_CATALOG_ENTRY_HEADER (bottomCoords);
00058     SO_KIT_CATALOG_ENTRY_HEADER (bottomSurface);
00059     SO_KIT_CATALOG_ENTRY_HEADER (side1Rot);
00060     SO_KIT_CATALOG_ENTRY_HEADER (side1Hints);
00061     SO_KIT_CATALOG_ENTRY_HEADER (side1Face);
00062     SO_KIT_CATALOG_ENTRY_HEADER (side2Rot);
00063     SO_KIT_CATALOG_ENTRY_HEADER (side2Hints);
00064     SO_KIT_CATALOG_ENTRY_HEADER (side2Face);
00065 
00066 public:
00067     IgSoPcon (void);
00068     static void initClass (void);
00069 
00070     SoMFVec3f vertices;         //< set of points at the breaks
00071     SoSFVec3f center;           //< translation of the vtxPts relative to the origin
00072     SoSFFloat phiStart;         //< starting angle of the region of revolution (in radians)
00073     SoSFFloat phiDelta;         //< extent of revolution
00074 
00076     void initialise (const int nzee, const float phi, const float delPhi, 
00077                      const float *zvals, const float *rmin, const float *rmax);
00078 
00080     void makePcon (const std::vector<float> &zvals, 
00081                           const std::vector<float> &rmin, 
00082                           const std::vector<float> &rmax,
00083                           float phiStart = 0, 
00084                           float phiDelta = 2*M_PI,
00085                           int divisions = -1);
00086 
00087 protected:
00088     virtual void refresh (void);
00089 };
00090 
00091 //<<<<<< INLINE PUBLIC FUNCTIONS                                        >>>>>>
00092 inline void IgSoPcon::makePcon (const std::vector<float> &zvals, const std::vector<float> &rmin,
00093                            const std::vector<float> &rmax, float phiStart, float phiDelta,
00094                            int divisions)
00095 { initialise (static_cast<int>( zvals.size() ), phiStart, phiDelta, &zvals[0], &rmin[0], &rmax[0]); }
00096 //<<<<<< INLINE MEMBER FUNCTIONS                                        >>>>>>
00097 
00098 # ifdef WIN32
00099 #  include <SoWinEnterScope.h>
00100 # endif
00101 #endif // IG_OPEN_INVENTOR_IG_SO_PCON_H

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