Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
6610310
feat: Add spatial force buffer to `SpatialDynamicsScratch` structure
SaltyJoss Jul 26, 2026
8015070
refactor: Removed old Interpreter (DSL) file names
SaltyJoss Jul 26, 2026
ae8bff6
chore: Updated header comments on Analysis files
SaltyJoss Jul 26, 2026
2d898c9
refator: Updated files to use `RigidBody` rather than `Robot` for new…
SaltyJoss Jul 26, 2026
18c2fb4
refator: Updated GUI files to use `RigidBody` rather than `Robot` for…
SaltyJoss Jul 26, 2026
c1f3679
fixes: Correct Core changeover of names (Succesful Build of Core)
SaltyJoss Jul 26, 2026
626ad4d
fixes: Further corrections for GUI and Core changeover (Succesfully B…
SaltyJoss Jul 26, 2026
4daf958
chore: Updated Templates
SaltyJoss Jul 26, 2026
a047e9e
feat: Added external force application methods to RigidBodySystem
SaltyJoss Jul 26, 2026
26060dc
feat: Implemented external force assembly methods in RigidBodySystem
SaltyJoss Jul 26, 2026
02862fd
feat: Enhanced RigidBodySystem with external force handling and link …
SaltyJoss Jul 26, 2026
3c963aa
feat: Added manipulation control and external force handling to Simul…
SaltyJoss Jul 26, 2026
76d836a
fixes: Corrected link name retrieval and refactored external force me…
SaltyJoss Jul 26, 2026
e08d576
fixes: Updated include directive for MathLib and modified `clearExter…
SaltyJoss Jul 26, 2026
451cb00
feat: Add manipulation control and link external force handling in Si…
SaltyJoss Jul 26, 2026
b62242f
feat: Implement link picking and dragging functionality in ViewportWi…
SaltyJoss Jul 26, 2026
0415b64
feat: Added `clearExternalForces` method to ISimulationCore and Simul…
SaltyJoss Jul 26, 2026
ab3a765
feat: Added `clearExternalForces` method to SimulationCore for resett…
SaltyJoss Jul 26, 2026
f50e9d7
feat: Added AABB properties and `linkWorldMinY` method for rigid body…
SaltyJoss Jul 26, 2026
6bd2d96
feat: Added renderable retrieval method to SimulationScene
SaltyJoss Jul 26, 2026
c1ce07d
feat: Calculated AABB bounds for links in MultiBodySystem during build
SaltyJoss Jul 26, 2026
e8d2685
feat: Implemented link highlighting and clear external forces methods…
SaltyJoss Jul 26, 2026
312a906
feat: Enhanced link manipulation with highlighting and force limits i…
SaltyJoss Jul 26, 2026
9d5b9ed
feat: Refactored gravity handling in RigidBodySystem to use Vec3 for …
SaltyJoss Jul 27, 2026
d406284
feat: Refactored gravity handling to use Vec3 for 3D representation i…
SaltyJoss Jul 27, 2026
90392e0
feat: Added gravity handling methods to ISimulationCore and Simulatio…
SaltyJoss Jul 27, 2026
1f31bee
feat: Added gravity accessors and conversion utility in SimulationMan…
SaltyJoss Jul 27, 2026
85bfeb8
feat: Added GravityVectorWidget for 3D gravity vector manipulation in…
SaltyJoss Jul 27, 2026
96ea6da
feat: Added world properties panel to ControlPanelWidget for gravity …
SaltyJoss Jul 27, 2026
6ea7d5c
feat: Implemented QLabel methods for displaying variable names and de…
SaltyJoss Jul 27, 2026
23042fc
fix: Enhanced label formatting in GravityVectorWidget for improved re…
SaltyJoss Jul 27, 2026
bc59e46
feat: Refactored ControlPanelWidget to add timestep selectors and imp…
SaltyJoss Jul 27, 2026
71511c9
feat: Added gravity property to WorkspaceData and updated serialisati…
SaltyJoss Jul 27, 2026
8aee75c
fixes: Correctly integrated `GravityVectorWidget` into ControlPanelWi…
SaltyJoss Jul 27, 2026
8c20aa0
feat: Added gravity vector to RigidBodySnapshot_T and updated casting…
SaltyJoss Jul 27, 2026
7c5b4cf
fix: Added missing tau_g vector initialisation in RigidBodyMetrics re…
SaltyJoss Jul 27, 2026
a1158dd
feat: Added gravity torque vector to DenseDynamicsScratch and updated…
SaltyJoss Jul 27, 2026
7e4a575
fixes: Updated gravity vector reference in computeAccelerations_RNEA …
SaltyJoss Jul 27, 2026
831e21b
fixes: Updated `ABA` to use new spatial scratch gravity vector
SaltyJoss Jul 27, 2026
4385c66
fix: Refactored gravity handling in RigidBodySystem to use updated gr…
SaltyJoss Jul 27, 2026
2f2c682
feat: Added `RigidBodyLoaderJSON` and `RigidBodyLoaderURDF` for JSON …
SaltyJoss Jul 27, 2026
c1dfc87
feat: Added `loadFromURDF` method to RigidBodyLoader for URDF file pa…
SaltyJoss Jul 27, 2026
d0ecb59
feat: Integrated tinyxml2 library using FetchContent in CMakeLists.txt
SaltyJoss Jul 27, 2026
acecc19
refactor: Added a dispatach method for loading bodies
SaltyJoss Jul 27, 2026
e23db69
refactor: Simplified quaternion conversion by removing redundant vari…
SaltyJoss Jul 27, 2026
4abdc0b
feat: Implemented URDF parsing functionality in RigidBodyLoader, incl…
SaltyJoss Jul 27, 2026
322594d
feat: Added RigidBodyLoader implementation for loading URDF and JSON …
SaltyJoss Jul 27, 2026
b0bbfea
refactor: Enhanced URDF mesh path translation and link parsing with m…
SaltyJoss Jul 27, 2026
4fc6031
refactor: Updated RigidBody file loading to use a unified path and lo…
SaltyJoss Jul 27, 2026
070920a
refactor: Moved all existing robot model assets including license, JS…
SaltyJoss Jul 27, 2026
0a0069e
refactor: Updated existing models
SaltyJoss Jul 27, 2026
ca76e61
refactor: Improved control torque saturation logic for better numeric…
SaltyJoss Jul 27, 2026
5762825
refactor: Enhanced URDF joint parsing and logging for improved clarit…
SaltyJoss Jul 27, 2026
c18261d
refactor: Updated LoadCmd constructor to support robot type and impro…
SaltyJoss Jul 27, 2026
59e53a5
refactor: Updated `WorkspaceData` structure with rigid body path and …
SaltyJoss Jul 27, 2026
2315e73
refactor: Normalised string handling in script file operations and im…
SaltyJoss Jul 27, 2026
1d013a0
refactor: Added `currentRigidBodyPath` to SimulationManager for corre…
SaltyJoss Jul 27, 2026
445e3e1
refactor: Updated robot button click handling to use lowercase paths …
SaltyJoss Jul 27, 2026
b882998
refactor: Updated file headers and simplified mesh path handling in M…
SaltyJoss Jul 27, 2026
b95f6e6
refactor: Updated link/joint naming styles
SaltyJoss Jul 27, 2026
e04c7b3
refactor: Added material properties to visual elements in vispa.urdf
SaltyJoss Jul 27, 2026
f51817c
refactor: Added material properties handling for links in URDF loader
SaltyJoss Jul 27, 2026
efaa1e1
refactor: Removed trailing newline in Workspace.h and added logging f…
SaltyJoss Jul 27, 2026
65c2031
refactor: Updated physical device selection in VulkanContext to prior…
SaltyJoss Jul 28, 2026
0009ee0
fixes: Bad include header capitalisation
SaltyJoss Jul 28, 2026
1664ce0
refactor: Updated joint information display in ControlPanelWidget and…
SaltyJoss Jul 28, 2026
5fcb9cf
refactor: Added `RecentItemDelegate` for custom item rendering in Mai…
SaltyJoss Jul 28, 2026
daa5ce4
refactor: Integrated `RecentItemDelegate` for improved item rendering…
SaltyJoss Jul 28, 2026
d04b6f4
feat: Added cube robot model with visual and inertial properties
SaltyJoss Jul 29, 2026
b252e9f
refactor: Corrected enum values and added missing mappings for roboti…
SaltyJoss Jul 29, 2026
0be6bc4
refactor: Added free-joint states to `RigidBodyJoint` struct for enha…
SaltyJoss Jul 30, 2026
bb1dcf7
refactor: Added joint degree of freedom calculations and quaternion c…
SaltyJoss Jul 30, 2026
569b634
refactor: Added joint state offset and total degrees of freedom metho…
SaltyJoss Jul 30, 2026
594385c
refactor: Moved joint degrees of freedom function to `RigidBodyModel.…
SaltyJoss Jul 30, 2026
5749070
refactor: Updated state vector handling for joint dynamics to accommo…
SaltyJoss Jul 30, 2026
acefc77
refactor: Updated snapshot handling and joint state updates for varia…
SaltyJoss Jul 30, 2026
5e78796
refactor: Added comment to clarify the purpose of `nfDOF` in `Spatial…
SaltyJoss Jul 30, 2026
ba40d63
refactor: Set degrees of freedom for joint types in `RigidBodySystem`
SaltyJoss Jul 30, 2026
efc1434
refactor: Update pxmlib version to v1.0.2 in CMakeLists.txt
SaltyJoss Jul 31, 2026
e6674c2
refactor: Add additional buffers for joint dynamics in `DenseDynamics…
SaltyJoss Jul 31, 2026
faaa9ea
refactor: Updated spatial dynamics computations with additional outpu…
SaltyJoss Jul 31, 2026
6c9b5ae
refactor: Updated joint DOF computation to use systems namespace
SaltyJoss Jul 31, 2026
11101a1
feat: Added joint reference orientation to SpatialJoint struct and lo…
SaltyJoss Jul 31, 2026
4a242fc
feat: Stored free joint reference orientation in SpatialJoint during …
SaltyJoss Jul 31, 2026
ea25288
feat: Implemented `resetRigidBody` method to clear rigid body state a…
SaltyJoss Jul 31, 2026
415e723
feat: Added `resetRigidBody` method to reset the rigid body system to…
SaltyJoss Jul 31, 2026
d29181c
feat: Added callback to core's `resetRigidBody` functionality to Simu…
SaltyJoss Jul 31, 2026
4a4cac6
feat: Added `resetRigidBody` method and menu action to MainWindow for…
SaltyJoss Jul 31, 2026
4e289d8
fixes: Corrected material RGBA value in cube.urdf and added scale att…
SaltyJoss Jul 31, 2026
524e57b
feat: Added missing fields `nfDOF` and `free_qref` to `SpatialModel` …
SaltyJoss Jul 31, 2026
18f5c38
fixes: Corrected index usage for torque assignment and added missing …
SaltyJoss Jul 31, 2026
3a2fccd
refactor(For previous commit): Updated free-joint spatial transform t…
SaltyJoss Jul 31, 2026
5a5d8cb
feat: Updated URDF loading by synthesizing FREE joints for single fre…
SaltyJoss Jul 31, 2026
411ae5c
chore(WIP): Comment out base pose update logic for free-floating bodi…
SaltyJoss Jul 31, 2026
bc6d5a8
feat: Added `hasFreeJoint` method to check for free-floating joints i…
SaltyJoss Jul 31, 2026
2d7ae64
feat: Added check for free-floating joints in `trajSet` command execu…
SaltyJoss Jul 31, 2026
12d170f
feat: Added methods to get and set free-floating joint velocities in …
SaltyJoss Aug 1, 2026
a68d959
feat: Implemented `SetVelocityCmd` for setting velocities of free bodies
SaltyJoss Aug 1, 2026
3ef79ec
feat: Registered `SetVelocityCmd` in command factory
SaltyJoss Aug 1, 2026
21df0a5
feat: Added support for `setvelocity` command in identifier checks
SaltyJoss Aug 1, 2026
2793374
feat: Added `parseSpatialMask` function to interpret spatial masks fo…
SaltyJoss Aug 1, 2026
ed8504a
refactor: Renamed `omega` to `velocity` and update SetTarget structur…
SaltyJoss Aug 1, 2026
a73dbb1
refactor: Renamed `setOmega` to `setAngularVel` and add `setVelocity`…
SaltyJoss Aug 1, 2026
fb35214
feat: Added `parseSpatialMask` function to enhance spatial mask inter…
SaltyJoss Aug 1, 2026
bf896df
refactor: Renamed `stopAllOmega` to `stopAllVel` for consistency in t…
SaltyJoss Aug 1, 2026
9b0724a
fixex: Updated `computeArticulatedBodies_ABA` to add missing continue…
SaltyJoss Aug 1, 2026
d90dfb9
feat: Added "setVelocity" command to syntax highlighter for enhanced …
SaltyJoss Aug 1, 2026
1d5a0f1
refactor: Reordered parameters in SetVelocityCmd constructor and upda…
SaltyJoss Aug 1, 2026
7638b69
fixes: Adjusted acceleration computation for free joints and added lo…
SaltyJoss Aug 1, 2026
df88c97
fixes: Corrected order of angular and linear mask parsing in parseSpa…
SaltyJoss Aug 1, 2026
4e2af4d
refactor: Commented out logging for free joint positions and enhance …
SaltyJoss Aug 1, 2026
40fa04f
refactor: Reverted previous spatialparameter change in SetVelocityCmd…
SaltyJoss Aug 1, 2026
b03c96a
fixes: Corrected order of free joint position and rotation vector in …
SaltyJoss Aug 1, 2026
e44d14a
fixes: Corrected order of free joint position and rotation vector in …
SaltyJoss Aug 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ FetchContent_MakeAvailable(eigen)
FetchContent_Declare(
pxmlib
GIT_REPOSITORY https://github.com/SaltyJoss/PxM-Lib.git
GIT_TAG v1.0.1
GIT_TAG v1.0.2
)
FetchContent_MakeAvailable(pxmlib)

Expand Down
91 changes: 57 additions & 34 deletions DSFE_App/DSFE_Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,24 @@
cmake_minimum_required(VERSION 3.17)
project(DSFE_Core LANGUAGES C CXX)

include(FetchContent)

set(tinyxml2_BUILD_TESTING OFF CACHE BOOL "" FORCE)
set(TINYXML2_BUILD_TESTING OFF CACHE BOOL "" FORCE)
FetchContent_Declare(
tinyxml2
GIT_REPOSITORY https://github.com/leethomason/tinyxml2.git
GIT_TAGE 11.0.0
SOURCE_SUBDIR nonexistent-dir-to-skip-their-cmake
)
FetchContent_MakeAvailable(tinyxml2)

add_library(DSFE_Core SHARED)

# Compile tinyxml2.cpp straight into DSFE_Core — no subproject, no .pc, no tests
target_sources(DSFE_Core PRIVATE ${tinyxml2_SOURCE_DIR}/tinyxml2.cpp)
target_include_directories(DSFE_Core PRIVATE ${tinyxml2_SOURCE_DIR})

find_package(Threads REQUIRED)
find_package(HDF5 REQUIRED)

Expand Down Expand Up @@ -32,17 +48,22 @@ set(DEP_CORE_SRC
src/Numerics/IntegrationService.cpp
)

set(SINGLE_BODY_SYS_SRC
set(LOADING_SRC
src/Systems/RigidBodyLoader.cpp
src/Systems/RigidBodyLoaderJSON.cpp
src/Systems/RigidBodyLoaderURDF.cpp
)

set(SYSTEMS_SRC
src/Systems/RigidBodySystem.cpp
src/Systems/TrajectoryManager.cpp
src/Systems/RigidBodySnapshot.cpp
src/SingleBodySystem/Body.cpp
)

set(MULTI_BODY_SYS_SRC
src/Robots/RobotDynamics.cpp
src/Robots/RobotKinematics.cpp
src/Robots/RobotLoader.cpp
src/Robots/RobotSystem.cpp
src/Robots/TrajectoryManager.cpp
src/Robots/RobotSimSnapshot.cpp
set(PHYSICS_SRC
src/Physics/RigidBodyDynamics.cpp
src/Physics/RigidBodyKinematics.cpp
)

set(PLATFORM_SRC
Expand All @@ -54,39 +75,41 @@ set(PLATFORM_SRC
)

set(DSL_SRC
src/Interpreter/Command.cpp
src/Interpreter/CommandContext.cpp
src/Interpreter/CommandFactory.cpp
src/Interpreter/Parser.cpp
src/Interpreter/RegisterCommand.cpp
src/Interpreter/StoredProgram.cpp
src/Interpreter/Utils.cpp
src/Interpreter/RunWrapper.cpp

src/Interpreter/Commands/LoadCmd.cpp
src/Interpreter/Commands/ParallelGroupCmd.cpp
src/Interpreter/Commands/RotateByCmd.cpp
src/Interpreter/Commands/RotateJointByCmd.cpp
src/Interpreter/Commands/RotateJointToCmd.cpp
src/Interpreter/Commands/RotateToCmd.cpp
src/Interpreter/Commands/SelectCmd.cpp
src/Interpreter/Commands/SetCmd.cpp
src/Interpreter/Commands/SetOmegaCmd.cpp
src/Interpreter/Commands/SpinCmd.cpp
src/Interpreter/Commands/StartCmd.cpp
src/Interpreter/Commands/StopCmd.cpp
src/Interpreter/Commands/TrajClearCmd.cpp
src/Interpreter/Commands/TrajSetCmd.cpp
src/Interpreter/Commands/WaitCmd.cpp
src/DSL/Command.cpp
src/DSL/CommandContext.cpp
src/DSL/CommandFactory.cpp
src/DSL/Parser.cpp
src/DSL/RegisterCommand.cpp
src/DSL/StoredProgram.cpp
src/DSL/Utils.cpp
src/DSL/RunWrapper.cpp

src/DSL/Commands/LoadCmd.cpp
src/DSL/Commands/ParallelGroupCmd.cpp
src/DSL/Commands/RotateByCmd.cpp
src/DSL/Commands/RotateJointByCmd.cpp
src/DSL/Commands/RotateJointToCmd.cpp
src/DSL/Commands/RotateToCmd.cpp
src/DSL/Commands/SelectCmd.cpp
src/DSL/Commands/SetCmd.cpp
src/DSL/Commands/SetOmegaCmd.cpp
src/DSL/Commands/SetVelocityCmd.cpp
src/DSL/Commands/SpinCmd.cpp
src/DSL/Commands/StartCmd.cpp
src/DSL/Commands/StopCmd.cpp
src/DSL/Commands/TrajClearCmd.cpp
src/DSL/Commands/TrajSetCmd.cpp
src/DSL/Commands/WaitCmd.cpp
)

set(SIM_CORE_SRC src/Scene/SimulationCore.cpp)

# Add sources for DSFE_Core, including ImGui files
target_sources(DSFE_Core PRIVATE
${DEP_CORE_SRC}
${SINGLE_BODY_SYS_SRC}
${MULTI_BODY_SYS_SRC}
${SYSTEMS_SRC}
${LOADING_SRC}
${PHYSICS_SRC}
${PLATFORM_SRC}
${DSL_SRC}
${SIM_CORE_SRC}
Expand Down
6 changes: 5 additions & 1 deletion DSFE_App/DSFE_Core/include/Analysis/MetricLogger.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
/*
* File: Analysis/MetricLogger.h
* Created by: Joss Salton, 26-07-2026
*/
#pragma once
#include "EngineCore.h"
#include <vector>
#include <string>

namespace robots {
namespace systems {
// Struct for logging joint data each step (for later analysis)
struct JointLogBuffer {
// Sim Metadata
Expand Down
13 changes: 8 additions & 5 deletions DSFE_App/DSFE_Core/include/Analysis/Telemetry.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// DSFE_Core Telemetry.h
/*
* File: Analysis/Telemetry.h
* Created by: Joss Salton, 26-07-2026
*/
#pragma once

#include "EngineCore.h"
Expand All @@ -11,7 +14,7 @@
#include "Platform/Logger.h"
#include "EngineLib/LogMacros.h"

namespace robots { class RobotSystem; }
namespace systems { class RigidBodySystem; }
namespace control { class TrajectoryManager; }

namespace diagnostics {
Expand Down Expand Up @@ -134,13 +137,13 @@ namespace diagnostics {
}

// Update method to be called each simulation step
void update(double simTime, const robots::RobotSystem& robotSys, const control::TrajectoryManager* trajOpt = nullptr, eTelemetryLevel level = eTelemetryLevel::NONE) {
void update(double simTime, const systems::RigidBodySystem& sys, const control::TrajectoryManager* trajOpt = nullptr, eTelemetryLevel level = eTelemetryLevel::NONE) {
if (level == eTelemetryLevel::NONE) { return; }

// Record samples at the specified frequency
while (simTime >= _next_t) {
// Record telemetry data
record(_next_t, robotSys, trajOpt, level);
record(_next_t, sys, trajOpt, level);
_next_t += _T;
}
}
Expand All @@ -150,7 +153,7 @@ namespace diagnostics {

private:
// Record telemetry data at time t
void record(double t, const robots::RobotSystem& robotSys, const control::TrajectoryManager* trajOpt, eTelemetryLevel level);
void record(double t, const systems::RigidBodySystem& sys, const control::TrajectoryManager* trajOpt, eTelemetryLevel level);

// Sampling parameters
double _fs = 60.0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// DSFE_Core Command.h
/*
* File: DSL/Command.h
* Created by: Joss Salton, 26-07-2026
*/
#pragma once
#include "EngineCore.h"
#include "ICommand.h"
#include "MainContext.h"

using namespace interpreter;
#include "DSL/ICommand.h"
#include "DSL/MainContext.h"

namespace commands {
// Class representing a generic command
Expand All @@ -13,19 +14,19 @@ namespace commands {
// Set the command context
void setContext(CommandContext& cntx) override { _cntx = &cntx; }

program_data::CmdResult update(CommandContext& cntx, double dt) override;
dsl::CmdResult update(CommandContext& cntx, double dt) override;

void execute() override;

void markFailed(const std::string& message) override;
void markCompleted() override;
bool hasStarted() const override;

interpreter::IStoredProgram* getProgram() const override { return _program; }
void setProgram(interpreter::IStoredProgram* program) override { _program = program; }
dsl::IStoredProgram* getProgram() const override { return _program; }
void setProgram(dsl::IStoredProgram* program) override { _program = program; }

protected:
IStoredProgram* _program = nullptr;
dsl::IStoredProgram* _program = nullptr;
CommandContext* _cntx = nullptr;
};
} // namespace commands
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// DSFE_Core CommandContext.h
/*
* File: DSL/CommandContext.h
* Created by: Joss Salton, 26-07-2026
*/
#pragma once

#include "EngineCore.h"
#include "SimFwd.h"
#include "Interpreter/Utils.h"
#include "DSL/SimFwd.h"
#include "DSL/Utils.h"

#include "Platform/Logger.h"

Expand Down Expand Up @@ -35,8 +38,7 @@ namespace commands {
// --- INITIALISATION METHODS ---
utils::OpResult startSim();
utils::OpResult setFixedDt(double dt);
utils::OpResult loadSingleBody(const std::string& bodyName);
utils::OpResult loadMultibody(const std::string& bodyName);
utils::OpResult loadRigidBody(const std::string& bodyName);

// --- GLOBAL STATE METHODS ---

Expand All @@ -50,15 +52,15 @@ namespace commands {
// Gets the current omega clamp value
double getOmegaClamp() const;

// Stops all angular velocity for the robot
utils::OpResult stopAllOmega(); // stops all angular velocity
// Stops all angular velocity for the body
utils::OpResult stopAllVel(); // stops all angular velocity

utils::OpResult setJointOmega(const std::string& childLink, double omegaDegPerSec); // deg/s
utils::OpResult stopJointOmega(const std::string& childLink);

// --- HELPER METHODS ---
core::ISimulationCore* Core() const;
robots::RobotSystem& Robot() const;
systems::RigidBodySystem& RigidBody() const;


// --- ROTATION COMMAND METHODS ---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
// DSFE_Core CommandFactory.h
/*
* File: DSL/CommandFactory.h
* Created by: Joss Salton, 26-07-2026
*/
#pragma once

#include "EngineCore.h"
#include "ICommand.h"
#include "DSL/ICommand.h"
#include <unordered_map>
#include <functional>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
// DSFE_Core LoadCmd.h
/*
* File: DSL/Commands/LoadCmd.h
* Created by: Joss Salton, 26-07-2026
*/
#pragma once

#include "EngineCore.h"
#include <core/Types.h>

#include "Interpreter/Command.h"
#include "Interpreter/CommandContext.h"
#include "DSL/Command.h"
#include "DSL/CommandContext.h"

namespace commands {
// Enum for load target type
enum class LoadTargetType {
SingleBody,
MultiBody
RigidBody
};

// Struct for load target
struct DSFE_API LoadTarget {
LoadTargetType type = LoadTargetType::SingleBody;
LoadTargetType type = LoadTargetType::RigidBody;
std::string path;
};

Expand All @@ -29,18 +31,18 @@ namespace commands {
// Get the command name
std::string_view getName() const { return "load"; }

program_data::CmdResult getResult() const { return _result; }
void setResult(const program_data::CmdResult& result) { _result = result; }
CmdResult getResult() const { return _result; }
void setResult(const CmdResult& result) { _result = result; }

// Get current result
program_data::CmdResult currentResult() const override { return getResult(); }
CmdResult currentResult() const override { return getResult(); }

// Execute the command
void execute() override;

private:
LoadTarget _target{};
program_data::CmdResult _result = { CmdState::NotStarted, {}, "" };
CmdResult _result = { CmdState::NotStarted, {}, "" };
std::string _path;

protected:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
// DSFE_Core ParallelGroupCmd.h
/*
* File: DSL/Commands/ParallelGroupCmd.h
* Created by: Joss Salton, 26-07-2026
*/
#pragma once

#include "EngineCore.h"
#include <memory>
#include <vector>

#include "Interpreter/Command.h"
#include "DSL/Command.h"

namespace commands {
class DSFE_API ParallelGroupCmd final : public Command {
Expand Down
Loading
Loading