~robot3d-team/robot3d/trunk

« back to all changes in this revision

Viewing changes to inc/srCore/simulationCameraController.h

  • Committer: Anne van Rossum
  • Date: 2010-08-10 15:58:55 UTC
  • Revision ID: anne@gamix-20100810155855-kve7x2vwouagdij9
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*-c++-*-
 
2
 * Delta3D Open Source Game and Simulation Engine
 
3
 * Copyright (C) 2005, BMH Associates, Inc.
 
4
 *
 
5
 * Camera Component
 
6
 *
 
7
 * @author Adrian Friebel
 
8
 */
 
9
 
 
10
#ifndef SIMULATIONCAMERACONTROLLER_H_
 
11
#define SIMULATIONCAMERACONTROLLER_H_
 
12
 
 
13
// Delta3D files
 
14
#include <dtGame/gmcomponent.h>
 
15
#include <dtDAL/gameeventmanager.h>
 
16
 
 
17
// Robot3D files
 
18
#include <srCore/export.h>
 
19
#include <srCore/simulationRobotSelectionComponent.h>
 
20
#include <srCore/simulationArenaComponent.h>
 
21
 
 
22
// TODO:        Different camera control modes, such as walking mode, automated mode, ...
 
23
 
 
24
/**
 
25
 * The SimulationCameraController is the camera controlled by the user to go through the
 
26
 * Robot3D simulator. It is not the one of the cameras defined on the robot.
 
27
 */
 
28
class ROBOT_EXPORT SimulationCameraController : public dtGame::GMComponent
 
29
{
 
30
public:
 
31
        SimulationCameraController(const std::string &name, osg::Vec3f camPos, bool camState);
 
32
 
 
33
        void ProcessMessage(const dtGame::Message &message);
 
34
 
 
35
        void init(dtCore::Mouse *mouse, dtCore::Keyboard *keyboard);
 
36
 
 
37
        void setCamera();
 
38
 
 
39
        void inline toggleScreenShots(bool toggle) {screenShotToggle = toggle;};
 
40
 
 
41
        void setViewport(bool fullwindow);
 
42
protected:
 
43
        virtual ~SimulationCameraController();
 
44
 
 
45
private:
 
46
        void sendMessageToAll(dtDAL::GameEvent &event);
 
47
 
 
48
        osg::Vec3f camPos;
 
49
        bool freeCamState;
 
50
 
 
51
        int counter;
 
52
    srCore::ScreenShotCallback* mScreenShotTaker;
 
53
        bool screenShotToggle;
 
54
 
 
55
        dtCore::FlyMotionModel *mFMM;
 
56
        dtCore::Tripod *mTrp;
 
57
 
 
58
 
 
59
};
 
60
 
 
61
#endif /*SIMULATIONCAMERACONTROLLER_H_*/