Headers and entry points
Fx2D is a C++20 static library. Include the narrowest public header that fits the job; every public header lives under include/Fx2D/.
Pick the top-level include
Visual YAML application
cpp
#include "Fx2D/Core.h"Core.h is the convenience include for a complete visual application. It brings in the scene, YAML builder, and raylib/ImGui renderer. It therefore requires a non-headless build.
Headless YAML application
cpp
#include "Fx2D/Scene.h"
#include "Fx2D/YamlUtils.h"This is the right split for testing, simulation, or data collection. It can load a Scene.yml, but does not include raylib, Dear ImGui, or rlImGui.
Programmatic simulation
cpp
#include "Fx2D/Scene.h"
#include "Fx2D/Entity.h"Add Geometry.h when constructing shapes explicitly, and Joints.h when creating joints in C++.
Public header map
| Header | Provides | Use it for |
|---|---|---|
Core.h | Scene + YAML + renderer | The all-in-one visual entry point. |
Scene.h | FxScene, groups, contact events, queries | Owning and stepping a physics world. |
Entity.h | FxEntity, FxVisualShape | Bodies, material properties, forces, and impulses. |
Geometry.h | FxShape, FxAABB, FxRayHit | Circles, capsules, polygons, chains, and query data. |
Joints.h | FxJoint, revolute/prismatic joints | Constraints and motor control. |
YamlUtils.h | FxYAML::buildScene and builders | Loading YAML scenes or pieces of a scene. |
Renderer.h | FxRylbRenderer | Window, camera, input polling, and draw callbacks. |
Input.h | FxInput, FxKey, FxMouseButton | Renderer-agnostic input and headless input injection. |
Math.h | FxVec*, FxMat*, FxArray | Engine math types and shape construction data. |
Direct type routes
The generated API opens directly to these core types:
- FxScene — simulation, callbacks, contacts, queries, and groups.
- FxEntity — rigid body state and forces.
- FxShape — the unified collision shape.
- FxRylbRenderer — visual loop and transforms.
- FxRevoluteJoint and FxPrismaticJoint — motorized joints.
These links stay on the symbol route; they do not redirect to the docs landing page.