|
cangine
|
Namespaces | |
| namespace | Colors |
| Predefined commonly used opaque colors. | |
| namespace | Exception |
| Exception types thrown by the engine. | |
Classes | |
| class | AudioManager |
| Singleton class that manages audio playback. More... | |
| class | Button |
| Clickable button game object with a text label. More... | |
| class | ButtonComponent |
| Component providing clickable-button behavior and visuals. More... | |
| class | Camera |
| Game object representing the scene camera. More... | |
| class | CameraComponent |
| Component marking its game object as the active camera. More... | |
| class | CangineApp |
| Base application class that owns the window and main loop. More... | |
| struct | Character |
| A single cached glyph: its texture and layout metrics. More... | |
| struct | Color |
| RGBA color stored as normalized floating-point components. More... | |
| struct | Dimensions |
| Holds an integer width/height pair. More... | |
| class | EBO |
| Wraps an OpenGL Element Buffer Object (index buffer). More... | |
| struct | Font |
| A loaded font face plus its cache of rasterized glyphs. More... | |
| class | GameObject |
| Base class for everything that lives in the scene. More... | |
| class | IComponent |
| Base interface for all components attached to a GameObject. More... | |
| class | Input |
| Static facade for keyboard input queries and event handlers. More... | |
| class | InputField |
| Editable text-field game object. More... | |
| class | InputFieldComponent |
| Editable single-line text input field. More... | |
| struct | KeyEvent |
| A keyboard event: which key and what happened to it. More... | |
| class | Label |
| Convenience game object that displays a line of text. More... | |
| class | Mouse |
| Singleton tracking mouse state and dispatching mouse events. More... | |
| struct | MouseEvent |
| A mouse event carrying its type, button, position and scroll offset. More... | |
| class | ObjectManager |
| Singleton registry that owns and updates all game objects. More... | |
| class | Panel |
| Container game object that groups and positions child objects. More... | |
| struct | PanelChild |
| A child object of a panel together with its offset from the panel. More... | |
| class | PanelComponent |
| Container component that positions child objects relative to itself. More... | |
| class | Position |
| Helper for converting screen-space positions into normalized device coordinates. More... | |
| class | PrimitiveRenderer |
| Batches and draws untextured geometric primitives. More... | |
| class | QuadRenderer |
| Batched renderer for textured quads (rectangles). More... | |
| class | QuadRendererComponent |
| Component that draws its game object as a textured rectangle. More... | |
| struct | Rectangle |
| An axis-aligned rectangle with a position, size and color. More... | |
| class | RenderSystem |
| Singleton aggregating the engine's renderers. More... | |
| class | Shader |
| Wraps a compiled and linked OpenGL shader program. More... | |
| struct | Sound |
| Describes an audio source: its file path, name and volume. More... | |
| class | TextRenderer |
| Singleton that loads fonts and renders text via FreeType. More... | |
| class | TextRendererComponent |
| Component that renders a text string, optionally over a background. More... | |
| class | Texture |
| Wraps an OpenGL texture object. More... | |
| class | Transform |
| Component holding an object's position, rotation and scale. More... | |
| struct | Triangle |
| A triangle defined by three vertices. More... | |
| class | VAO |
| Wraps an OpenGL Vertex Array Object. More... | |
| class | VBO |
| Wraps an OpenGL Vertex Buffer Object. More... | |
| struct | Vector2 |
| Two-component floating-point vector. More... | |
| struct | Vector3 |
| Three-component floating-point vector. More... | |
| struct | Vertex |
| A single renderable vertex: position, color and texture coordinate. More... | |
| class | Window |
| Owns the application window, OpenGL context and the frame loop. More... | |
Functions | |
| void | init () |
| Initializes engine-wide state (must be called before use). | |
| void | terminate () |
| Tears down engine-wide state. | |
| Key | translateGLFWKey (int key) |
| Translates a raw GLFW key code into a Key. | |
| KeyEventType | getKeyEventType (int glfwKeyEvent) |
| Translates a raw GLFW key action into a KeyEventType. | |
| Vector2 | _getCursorPos (GLFWwindow *window) |
| void | resizeCallback (GLFWwindow *window, int w, int h) |
| GLFW framebuffer resize callback. | |
| std::vector< uint32_t > | utf8_to_codepoints (const std::string &str) |
| Decodes a UTF-8 string into a list of Unicode codepoints. | |
| constexpr bool | operator>> (const Vector2 &vec, const Rectangle &rect) noexcept |
| Point-in-rectangle test (axis-aligned, untransformed). | |
| constexpr bool | operator>> (const Rectangle &rect, const Vector2 &vec) noexcept |
| Point-in-rectangle test with reversed operand order. | |
| constexpr bool | operator>> (const Rectangle &r1, const Rectangle &r2) noexcept |
| Axis-aligned overlap test between two rectangles. | |
| Triangle | makeTriangle (const Vector3 &a, const Vector3 &b, const Vector3 &c, const Color &color) noexcept |
| Builds a triangle from three positions sharing a single color. | |
| std::array< Triangle, 2 > | rectToTriangle (const Rectangle &r) noexcept |
| Splits a rectangle into the two triangles that cover it. | |
Variables | |
| Mouse * | mouse = nullptr |
CameraComponent and CameraObject is bascially a singleton and does nothing. Camera game objects adds Camera to itself automatically just to tell the engine
That's basically it.
Actual camera behaviour is implemented in "utils/position.cpp"
Panel offsets it's position to children.
Label is just putting TextRendererComponent to itself but makes easier to initialize it and saves you from writing more code.
|
strong |
Platform-independent keyboard key identifiers.
GLFW key codes are translated into these values so engine code does not depend on the windowing backend.
|
strong |
|
strong |
Mouse button identifiers, with named aliases for the common three.
|
strong |
| Vector2 cangine::_getCursorPos | ( | GLFWwindow * | window | ) |
| KeyEventType cangine::getKeyEventType | ( | int | glfwKeyEvent | ) |
Translates a raw GLFW key action into a KeyEventType.
| glfwKeyEvent | GLFW key action code. |
| void cangine::init | ( | ) |
Initializes engine-wide state (must be called before use).
|
inlinenoexcept |
Builds a triangle from three positions sharing a single color.
| a | First corner position. |
| b | Second corner position. |
| c | Third corner position. |
| color | Color applied to all three vertices. |
|
inlineconstexprnoexcept |
Axis-aligned overlap test between two rectangles.
| r1 | First rectangle. |
| r2 | Second rectangle. |
true if the rectangles overlap (ignoring rotation/scale).
|
inlineconstexprnoexcept |
Point-in-rectangle test with reversed operand order.
| rect | Axis-aligned rectangle. |
| vec | Point to test. |
true if the point is within the rectangle bounds.
|
inlineconstexprnoexcept |
Point-in-rectangle test (axis-aligned, untransformed).
| vec | Point to test. |
| rect | Axis-aligned rectangle centered on rect.pos. |
true if the point is within the rectangle bounds. Splits a rectangle into the two triangles that cover it.
| r | Rectangle to triangulate. |
| void cangine::resizeCallback | ( | GLFWwindow * | window, |
| int | w, | ||
| int | h | ||
| ) |
GLFW framebuffer resize callback.
| window | Window that was resized. |
| w | New framebuffer width in pixels. |
| h | New framebuffer height in pixels. |
| void cangine::terminate | ( | ) |
Tears down engine-wide state.
| Key cangine::translateGLFWKey | ( | int | key | ) |
Translates a raw GLFW key code into a Key.
| key | GLFW key code. |
| std::vector< uint32_t > cangine::utf8_to_codepoints | ( | const std::string & | str | ) |
Decodes a UTF-8 string into a list of Unicode codepoints.
| str | UTF-8 encoded string. |
| Mouse* cangine::mouse = nullptr |