CMS 3D CMS Logo

IgSoViewpoint.cc

Go to the documentation of this file.
00001 //<<<<<< INCLUDES                                                       >>>>>>
00002 
00003 #include "Iguana/Inventor/interface/IgSoViewpoint.h"
00004 
00005 //<<<<<< PRIVATE DEFINES                                                >>>>>>
00006 //<<<<<< PRIVATE CONSTANTS                                              >>>>>>
00007 //<<<<<< PRIVATE TYPES                                                  >>>>>>
00008 //<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
00009 //<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
00010 //<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
00011 
00012 SO_NODE_SOURCE (IgSoViewpoint);
00013 
00014 //<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
00015 //<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
00016 //<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
00017 
00018 void
00019 IgSoViewpoint::initClass (void)
00020 {
00021     SO_NODE_INIT_CLASS (IgSoViewpoint, SoNode, "Node");
00022 }
00023 
00024 IgSoViewpoint::IgSoViewpoint (void)
00025 {
00026     SO_NODE_CONSTRUCTOR (IgSoViewpoint);
00027     SO_NODE_ADD_FIELD (position, (SbVec3f (0, 0, 1)));
00028     SO_NODE_ADD_FIELD (orientation, (SbRotation (SbVec3f (0, 0, 1), 0)));
00029     SO_NODE_ADD_FIELD (aspectRatio, (1.f));
00030     SO_NODE_ADD_FIELD (focalDistance, (5.f));
00031     SO_NODE_ADD_FIELD (heightAngle, (M_PI/4.f)); // 45°
00032     SO_NODE_ADD_FIELD (cameraType, (Perspective));
00033     SO_NODE_DEFINE_ENUM_VALUE (CameraType, Perspective);
00034     SO_NODE_DEFINE_ENUM_VALUE (CameraType, Orthographic);
00035     SO_NODE_SET_SF_ENUM_TYPE (cameraType, CameraType);
00036     SO_NODE_ADD_FIELD (nearDistance, (1.f));
00037     SO_NODE_ADD_FIELD (farDistance,  (1.f));
00038 }

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