Blamite Game Engine - blam!  00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
director.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../../debug_ui.h"
4 
6 
8 {
13  {
14  public:
15  void Draw()
16  {
17  if (show)
18  {
19  if (ImGui::Begin("Director Debug", &show))
20  {
22 
23  if (director)
24  {
25  // Basic camera settings
26  {
27  ImGui::DragFloat3("camera pos", (float*)&director->camera_pos);
28  ImGui::DragFloat3("camera angle", (float*)&director->camera_angle);
29  ImGui::DragFloat("field of view", &director->fov);
30  }
31 
32  ImGui::Separator();
33 
34  // Advanced camera settings
35  {
36  ImGui::Checkbox("lock camera", &director->lock_camera);
37  ImGui::DragFloat("camera speed", &director->speed);
38  ImGui::DragFloat("look sensetivity", &director->look_sensetivity);
39 
40  ImGui::Checkbox("move acceleration", &director->move_acceleration);
41  ImGui::Checkbox("look acceleration", &director->look_acceleration);
42  ImGui::InputFloat("acceleration increment count", &director->accel_increment_count);
43 
44  ImGui::InputFloat("zoom increment count", &director->zoom_increment_count);
45  ImGui::SameLine();
46  Widgets::ShowHelpMarker(ENGINE_TEXT("director_zoom_increment_count_help_text").c_str());
47 
48  ImGui::Checkbox("pan-cam", &director->pancam);
49  ImGui::SameLine();
50  Widgets::ShowHelpMarker(ENGINE_TEXT("director_pancam_help_text").c_str());
51 
52  ImGui::Checkbox("pan-cam lock x/y", &director->pancam_lock_xy);
53  ImGui::SameLine();
54  Widgets::ShowHelpMarker(ENGINE_TEXT("director_camera_pancam_lock_xy_help_text").c_str());
55 
56  ImGui::Checkbox("camera bouncing", &director->camera_bouncing);
57  ImGui::SameLine();
58  Widgets::ShowHelpMarker(ENGINE_TEXT("director_camera_bouncing_help_text").c_str());
59 
60  ImGui::DragFloat("near clip distance", &director->near_clip_plane_distance);
61  ImGui::SameLine();
62  Widgets::ShowHelpMarker(ENGINE_TEXT("director_near_clip_help_text").c_str());
63 
64  ImGui::DragFloat("far clip distance", &director->far_clip_plane_distance);
65  ImGui::SameLine();
66  Widgets::ShowHelpMarker(ENGINE_TEXT("director_far_clip_help_text").c_str());
67  }
68 
69  if (ImGui::CollapsingHeader("internal"))
70  {
71  ImGui::Checkbox("auto verify coords", &director->auto_verify_coords);
72  ImGui::SameLine();
73  Widgets::ShowHelpMarker(ENGINE_TEXT("director_auto_verify_coords_help_text").c_str());
74 
75  ImGui::DragFloat3("camera front", (float*)&director->camera_front);
76  ImGui::DragFloat3("camera right", (float*)&director->camera_right);
77  //ImGui::DragFloat3("camera up", (float*)&director->camera_up);
78 
79  ImGui::Checkbox("auto calculate angle", &director->calculate_angle);
80  ImGui::DragFloat("horizontal angle", &director->horizontal_angle);
81  ImGui::DragFloat("vertical angle", &director->vertical_angle);
82  }
83  }
84  else
85  {
86  ImGui::Text("director is not initialized");
87  }
88  }
89  ImGui::End();
90  }
91  }
92  };
93 }
Blam::Director::GetCamera
BLAM BlamDirector * GetCamera()
Retrieves the director instance.
Definition: director.cpp:24
Blam::DebugUI::Widgets::ShowHelpMarker
BLAM void ShowHelpMarker(const char *desc)
Shows a help indicator.
Definition: widgets.cpp:7
BlamDirector::fov
float fov
The camera's current field of view.
Definition: director.h:67
BlamDirector::far_clip_plane_distance
float far_clip_plane_distance
Definition: director.h:87
BlamDirector::camera_angle
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
BlamDirector::zoom_increment_count
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
BlamDirector::near_clip_plane_distance
float near_clip_plane_distance
Definition: director.h:86
director.h
Blam::DebugUI::Windows::DirectorTool::Draw
void Draw()
Draws the contents of the group.
Definition: director.hpp:15
BlamDirector::vertical_angle
float vertical_angle
Definition: director.h:84
BlamDirector::camera_right
BlamVector3 camera_right
The calculated point representing the right of the camera.
Definition: director.h:65
BlamDirector::calculate_angle
bool calculate_angle
Definition: director.h:82
BlamDirector::accel_increment_count
float accel_increment_count
The number of steps/increments to use when accelerating and decelerating. Lower numbers will cause th...
Definition: director.h:78
BlamDirector::horizontal_angle
float horizontal_angle
Definition: director.h:83
BlamDirector::look_sensetivity
float look_sensetivity
The camera's look sensetivity.
Definition: director.h:71
BlamDirector::move_acceleration
bool move_acceleration
Whether or not camera movements should use acceleration.
Definition: director.h:76
Blam::DebugUI::ImGUIDrawingGroup::show
bool show
Controls whether or not the group should be shown. May not be used in all groups.
Definition: debug_ui.h:362
BlamDirector::auto_verify_coords
bool auto_verify_coords
Whether or not camera_front and camera_right should be automatically calculated.
Definition: director.h:63
BlamDirector::speed
float speed
The camera's current speed.
Definition: director.h:70
Blam::DebugUI::ImGUIDrawingGroup
Class representing an ImGUI drawing group/draw list item.
Definition: debug_ui.h:359
BlamDirector::lock_camera
bool lock_camera
Whether or not the camera is locked. If locked, all keyboard/mouse input is ignored.
Definition: director.h:73
BlamDirector::look_acceleration
bool look_acceleration
Whether or not camera looking should use acceleration.
Definition: director.h:77
BlamDirector
Class representing the Director.
Definition: director.h:19
BlamDirector::pancam_lock_xy
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
BlamDirector::camera_bouncing
bool camera_bouncing
Whether or not the camera should have a bounce/rubber effect when moving and looking around.
Definition: director.h:79
ENGINE_TEXT
#define ENGINE_TEXT(string_id)
Definition: engine_text.h:7
Blam::DebugUI::Windows::DirectorTool
Class for the Director debug utility.
Definition: director.hpp:12
Blam::DebugUI::Windows
Legacy namespace to contain data for the legacy ImGUI console.
Definition: debug_ui.h:434
BlamDirector::pancam
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
Text
@ Text
Master text object that wraps around both BitmapText and DWText.
Definition: render_stack.h:73
BlamDirector::camera_front
BlamVector3 camera_front
The calculated point representing the front of the camera.
Definition: director.h:64
BlamDirector::camera_pos
BlamVector3 camera_pos
The current position of the camera.
Definition: director.h:60