Expand description
§Haggis 3D Engine
A modern 3D rendering and simulation engine built on wgpu and winit.
§Features
- Modern Graphics Pipeline: Physically-based rendering (PBR) with shadow mapping
- Flexible Simulation Framework: Support for both CPU and GPU compute simulations
- Interactive UI: Runtime controls using Dear ImGui
- Resource Management: Efficient handling of textures, materials, and GPU buffers
- Camera System: Orbit camera with smooth controls
- Cross-Platform: Runs on Windows, macOS, and Linux
§Quick Start
use haggis;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut app = haggis::default();
// Add a 3D object to the scene
app.add_object("model.obj")
.with_transform([0.0, 0.0, 0.0], 1.0, 0.0);
// Set up custom UI
app.set_ui(|ui, scene, _selected| {
ui.window("Controls").build(|| {
ui.text("Welcome to Haggis!");
});
});
// Run the application
app.run();
Ok(())
}§Architecture
The engine is organized into several key modules:
app- Main application lifecycle and event handlinggfx- Graphics rendering, camera system, and scene managementprelude- Common imports and types for convenient usagesimulation- CPU and GPU simulation frameworkui- User interface system using Dear ImGuivisualization- Modular visualization system for 3D datawgpu_utils- Utility functions for wgpu resource management
Re-exports§
pub use app::HaggisApp;pub use ui::UiFont;pub use ui::UiStyle;pub use visualization::CutPlane2D;pub use visualization::VisualizationComponent;pub use visualization::VisualizationManager;
Modules§
- app
- Application Module
- gfx
- Graphics Module
- performance
- Performance Metrics System
- prelude
- Haggis Prelude
- simulation
- Simulation Module
- ui
- User Interface Module
- visualization
- Visualization Module
- wgpu_
utils - WGPU Utilities Module
Macros§
- impl_
gpu_ data - Helper macro to implement GpuData for structs
- time_
section - Convenience macros for timing simulation code
Functions§
- default
- Creates a default Haggis application instance.