Elaztek Developer Hub
Blamite Game Engine - blam!  00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
primitives.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #ifndef BLAM
6 #define BLAM
7 #endif
8 
10 {
11  float x;
12  float y;
13  float z;
15 };
16 
25 {
33  BLAM void DrawCuboid(BlamVector3 position, BlamVector3 rotation, BlamVector3 scale);
34 
46  BLAM void DrawCylinder(BlamVector3 position, BlamVector3 rotation, BlamVector3 scale, int resolution, int radius_top, int radius_bottom);
47 
48  BLAM void DrawRectangle(BlamVector2 position, BlamVector2 size, float rotation);
49 }
BlamRendering::RenderStack::StackObjectBase::draw_mode
StackItemDrawMode draw_mode
The drawing mode of the object.
Definition: render_stack.h:373
Blam::Director::GetCamera
BLAM BlamDirector * GetCamera()
Retrieves the director instance.
Definition: director.cpp:31
BlamRendering::SetClearColor
BLAM void SetClearColor(ImVec4 color)
Changes the color to used to clear the render target.
Definition: rendering_abstraction.cpp:27
BlamUIWidget::hidden
bool hidden
Definition: ui.h:94
Blam::World::GetWorldState
BLAM_EXT_API BlamWorldState * GetWorldState()
Retrieves the current world state.
Definition: world.cpp:44
ui.h
BlamUIWidget_BasicRectangle::SetHidden
void SetHidden(bool new_hidden) override
Definition: rectangle.cpp:227
BlamRendering::OGRE::Materials::CreateDefaultUnlitDatablockForPrimitives
BLAM Ogre::HlmsUnlitDatablock * CreateDefaultUnlitDatablockForPrimitives(std::string id)
Definition: materials.cpp:916
BlamRendering::RenderStack::StackObjectBase::visible
bool visible
Whether or not the object is visible.
Definition: render_stack.h:375
Blam::DebugUI::Widgets::ShowHelpMarker
BLAM void ShowHelpMarker(const char *desc)
Shows a help indicator.
Definition: widgets.cpp:7
BlamRendering::DirectX::GetClearColor
BLAM ImVec4 * GetClearColor()
Retrieves the current color used to clear the render target.
Definition: render_manage.cpp:613
BlamUIWidget_BasicRectangle::UpdateMetrics
void UpdateMetrics() override
Definition: rectangle.cpp:182
Blam::Network::Init
BLAM bool Init()
Definition: socket.cpp:248
BlamRendering::BGFX::SetViewClearFlags
BLAM void SetViewClearFlags(int new_flags)
Definition: bgfx.cpp:170
BlamUIWidget::update
bool update
Definition: ui.h:93
Blam::Logger::LogEvent
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:142
BlamDirector::fov
float fov
The camera's current field of view.
Definition: director.h:85
width
int width
Definition: bgfx.cpp:19
BlamDirector::far_clip_plane_distance
float far_clip_plane_distance
Definition: director.h:109
BlamRendering::OGRE::DisplayDetailedCrashScreen
BLAM void DisplayDetailedCrashScreen(std::string expression, std::string file, int line, std::string message)
Definition: ogre.cpp:421
BlamUIWidget_Group
Definition: ui.h:141
render_stack.h
color
BlamColor color
Typedef for a color field, used in tag definitions.
Definition: tags.h:359
ImGui::Checkbox
IMGUI_API bool Checkbox(const char *label, bool *v)
Definition: imgui_widgets.cpp:974
logger.h
Blam::UI::GetUIRoot
BLAM BlamUIWidget_Group * GetUIRoot()
Definition: ui.cpp:74
BlamRendering::GetCurrentRenderingEngine
BLAM BlamRenderingEngine GetCurrentRenderingEngine()
Retrieves the current rendering engine being used.
Definition: rendering_abstraction.cpp:104
BlamRendering::BGFX::Primitives
Namespace containing functions for simple drawing of 2D and 3D primitives.
Definition: primitives.h:24
BlamUIWidget::parent
BlamUIWidget_Group * parent
Definition: ui.h:111
BlamUIWidget::rotation
float rotation
Definition: ui.h:104
BlamRendering::HandleWindowResize
BLAM void HandleWindowResize(int width, int height, WPARAM wParam)
Definition: rendering_abstraction.cpp:81
imgui.h
Blam::UI::ImGUI::RenderFrame
BLAM void RenderFrame()
Renders ImGUI to the application window.
Definition: imgui.cpp:237
BlamWidgetType::Basic_Rectangle
@ Basic_Rectangle
A basic filled or outline rectangle.
OGRE
@ OGRE
Definition: rendering.h:41
ImVec4
Definition: imgui.h:192
primitives.h
BlamRendering::BGFX::Primitives::DrawRectangle
BLAM void DrawRectangle(BlamVector2 position, BlamVector2 size, float rotation)
Definition: rectangle.cpp:12
BlamRenderingEngine
BlamRenderingEngine
Enumerator listing possible rendering APIs/engines.
Definition: rendering.h:37
Blam::GetWin32MainWindowHandle
BLAM HWND GetWin32MainWindowHandle()
Retrieves the main window handle of the application.
Definition: main.cpp:734
world.h
BlamRendering::ShowCrashScreen
BLAM void ShowCrashScreen(const char *exc, const char *file, int line, std::string message)
Displays the engine crash screen.
Definition: rendering_abstraction.cpp:62
copy
ARPHIC PUBLIC LICENSE Ltd Yung Chi Taiwan All rights reserved except as specified below Everyone is permitted to copy and distribute verbatim copies of this license but changing it is forbidden Preamble The licenses for most software are designed to take away your freedom to share and change it By the ARPHIC PUBLIC LICENSE specifically permits and encourages you to use this provided that you give the recipients all the rights that we gave you and make sure they can get the modifications of this software Legal Terms Font means the TrueType fonts AR PL Mingti2L AR PL KaitiM AR PL KaitiM and the derivatives of those fonts created through any modification including modifying reordering converting changing font or adding deleting some characters in from glyph table PL means Public License Copyright Holder means whoever is named in the copyright or copyrights for the Font You means the or person redistributing or modifying the Font Freely Available means that you have the freedom to copy or modify the Font as well as redistribute copies of the Font under the same conditions you not price If you you can charge for this service Copying &Distribution You may copy and distribute verbatim copies of this Font in any without provided that you retain this license including modifying reordering converting changing font or adding deleting some characters in from glyph and copy and distribute such modifications under the terms of Section provided that the following conditions are such as by offering access to copy the modifications from a designated or distributing the modifications on a medium customarily used for software interchange c If the modified fonts normally reads commands interactively when you must cause when started running for such interactive use in the most ordinary to print or display an announcement including an appropriate copyright notice and a notice that there is no and telling the user how to view a copy of this License These requirements apply to the modified work as a whole If identifiable sections of that work are not derived from the and can be reasonably considered independent and separate works in then this License and its do not apply to those sections when you distribute them as separate works mere aggregation of another work not based on the Font with the Font on a volume of a storage or distribution medium does not bring the other work under the scope of this License Condition Subsequent You may not copy
Definition: ARPHICPL.TXT:41
BlamRendering::SetDisplayRes
BLAM HRESULT SetDisplayRes(int x, int y)
Changes the game's display resolution.
Definition: rendering_abstraction.cpp:8
BlamUIWidget::z_size
float z_size
Definition: ui.h:107
Blam::Config::GetConfig
BLAM ConfigFile * GetConfig()
Retrieves the engine configuration file.
Definition: compat.cpp:5
BlamRendering::DirectX::SetClearColor
BLAM void SetClearColor(ImVec4 color)
Changes the color to used to clear the render target.
Definition: render_manage.cpp:567
PrimitiveGenericVertex
Definition: primitives.h:9
BlamDirector::near_clip_plane_distance
float near_clip_plane_distance
Definition: director.h:108
BlamUIWidget_BasicRectangle::solid
bool solid
Definition: ui.h:197
BlamRendering::RenderStack::GetDrawModesList
BLAM std::vector< StackItemDrawMode > GetDrawModesList()
Retrieves a list of all available drawing modes.
Definition: render_stack.cpp:216
BlamUIWidget_BasicRectangle::thickness
int thickness
Definition: ui.h:198
BlamUIWidget::GetAdjustedZIndex
int GetAdjustedZIndex()
Definition: BlamUIWidget.cpp:359
BlamRendering::DirectX::DisplayDetailedCrashScreen
BLAM void DisplayDetailedCrashScreen(const char *expression, const char *file, int line, std::string details)
Displays a detailed engine crash screen.
Definition: render_manage.cpp:443
director.h
BlamRendering::RenderStack::Rectangle::thickness
float thickness
The current border thickness.
Definition: render_stack.h:452
BlamWorldState::GetObjectCount
int GetObjectCount()
Definition: BlamWorldState.cpp:101
get_vertex_color
uint32_t get_vertex_color(int i)
Definition: cylinder.cpp:12
render_clear_flags
int render_clear_flags
Definition: bgfx.cpp:23
y
font DisplayOffset y
Definition: README.txt:68
BlamRendering::BGFX::HandleWindowReisze
BLAM void HandleWindowReisze(int width, int height)
Definition: bgfx.cpp:150
rendering.h
ImGui::DragInt
IMGUI_API bool DragInt(const char *label, int *v, float v_speed=1.0f, int v_min=0, int v_max=0, const char *format="%d")
Definition: imgui_widgets.cpp:2209
BlamRendering::DirectX::UpdateResolution
BLAM HRESULT UpdateResolution(int x, int y)
Changes the DirectX render target resolution.
Definition: resolution.cpp:9
ImGui::SameLine
IMGUI_API void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f)
Definition: imgui.cpp:7147
drawing.h
BLAM
#define BLAM
Definition: primitives.h:6
BlamRendering::GetClearColor
BLAM ImVec4 * GetClearColor()
Retrieves the color used for render target clearing.
Definition: rendering_abstraction.cpp:46
BlamRendering::BGFX::Shutdown
BLAM void Shutdown()
Definition: bgfx.cpp:143
BlamRendering::BGFX::GetRenderHeight
BLAM int GetRenderHeight()
Definition: bgfx.cpp:190
Blam::Director::PrepareCamera
BLAM void PrepareCamera()
Prepares the director for use.
Definition: director.cpp:5
NULL
Add a fourth parameter to bake specific font ranges NULL
Definition: README.txt:57
BlamRendering::BGFX::Primitives::DrawCuboid
BLAM void DrawCuboid(BlamVector3 position, BlamVector3 rotation, BlamVector3 scale)
Renders a cuboid to the screen.
Definition: cuboid.cpp:12
BlamRendering::RenderStack::Rectangle::Draw
void Draw()
Draws the stack object.
Definition: Rectangle.cpp:10
Blam::Globals::GetGlobalAsColor
BLAM BlamColor * GetGlobalAsColor(std::string name)
Retrieves a global's value as a BlamColor.
Definition: globals.cpp:419
BlamRendering::OGRE::Get2DSceneManager
BLAM Ogre::SceneManager * Get2DSceneManager()
Definition: ogre.cpp:395
ImGui::DragFloat
IMGUI_API bool DragFloat(const char *label, float *v, float v_speed=1.0f, float v_min=0.0f, float v_max=0.0f, const char *format="%.3f", float power=1.0f)
Definition: imgui_widgets.cpp:2164
BlamUIWidget::ShowImGuiPropertyEditor
virtual void ShowImGuiPropertyEditor()
Definition: BlamUIWidget.cpp:57
PrimitiveGenericVertex::x
float x
Definition: primitives.h:11
BlamRendering::RenderStack::Rectangle::ShowImPropertyEditor
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: Rectangle.cpp:28
errors.h
shaders.h
BlamRendering::DirectX::HandleWindowResize
BLAM HRESULT HandleWindowResize(LPARAM lParam)
Handles a window resize event.
Definition: render_manage.cpp:306
BlamRendering::BGFX::Primitives::DrawCylinder
BLAM void DrawCylinder(BlamVector3 position, BlamVector3 rotation, BlamVector3 scale, int resolution, int radius_top, int radius_bottom)
Renders a cylinder to the screen.
Definition: cylinder.cpp:28
BlamUIWidget::display_name
std::string display_name
Definition: ui.h:99
Blam::Globals::Float
@ Float
Represents a float.
Definition: globals.h:50
BlamWorldState::GetObjectAtIndex
BlamWorldObject * GetObjectAtIndex(int index)
Definition: BlamWorldState.cpp:122
BlamUIWidget::SetHidden
virtual void SetHidden(bool new_hidden)
Definition: BlamUIWidget.cpp:377
Blam::UI::Render
BLAM void Render()
Definition: ui.cpp:51
BlamUIWidget::SetSize
void SetSize(BlamVector2 new_size)
Definition: BlamUIWidget.cpp:323
bgfx_clear_color
BlamColor * bgfx_clear_color
TODO: remove bgfx_ prefix after opengl code is removed because its technically a global variable XDd.
Definition: bgfx.cpp:22
widgets.h
ImGui::BeginCombo
IMGUI_API bool BeginCombo(const char *label, const char *preview_value, ImGuiComboFlags flags=0)
Definition: imgui_widgets.cpp:1416
ImGui::Selectable
IMGUI_API bool Selectable(const char *label, bool selected=false, ImGuiSelectableFlags flags=0, const ImVec2 &size=ImVec2(0, 0))
Definition: imgui_widgets.cpp:5469
BlamRendering::DirectX::Drawing::DrawRect
BLAM HRESULT DrawRect(D2D1_COLOR_F outline_color, D2D1_COLOR_F fill_color, D2D1_RECT_F rect, float thickness, StackItemDrawMode mode)
Draws a rectangle.
Definition: rect.cpp:9
BlamRendering::BGFX::RenderLoop
BLAM void RenderLoop()
Definition: bgfx.cpp:65
BlamWorldObject::Render
virtual void Render()
Renders the object to the screen.
Definition: BlamWorldObject.cpp:9
Blam::Director::ShutdownCamera
BLAM void ShutdownCamera()
Destroys the director and cleans up any data related to it.
Definition: director.cpp:26
material
Definition: material.h:53
globals.h
uint32_t
unsigned int uint32_t
Definition: stdint.h:17
BlamUIWidget_BasicRectangle::Draw
void Draw() override
Definition: rectangle.cpp:118
BlamRendering::RenderStack::Rectangle::SetThickness
void SetThickness(float new_thickness)
Sets the thickness of the rectangle's border.
Definition: Rectangle.cpp:23
BlamDirector
Class representing the Director.
Definition: director.h:27
BlamUIWidget
Definition: ui.h:82
BlamRendering::DirectX::GetD3DDevice
BLAM ID3D11Device * GetD3DDevice()
Retrieves the current Direct3D device.
Definition: render_manage.cpp:578
NotReady
@ NotReady
Definition: rendering.h:42
file
sock planetquake com All rights reserved Quake III Arena is a registered trademark of id Inc This level may be electronically distributed only at NO CHARGE to the recipient in its current MUST include this txt file
Definition: chiropteraDM.txt:95
view_2d
uint16_t view_2d
The View ID for 2D rendering.
Definition: bgfx.cpp:26
ImGui::EndCombo
IMGUI_API void EndCombo()
Definition: imgui_widgets.cpp:1522
BlamRendering::RenderStack::StackObjectBase::area
D2D1_RECT_F area
The area of the object.
Definition: render_stack.h:369
BlamRendering::BGFX::Shaders::LoadShaderPrograms
BLAM void LoadShaderPrograms()
Loads all shader programs that aren't tag-based.
Definition: shaders.cpp:8
PrimitiveGenericVertex::y
float y
Definition: primitives.h:12
BlamRendering::BGFX::GetRenderWidth
BLAM int GetRenderWidth()
Definition: bgfx.cpp:185
DirectX11
@ DirectX11
Definition: rendering.h:39
height
int height
Definition: bgfx.cpp:20
BlamUIWidget::RefreshRelativePosition
virtual void RefreshRelativePosition()
Definition: BlamUIWidget.cpp:185
ImGui::ColorEdit4
IMGUI_API bool ColorEdit4(const char *label, float col[4], ImGuiColorEditFlags flags=0)
Definition: imgui_widgets.cpp:4154
x
config GlyphExtraSpacing x
Definition: README.txt:30
current_rendering_engine
BlamRenderingEngine current_rendering_engine
Definition: rendering_abstraction.cpp:6
BlamRendering::RenderStack::GetDrawModeLabel
BLAM std::string GetDrawModeLabel(StackItemDrawMode type)
Retrieves a string representation of the specified drawing mode.
Definition: render_stack.cpp:176
imgui.h
core.h
BlamUIWidget::IsHidden
bool IsHidden()
Definition: BlamUIWidget.cpp:382
BlamRendering::BGFX::Get3DViewID
BLAM uint16_t Get3DViewID()
Definition: bgfx.cpp:175
ImGui::Separator
IMGUI_API void Separator()
Definition: imgui_widgets.cpp:1284
BlamWidgetType
BlamWidgetType
Enumerator listing possible UI widget types.
Definition: ui.h:60
config.h
PrimitiveGenericVertex::abgr
uint32_t abgr
Definition: primitives.h:14
Blam::Error::GetStringFromHResult
BLAM std::string GetStringFromHResult(HRESULT hr)
Converts a result handle to a string.
Definition: errors.cpp:120
BlamRendering::OGRE::HandleWindowReisze
BLAM void HandleWindowReisze(int width, int height)
Definition: ogre.cpp:348
BlamUIWidget::auto_update
bool auto_update
Definition: ui.h:108
PrimitiveGenericVertex::z
float z
Definition: primitives.h:13
BlamRendering::BGFX::Initialize
BLAM void Initialize()
Definition: bgfx.cpp:28
BlamUIWidget::position_absolute
BlamVector2 position_absolute
Definition: ui.h:91
BlamUIWidget_BasicRectangle::ShowImGuiPropertyEditor
void ShowImGuiPropertyEditor() override
Definition: rectangle.cpp:153
BlamRendering::BGFX::Get2DViewID
BLAM uint16_t Get2DViewID()
Definition: bgfx.cpp:180
StackItemDrawMode
StackItemDrawMode
Enumerator to specify the stack item draw mode.
Definition: render_stack.h:85
BlamUIWidget::size_absolute
BlamVector2 size_absolute
Definition: ui.h:92
BlamDirector::camera_front
BlamVector3 camera_front
The calculated point representing the front of the camera.
Definition: director.h:81
BGFX
@ BGFX
Definition: rendering.h:40
BlamUIWidget_BasicRectangle::BlamUIWidget_BasicRectangle
BlamUIWidget_BasicRectangle(BlamUIWidget_Group *_parent)
Definition: rectangle.cpp:15
uint16_t
unsigned short uint16_t
Definition: stdint.h:16
BlamShaderProgram::GetProgramHandle
bgfx::ProgramHandle GetProgramHandle()
Definition: BlamShaderProgram.cpp:118
BlamRendering::RenderStack::Rectangle::fill_color
D2D1_COLOR_F fill_color
The current fill color.
Definition: render_stack.h:453
BlamDirector::camera_pos
BlamVector3 camera_pos
The current position of the camera.
Definition: director.h:77
BlamWorldState
Class representing a world state.
Definition: world_objects.h:149
BlamUIWidget_BasicRectangle::~BlamUIWidget_BasicRectangle
~BlamUIWidget_BasicRectangle()
Definition: rectangle.cpp:26
Blam::Settings::Config::IsEngineConfigurationAvailable
BLAM bool IsEngineConfigurationAvailable()
Definition: config.cpp:82
Blam::Globals::GetGlobalAsBoolean
BLAM bool * GetGlobalAsBoolean(std::string name)
Retrieves a global's value as a boolean.
Definition: globals.cpp:347
BlamRendering::BGFX::Shaders::GetShaderProgram
BLAM BlamShaderProgram * GetShaderProgram(std::string id)
Definition: shaders.cpp:16
view_3d
uint16_t view_3d
The View ID for 3D rendering.
Definition: bgfx.cpp:25