How cmu-graphics/scotty3d works
Main Components
a) Core Application Layer:
• Entry point (src/main.cpp, src/app.cpp)
• GUI System (src/gui/*)
• Scene Management (src/scene/*)
b) Major Functional Modules:
• Geometry Processing (src/geometry/*)
• Rasterization Pipeline (src/rasterizer/*)
• Path Tracer (src/pathtracer/*)
• Animation System (src/scene/animator.*, src/scene/skeleton.*)
c) Support Systems:
• Platform Layer (src/platform/*)
• Math Library (src/lib/*)
• Utility Functions (src/util/*)
Component Relationships
[GUI Layer] ←→ [Scene Management]
• ↑ ↑
• ↓ ↓
[Core Application Logic]
• ↑ ↑ ↑ ↑
[Geometry] [Rasterizer] [PathTracer] [Animation]
• ↑ ↑ ↑ ↑
[Math Library & Utilities]
• ↑
[Platform Layer]
Specific Implementation Details
a) Scene Graph Structure:
• How scene/scene.h manages the hierarchy of:
• Meshes (geometry/halfedge.h)
• Materials (scene/material.h)
• Lights (scene/delta_light.h, scene/env_light.h)
• Cameras (scene/camera.h)
b) Pipeline Flow:
• Rendering pipeline from:
• Scene data → Rasterizer → Framebuffer
• Scene data → Path Tracer → Final Image
c) Animation System:
• Relationship between:
• Skeleton system (scene/skeleton.h)
• Particle system (scene/particles.h)
• Animation controller (scene/animator.h)
External Dependencies
• ImGui (UI framework)
• SDL (platform abstraction)
• OpenGL (rendering backend)
Testing Framework
• How it interfaces with each major component
Build System
• A small section showing the build pipeline:
• Maekfile.js
• nest-libs dependencies
• Platform-specific compilation