class LocalPlayer;
struct MapDrawControl;
-class IGameDef;
+class Client;
class WieldMeshSceneNode;
struct Nametag {
{
public:
Camera(scene::ISceneManager* smgr, MapDrawControl& draw_control,
- IGameDef *gamedef);
+ Client *client);
~Camera();
- // Get player scene node.
- // This node is positioned at the player's torso (without any view bobbing),
- // as given by Player::m_position. Yaw is applied but not pitch.
- inline scene::ISceneNode* getPlayerNode() const
- {
- return m_playernode;
- }
-
- // Get head scene node.
- // It has the eye transformation and pitch applied,
- // but no view bobbing.
- inline scene::ISceneNode* getHeadNode() const
- {
- return m_headnode;
- }
-
// Get camera scene node.
// It has the eye transformation, pitch and view bobbing applied.
inline scene::ICameraSceneNode* getCameraNode() const
m_camera_mode = CAMERA_MODE_FIRST;
}
+ // Set the current camera mode
+ inline void setCameraMode(CameraMode mode)
+ {
+ m_camera_mode = mode;
+ }
+
//read the current camera mode
inline CameraMode getCameraMode()
{
void removeNametag(Nametag *nametag);
- std::list<Nametag *> *getNametags()
- { return &m_nametags; }
+ const std::list<Nametag *> &getNametags() { return m_nametags; }
void drawNametags();
// draw control
MapDrawControl& m_draw_control;
- IGameDef *m_gamedef;
+ Client *m_client;
video::IVideoDriver *m_driver;
// Absolute camera position
f32 m_cache_view_bobbing_amount;
f32 m_cache_fov;
f32 m_cache_zoom_fov;
- bool m_cache_view_bobbing;
std::list<Nametag *> m_nametags;
};