# danrehberg/cs462_assignments architecture

> Architecture diagram of the GitHub repository danrehberg/cs462_assignments, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/danrehberg/cs462_assignments
- Repository: https://github.com/danrehberg/cs462_assignments

## Overview

This repository is a set of Unity course assignments, not one integrated application. A student opens an assignment scene and studies or runs a graphics, collision-detection, or NPC behavior demonstration. The README describes normal mapping as P2, while the tree places normal-map shaders in A0_LightsOn; no separate P2 runtime project is present. Relationships are limited to documented behavior and asset organization because no source excerpts were provided.

Main entry points: [`P3_FiniteStateMachineAI/Assets/Scenes/Library.unity`](https://github.com/danrehberg/cs462_assignments/blob/main/P3_FiniteStateMachineAI/Assets/Scenes/Library.unity) (Library Scene), [`A0_LightsOn/Assets/Scenes/DiffuseLighting.unity`](https://github.com/danrehberg/cs462_assignments/blob/main/A0_LightsOn/Assets/Scenes/DiffuseLighting.unity) (Diffuse Scene), [`P1_DiscreteCollisions/Assets/Scenes/CollisionScene.unity`](https://github.com/danrehberg/cs462_assignments/blob/main/P1_DiscreteCollisions/Assets/Scenes/CollisionScene.unity) (Collision Scene), [`A0_LightsOn/Assets/Scenes/NormalMapLighting.unity`](https://github.com/danrehberg/cs462_assignments/blob/main/A0_LightsOn/Assets/Scenes/NormalMapLighting.unity) (Normal Map Scene)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_graphics["Graphics Assignments"]
  node_diffuse_scene["Diffuse Scene"]
  node_diffuse_shaders["Diffuse Shaders<br/>[Dir.shader]"]
  node_light_controllers["Light Controllers<br/>[Direction_Light.cs]"]
  node_normal_scene["Normal Map Scene"]
  node_normal_shaders["Normal Map Shaders<br/>[DirTBN.shader]"]
end

subgraph group_collision["Collision Assignment"]
  node_collision_scene["Collision Scene"]
  node_broad_shape["Broad Shapes<br/>[BroadShape.cs]"]
  node_collision_tests["Collision Algorithms<br/>[CollisionTests.cs]"]
end

subgraph group_grading["Grading Assistant"]
  node_grading_scenes["Grading Scenes<br/>[A0Assist.unity]"]
  node_grading_logic["Grading Logic<br/>[Grading.cs]"]
  node_p1_grading["P1 Grading<br/>[P1_Grading.cs]"]
end

subgraph group_ai["NPC AI"]
  node_library_scene["Library Scene<br/>[Library.unity]"]
  node_student_agent["Student Agent<br/>[Student.cs]"]
  node_librarian_agent["Librarian Agent<br/>[Librarian.cs]"]
  node_book_model["Book Model<br/>[Book.cs]"]
  node_space_layout["Space Layout<br/>[SpaceLayout.cs]"]
end

node_student(("Student"))

node_student -->|"opens"| node_diffuse_scene
node_student -->|"opens"| node_normal_scene
node_student -->|"opens"| node_collision_scene
node_student -->|"opens"| node_grading_scenes
node_student -->|"opens"| node_library_scene
node_diffuse_scene -->|"demonstrates"| node_diffuse_shaders
node_diffuse_scene -->|"demonstrates"| node_light_controllers
node_normal_scene -->|"demonstrates"| node_normal_shaders
node_collision_scene -->|"demonstrates"| node_broad_shape
node_collision_scene -->|"demonstrates"| node_collision_tests
node_grading_scenes -->|"supports grading"| node_grading_logic
node_library_scene -->|"demonstrates"| node_student_agent
node_library_scene -->|"demonstrates"| node_librarian_agent
node_library_scene -->|"demonstrates"| node_book_model
node_library_scene -->|"demonstrates"| node_space_layout

click node_diffuse_scene "https://github.com/danrehberg/cs462_assignments/blob/main/A0_LightsOn/Assets/Scenes/DiffuseLighting.unity"
click node_diffuse_shaders "https://github.com/danrehberg/cs462_assignments/blob/main/A0_LightsOn/Assets/Materials/DiffuseLighting/Dir.shader"
click node_light_controllers "https://github.com/danrehberg/cs462_assignments/blob/main/A0_LightsOn/Assets/Scripts/Direction_Light.cs"
click node_normal_scene "https://github.com/danrehberg/cs462_assignments/blob/main/A0_LightsOn/Assets/Scenes/NormalMapLighting.unity"
click node_normal_shaders "https://github.com/danrehberg/cs462_assignments/blob/main/A0_LightsOn/Assets/Materials/NormalMapLighting/DirTBN.shader"
click node_collision_scene "https://github.com/danrehberg/cs462_assignments/blob/main/P1_DiscreteCollisions/Assets/Scenes/CollisionScene.unity"
click node_broad_shape "https://github.com/danrehberg/cs462_assignments/blob/main/P1_DiscreteCollisions/Assets/Scripts/BroadShape.cs"
click node_collision_tests "https://github.com/danrehberg/cs462_assignments/blob/main/P1_DiscreteCollisions/Assets/Scripts/CollisionTests.cs"
click node_grading_scenes "https://github.com/danrehberg/cs462_assignments/blob/main/Grading_Assistant/Assets/Scenes/A0Assist.unity"
click node_grading_logic "https://github.com/danrehberg/cs462_assignments/blob/main/Grading_Assistant/Assets/Scripts/Grading.cs"
click node_p1_grading "https://github.com/danrehberg/cs462_assignments/blob/main/Grading_Assistant/Assets/Scripts/P1_Grading.cs"
click node_library_scene "https://github.com/danrehberg/cs462_assignments/blob/main/P3_FiniteStateMachineAI/Assets/Scenes/Library.unity"
click node_student_agent "https://github.com/danrehberg/cs462_assignments/blob/main/P3_FiniteStateMachineAI/Assets/Scripts/Student.cs"
click node_librarian_agent "https://github.com/danrehberg/cs462_assignments/blob/main/P3_FiniteStateMachineAI/Assets/Scripts/Librarian.cs"
click node_book_model "https://github.com/danrehberg/cs462_assignments/blob/main/P3_FiniteStateMachineAI/Assets/Scripts/Book.cs"
click node_space_layout "https://github.com/danrehberg/cs462_assignments/blob/main/P3_FiniteStateMachineAI/Assets/Scripts/SpaceLayout.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_diffuse_scene,node_diffuse_shaders,node_light_controllers,node_normal_scene,node_normal_shaders toneBlue
class node_collision_scene,node_broad_shape,node_collision_tests toneAmber
class node_grading_scenes,node_grading_logic,node_p1_grading toneMint
class node_library_scene,node_student_agent,node_librarian_agent,node_book_model,node_space_layout toneRose
class node_student toneIndigo
```

## Components

### Graphics Assignments

- [Diffuse Scene](https://github.com/danrehberg/cs462_assignments/blob/main/A0_LightsOn/Assets/Scenes/DiffuseLighting.unity): `A0_LightsOn/Assets/Scenes/DiffuseLighting.unity`
- [Diffuse Shaders](https://github.com/danrehberg/cs462_assignments/blob/main/A0_LightsOn/Assets/Materials/DiffuseLighting/Dir.shader): `A0_LightsOn/Assets/Materials/DiffuseLighting/Dir.shader`
- [Light Controllers](https://github.com/danrehberg/cs462_assignments/blob/main/A0_LightsOn/Assets/Scripts/Direction_Light.cs): `A0_LightsOn/Assets/Scripts/Direction_Light.cs`
- [Normal Map Scene](https://github.com/danrehberg/cs462_assignments/blob/main/A0_LightsOn/Assets/Scenes/NormalMapLighting.unity): `A0_LightsOn/Assets/Scenes/NormalMapLighting.unity`
- [Normal Map Shaders](https://github.com/danrehberg/cs462_assignments/blob/main/A0_LightsOn/Assets/Materials/NormalMapLighting/DirTBN.shader): `A0_LightsOn/Assets/Materials/NormalMapLighting/DirTBN.shader`

### Collision Assignment

- [Collision Scene](https://github.com/danrehberg/cs462_assignments/blob/main/P1_DiscreteCollisions/Assets/Scenes/CollisionScene.unity): `P1_DiscreteCollisions/Assets/Scenes/CollisionScene.unity`
- [Broad Shapes](https://github.com/danrehberg/cs462_assignments/blob/main/P1_DiscreteCollisions/Assets/Scripts/BroadShape.cs): `P1_DiscreteCollisions/Assets/Scripts/BroadShape.cs`
- [Collision Algorithms](https://github.com/danrehberg/cs462_assignments/blob/main/P1_DiscreteCollisions/Assets/Scripts/CollisionTests.cs): `P1_DiscreteCollisions/Assets/Scripts/CollisionTests.cs`

### Grading Assistant

- [Grading Scenes](https://github.com/danrehberg/cs462_assignments/blob/main/Grading_Assistant/Assets/Scenes/A0Assist.unity): `Grading_Assistant/Assets/Scenes/A0Assist.unity`
- [Grading Logic](https://github.com/danrehberg/cs462_assignments/blob/main/Grading_Assistant/Assets/Scripts/Grading.cs): `Grading_Assistant/Assets/Scripts/Grading.cs`
- [P1 Grading](https://github.com/danrehberg/cs462_assignments/blob/main/Grading_Assistant/Assets/Scripts/P1_Grading.cs): `Grading_Assistant/Assets/Scripts/P1_Grading.cs`

### NPC AI

- [Library Scene](https://github.com/danrehberg/cs462_assignments/blob/main/P3_FiniteStateMachineAI/Assets/Scenes/Library.unity): `P3_FiniteStateMachineAI/Assets/Scenes/Library.unity`
- [Student Agent](https://github.com/danrehberg/cs462_assignments/blob/main/P3_FiniteStateMachineAI/Assets/Scripts/Student.cs): `P3_FiniteStateMachineAI/Assets/Scripts/Student.cs`
- [Librarian Agent](https://github.com/danrehberg/cs462_assignments/blob/main/P3_FiniteStateMachineAI/Assets/Scripts/Librarian.cs): `P3_FiniteStateMachineAI/Assets/Scripts/Librarian.cs`
- [Book Model](https://github.com/danrehberg/cs462_assignments/blob/main/P3_FiniteStateMachineAI/Assets/Scripts/Book.cs): `P3_FiniteStateMachineAI/Assets/Scripts/Book.cs`
- [Space Layout](https://github.com/danrehberg/cs462_assignments/blob/main/P3_FiniteStateMachineAI/Assets/Scripts/SpaceLayout.cs): `P3_FiniteStateMachineAI/Assets/Scripts/SpaceLayout.cs`

### Other components

- **Student**

## Connections

- Student → Diffuse Scene: opens
- Student → Normal Map Scene: opens
- Student → Collision Scene: opens
- Student → Grading Scenes: opens
- Student → Library Scene: opens
- Diffuse Scene → Diffuse Shaders: demonstrates
- Diffuse Scene → Light Controllers: demonstrates
- Normal Map Scene → Normal Map Shaders: demonstrates
- Collision Scene → Broad Shapes: demonstrates
- Collision Scene → Collision Algorithms: demonstrates
- Grading Scenes → Grading Logic: supports grading
- Library Scene → Student Agent: demonstrates
- Library Scene → Librarian Agent: demonstrates
- Library Scene → Book Model: demonstrates
- Library Scene → Space Layout: demonstrates
