 |
Blamite Game Engine - blam!
00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
22 bool mouse_capture_state_changed =
false;
23 bool mouse_captured =
false;
24 int current_speed_index = 0;
29 std::vector<float> camera_speeds = {
37 int viewport_center_x = 0;
38 int viewport_center_y = 0;
40 bool zoom_state_changed =
false;
41 float zoom_increment = 0.0f;
43 std::map<BlamDirection, float> move_accelerations = {
52 float accel_increment = 0.0f;
54 int move_finished_tick = -1;
55 bool bounce_needed =
false;
56 bool currently_bouncing =
false;
57 bool bounceback_done =
false;
58 bool bounceforward_done =
false;
BLAM BlamDirector * GetCamera()
Retrieves the director instance.
Definition: director.cpp:24
void OnTickEvent(TickEvent *event)
Called when the listener is subscribed to Key Press events, and a new TickEvent is fired.
Definition: BlamDirectorCamera.cpp:72
@ Down
Definition: world.h:14
BlamDirector()
Initializes the camera.
Definition: BlamDirectorCamera.cpp:15
#define BLAM
Definition: director.h:10
@ Right
Definition: world.h:12
float fov
The camera's current field of view.
Definition: director.h:67
@ Left
Definition: world.h:11
float far_clip_plane_distance
Definition: director.h:87
BlamVector3 camera_angle
The current looking angle of the camera. X is yaw, Y is pitch, Z is roll (unused atm).
Definition: director.h:61
float zoom_increment_count
The number of steps/increments to use when zooming in and out. Lower numbers will cause the camera to...
Definition: director.h:72
@ Backward
Definition: world.h:10
@ Up
Definition: world.h:13
void OnKeyPressEvent(KeyPressEvent *event)
Called when the listener is subscribed to Key Press events, and a new KeyPressEvent is fired.
Definition: BlamDirectorCamera.cpp:338
float near_clip_plane_distance
Definition: director.h:86
void OnNewFrameEvent(NewFrameEvent *event)
Called when the listener is subscribed to New Frame events, and a new NewFrameEvent is fired.
Definition: BlamDirectorCamera.cpp:30
float fov_normal
The camera's default field of view.
Definition: director.h:68
Class representing a virtual key press.
Definition: KeyPressEvent.h:12
float vertical_angle
Definition: director.h:84
BLAM void PrepareCamera()
Prepares the director for use.
Definition: director.cpp:5
BlamVector3 camera_right
The calculated point representing the right of the camera.
Definition: director.h:65
bool calculate_angle
Definition: director.h:82
float accel_increment_count
The number of steps/increments to use when accelerating and decelerating. Lower numbers will cause th...
Definition: director.h:78
Namespace for things related to the debug camera (director).
Definition: director.h:139
float horizontal_angle
Definition: director.h:83
Class representing an engine tick event.
Definition: TickEvent.h:10
float look_sensetivity
The camera's look sensetivity.
Definition: director.h:71
bool move_acceleration
Whether or not camera movements should use acceleration.
Definition: director.h:76
BLAM void ShutdownCamera()
Destroys the director and cleans up any data related to it.
Definition: director.cpp:19
Class representing a mouse movement event.
Definition: MouseMoveEvent.h:10
bool auto_verify_coords
Whether or not camera_front and camera_right should be automatically calculated.
Definition: director.h:63
float speed
The camera's current speed.
Definition: director.h:70
bool lock_camera
Whether or not the camera is locked. If locked, all keyboard/mouse input is ignored.
Definition: director.h:73
Class representing a mouse button press.
Definition: MouseClickEvent.h:12
bool look_acceleration
Whether or not camera looking should use acceleration.
Definition: director.h:77
Class representing the Director.
Definition: director.h:19
bool pancam_lock_xy
Whether or not the camera should be locked to X/Y axis when in pan-cam mode.
Definition: director.h:75
bool zoomed
Whether or not the camera is currently zoomed in.
Definition: director.h:80
bool camera_bouncing
Whether or not the camera should have a bounce/rubber effect when moving and looking around.
Definition: director.h:79
@ Forward
Definition: world.h:9
void SetCameraSpeed(float _speed)
Sets the camera's speed, while also sending a log message indicating that the speed has been changed.
Definition: BlamDirectorCamera.cpp:641
Class representing an Event Listener.
Definition: events.h:27
bool pancam
Whether or not the camera is currently in pan-cam mode. Pan-cam locks Z movement of the camera when n...
Definition: director.h:74
void OnMouseClickEvent(MouseClickEvent *event)
Called when the listener is subscribed to Mouse Click events, and a new MouseClickEvent is fired.
Definition: BlamDirectorCamera.cpp:323
void ValidateCameraCoords()
If auto_verify_coords is set to true, this will verify all camera coordinates.
Definition: BlamDirectorCamera.cpp:587
Class representing an engine frame event.
Definition: NewFrameEvent.h:13
void OnMouseMoveEvent(MouseMoveEvent *event)
Called when the listener is subscribed to Mouse Move events, and a new MouseMoveEvent is fired.
Definition: BlamDirectorCamera.cpp:306
BlamVector3 camera_front
The calculated point representing the front of the camera.
Definition: director.h:64
BlamDirection
Definition: world.h:7
BlamVector3 camera_pos
The current position of the camera.
Definition: director.h:60
float fov_zoomed
The camera's field of view while zoomed in.
Definition: director.h:69
~BlamDirector()
Destroys the camera.
Definition: BlamDirectorCamera.cpp:25
void MoveCamera(BlamDirection direction, float acceleration)
Moves the camera one "step" in the given direction.
Definition: BlamDirectorCamera.cpp:353