redstrate.com/content/blog/drawing-simple-cubes/index.md

20 lines
702 B
Markdown
Raw Normal View History

2023-06-12 22:03:57 -04:00
---
2023-06-23 14:42:45 -04:00
title: "Graphics Dump: Drawing debug cubes"
2023-06-24 09:25:16 -04:00
date: 2023-06-28
2023-06-12 22:03:57 -04:00
draft: true
summary: "When working on my engine, I wanted to clean up my debug gizmos a bit. The first thing to tackle is drawing bounding boxes!"
tags:
- C++
2023-06-23 14:42:45 -04:00
- Graphics Dump
- Math
series:
- Graphics Dump
2023-06-12 22:03:57 -04:00
---
If you are writing graphical tools, one of the most common shapes you draw is boxes. They can represent areas (like the affected area of an environment capture) or a box collision.
One common problem that I run into, is dealing with these diagonals:
2023-06-23 14:42:45 -04:00
I found a pretty neat trick for removing these diagonals without having to change the vertex data. This doesn't work for anything that isn't a cube (I think), but whatever.
2023-06-12 22:03:57 -04:00