Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

S5camera.h

Go to the documentation of this file.
00001 // ///////////////////  ***********************  \\\\\\\\\\\\\\\\\\\\ \\
00002 //
00003 //  This file is part of the Sector 5, 3D graphic game.
00004 //  Copyright (C) 2000-2002 by PC John. All rights reserved.
00005 //
00006 //  This game is free software; you can redistribute it and/or
00007 //  modify it under the terms of the GNU Lesser General Public License
00008 //  version 2.1 as published by the Free Software Foundation. See the
00009 //  file LICENSE.LGPL at the root directory of the distribution for
00010 //  more details.
00011 //
00012 //  If you want to use Sector 5 code for applications not compatible 
00013 //  with the LGPL license, please contact PC John at pcjohn@email.cz.
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 /* S5_CAMERA_H_INCLUDED_ */

Generated on Sun Feb 17 21:42:33 2002 for Sector 5 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001