DSM Samples¶
This section presents two real-world applications that demonstrate DSM modeling patterns at different scales and design philosophies.
Application |
Pattern |
Description |
|---|---|---|
Recommended (multi-attachment) |
Graph topology editor with 5 DSM files. Demonstrates best practices with multiple attachments per concept, separating concerns cleanly. |
|
Single-attachment (translated from C++) |
Professional 3D visualization with 20 DSM files. Production-scale example showing materials, lighting, cameras, and animation. |
Pattern Comparison¶
Recommended Pattern (Graph Editor)
Each concept uses multiple attachments to separate concerns:
// Topology is separate from selection, which is separate from rendering
attachment<Graph, GraphTopology> topology;
attachment<Graph, GraphSelection> selection;
attachment<Vertex, Vertex2DAttributes> render2DAttributes;
attachment<Vertex, VertexVisualAttributes> visualAttributes;
Benefits:
Adding a new concern (e.g.,
physicsAttributes) requires zero migrationEach attachment is optional and independent
A Vertex can exist without render attributes (topology-only)
Single-Attachment Pattern (Raptor Editor)
Each concept has a single monolithic properties attachment:
attachment<Camera, CameraProperties> properties;
attachment<Material, MaterialProperties> properties;
Trade-offs:
Simpler initial design
Harder to evolve: adding optional features requires struct changes
All properties bundled together even when some are unused
Note
New projects should follow the recommended pattern. The single-attachment pattern is documented here because it demonstrates how DSM can adapt to an existing C++ codebase.
- Graph Editor
- Raptor Editor
- Overview
- Pool_Surfaces.dsm
- Pool_Tools.dsm
- Raptor_BezierPath.dsm
- Raptor_Camera.dsm
- Raptor_ClippingPlane.dsm
- Raptor_Configuration.dsm
- Raptor_Environment.dsm
- Raptor_Iray.dsm
- Raptor_Kinematics.dsm
- Raptor_Library.dsm
- Raptor_Lighting.dsm
- Raptor_Material.dsm
- Raptor_Math.dsm
- Raptor_Mesh.dsm
- Raptor_Model.dsm
- Raptor_Product.dsm
- Raptor_Sensor.dsm
- Raptor_Surface.dsm
- Raptor_Texture.dsm
- Raptor_Timeline.dsm