libcrbn/camera/ccontext.hpp

00001 
00002 #ifndef __camera_context_hpp__
00003 #define __camera_context_hpp__
00004 
00005 #include <crbn/basic/paramlist.hpp>
00006 #include <crbn/camera/camera.hpp>
00007 #include <crbn/camera/cmod.h>
00008 
00009 class CameraContext
00010 {
00011  public:
00012   CameraContext();
00013 
00014   ~CameraContext();
00015 
00016   void set_view( vec3& position, vec3& target, vec3& vertical ) {
00017     _position = position;
00018     _target = target;
00019     _vertical = vertical;
00020   }
00021 
00022   void set_aspect_ratio( float ar ) { _ar = ar; }
00023 
00024   bool create( const char* camera_type, paramlist& pl );
00025 
00026   Camera* get();
00027 
00028 private:
00029   void unload();
00030 
00031   void* _camera_module;
00032   Camera* _camera;
00033 
00034   vec3 _position, _target, _vertical;
00035   float _ar;
00036 };
00037 
00038 #endif // __camera_context_hpp__

Generated on Tue Nov 14 15:40:08 2006 for libcrbn by  doxygen 1.5.0