2
* Delta3D Open Source Game and Simulation Engine
3
* Copyright (C) 2006, Alion Science and Technology, BMH Operation
5
* This library is free software; you can redistribute it and/or modify it under
6
* the terms of the GNU Lesser General Public License as published by the Free
7
* Software Foundation; either version 2.1 of the License, or (at your option)
10
* This library is distributed in the hope that it will be useful, but WITHOUT
11
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
15
* You should have received a copy of the GNU Lesser General Public License
16
* along with this library; if not, write to the Free Software Foundation, Inc.,
17
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
* @author Matthew W. Campbell
20
* @editor Allen M. Danklefsen
21
* @editor Curtiss Murphy
27
#include "../../basic/robotActorBase.h"
30
#include "../factories/bodyFactory.h"
31
#include "../factories/actuatorFactory.h"
32
#include "../bodies/led.h"
33
#include "../connectors/connectorUniKarl.h"
34
#include "../../basic/sensors/distanceSensor.h"
35
#include "../../basic/sensors/cameraSensor.h"
36
#include "../../basic/sensors/depthImageCamera.h"
37
#include "../../basic/sensors/lightSensor.h"
39
//TODO: When available model new SSSA robot
45
* This class is the actor that represents a robot. It knows how to
46
* respond to keyboard presses (I, J, K, L to steer). It also listens for
47
* "SpeedBoost" GameEvent. This actor correctly handles
48
* TickLocal versus TickRemote.
50
class ROBOT_EXPORT RobotSSSA : public RobotActorBase
51
// : public dtGame::GameActor
54
//! Constant identifier for our game event handler method.
55
static const std::string EVENT_HANDLER_NAME;
57
//! Constructs the robot actor.
58
RobotSSSA(dtGame::GameActorProxy &proxy);
60
void setColor(osg::Vec4 color);
63
* This method is an invokable called when an object is local and
65
* @param tickMessage A message containing tick related information.
67
virtual void TickLocal(const dtGame::Message &tickMessage);
70
* This method is an invokable called when an object is remote and
72
* @param tickMessage A message containing tick related information.
74
// virtual void TickRemote(const dtGame::Message &tickMessage);
77
* Generic handler for messages. Overridden from base class.
78
* This is the default invokable on GameActorProxy.
80
virtual void ProcessMessage(const dtGame::Message &message);
82
/** Called when the actor has been added to the game manager.
83
* You can respond to OnEnteredWorld on either the proxy or actor or both.
85
virtual void OnEnteredWorld();
100
* build the robot from meshes and attach joints and physical features to it
101
* you can set the starting position & heading with the normal proxy
102
* SetTranslation & SetRotation method analogical (only the first value -
103
* the heading in the x-y-plane is used)
104
* this Method is called from OnEnteredWorld(), so you have to call
105
* the SetTranslation & SetRotation methods before the AddActor call
109
//! delta time between two simulation steps
112
//! switch between manual (keyboard and GUI control) and automat (Controller) control
121
* Our proxy class for the robot actor. The proxy contains properties,
122
* invokables, and robot actor.
124
class ROBOT_EXPORT RobotSSSAProxy : public RobotActorBaseProxy//dtGame::GameActorProxy
128
//! Constructs the proxy.
131
//! Creates the properties that are custom to the robot proxy.
132
virtual void BuildPropertyMap();
135
virtual ~RobotSSSAProxy();
137
//! Creates an instance of our robot tank actor
138
virtual void CreateActor();
140
/** Called when this proxy is added to the game manager (ie, the "world")
141
* You can respond to OnEnteredWorld on either the proxy or actor or both.
143
virtual void OnEnteredWorld();