00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef S5_CAMERA_H_INCLUDED_
00019 #define S5_CAMERA_H_INCLUDED_
00020
00021 #include <Inventor/nodes/SoSeparator.h>
00022 #include <Inventor/nodes/SoSubNode.h>
00023 #include <Inventor/nodes/SoCamera.h>
00024 #include "S5Object.h"
00025
00026 class SoTransformSeparator;
00027 class SoMatrixTransform;
00028 class SoCallback;
00029 class SbMatrix;
00030
00031
00032
00033 class S5camera : public SoSeparator
00034 {
00035
00036 SO_NODE_HEADER(S5camera);
00037
00038 public:
00039
00040 SoCamera* getCamera() { return camera; };
00041 void setCamera(SoCamera *newCamera);
00042
00043 S5object* getCameraOwner() { return cameraOwner; };
00044 void setCameraOwner(S5object *newOwner);
00045
00046 SoNode* getSceneGraph() { return sceneGraph; };
00047 void setSceneGraph(SoNode *newGraph);
00048
00049 void resetCameraModifications();
00050 void resetPreviousCameraModifications();
00051 static void resetAllCamerasModifications();
00052
00053 S5camera();
00054
00055 SoINTERNAL public:
00056
00057 static void initClass();
00058
00059 protected:
00060
00061 virtual ~S5camera();
00062
00063 static void callbackCB(void *userData, SoAction *action);
00064
00065 private:
00066
00067 SoTransformSeparator *cameraSep;
00068 SoMatrixTransform *cameraTrans;
00069 SoCamera *camera;
00070 SoCallback *callback;
00071 SoNode *sceneGraph;
00072
00073 bool cameraOwnerRemoved;
00074 S5object *cameraOwner;
00075 SoPath *pathToCameraOwner;
00076
00077 bool checkPathConsistency();
00078 bool updatePath();
00079 void getCameraTransformation(SbMatrix &m);
00080
00081 };
00082
00083
00084 #endif