00001
00002
00003 #include "Iguana/Inventor/interface/IgSoViewpoint.h"
00004
00005
00006
00007
00008
00009
00010
00011
00012 SO_NODE_SOURCE (IgSoViewpoint);
00013
00014
00015
00016
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));
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 }