00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 #ifndef _OSGCAMERA_H_
00041 #define _OSGCAMERA_H_
00042 #ifdef __sgi
00043 #pragma once
00044 #endif
00045
00046 #include <OSGConfig.h>
00047
00048 #include <OSGMatrix.h>
00049 #include <OSGFrustumVolume.h>
00050
00051 #include <OSGCameraBase.h>
00052
00053 OSG_BEGIN_NAMESPACE
00054
00055 class Viewport;
00056 class DrawAction;
00057 class DrawActionBase;
00058 class FrustumVolume;
00059 class Line;
00060
00064 class OSG_SYSTEMLIB_DLLMAPPING Camera : public CameraBase
00065 {
00066
00067 public:
00068
00069
00073 static const char *getClassname(void) { return "Camera"; };
00074
00076
00080 virtual void changed(BitVector whichField,
00081 UInt32 origin );
00082
00084
00088 virtual void setup (DrawActionBase *action, const Viewport& port);
00089
00090 virtual void setupProjection(DrawActionBase *action, const Viewport& port);
00091
00092 virtual void draw (DrawAction *action, const Viewport& port);
00093
00095
00099 virtual void getProjection (Matrix &result,
00100 UInt32 width, UInt32 height);
00101
00102 virtual void getProjectionTranslation(Matrix &result,
00103 UInt32 width, UInt32 height);
00104
00105 virtual void getViewing (Matrix &result,
00106 UInt32 width, UInt32 height);
00107
00108 virtual void getFrustum (FrustumVolume &result,
00109 const Viewport& port);
00110
00111 virtual void getFrustum (FrustumVolume &result,
00112 UInt32 width, UInt32 height);
00113
00114 virtual void getWorldToScreen (Matrix &result,
00115 const Viewport& port);
00116
00117 virtual void getDecoration (Matrix &result,
00118 UInt32 width, UInt32 height);
00119
00121
00125 bool calcViewRay(Line & line, Int32 x, Int32 y, const Viewport& port);
00126
00128
00132 virtual void dump( UInt32 uiIndent = 0,
00133 const BitVector bvFlags = 0) const;
00134
00136
00137 protected:
00138
00139
00143 Camera(void);
00144 Camera(const Camera &source);
00145
00147
00151 virtual ~Camera(void);
00152
00153
00155
00156 private:
00157
00158 typedef CameraBase Inherited;
00159
00160 friend class FieldContainer;
00161 friend class CameraBase;
00162
00163 static void initMethod( void );
00164
00165 void operator =(const Camera &source);
00166 };
00167
00168
00169
00170
00171
00172 typedef Camera *CameraP;
00173
00174 OSG_END_NAMESPACE
00175
00176 #include <OSGCameraBase.inl>
00177 #include <OSGCamera.inl>
00178
00179 #define OSGCAMERA_HEADER_CVSID "@(#)$Id: FCTemplate_h.h,v 1.15 2002/06/01 10:37:25 vossg Exp $"
00180
00181 #endif