Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void DebugDrawMgr::AddAABB(const Vec3 &min, const Vec3 &max, const Color &color, f32 width, f32 duration, bool depthEnabled)
- {
- // Rear Box (Left, Top, Right, Bottom)
- AddLine(Vec3(min.X(), min.Y(), min.Z()), Vec3(min.X(), max.Y(), min.Z()), color, width, duration, depthEnabled);
- AddLine(Vec3(min.X(), max.Y(), min.Z()), Vec3(max.X(), max.Y(), min.Z()), color, width, duration, depthEnabled);
- AddLine(Vec3(max.X(), max.Y(), min.Z()), Vec3(max.X(), min.Y(), min.Z()), color, width, duration, depthEnabled);
- AddLine(Vec3(max.X(), min.Y(), min.Z()), Vec3(min.X(), min.Y(), min.Z()), color, width, duration, depthEnabled);
- // Connections (Top left, clockwise)
- AddLine(Vec3(min.X(), max.Y(), min.Z()), Vec3(min.X(), max.Y(), max.Z()), color, width, duration, depthEnabled);
- AddLine(Vec3(max.X(), max.Y(), min.Z()), Vec3(max.X(), max.Y(), max.Z()), color, width, duration, depthEnabled);
- AddLine(Vec3(max.X(), min.Y(), min.Z()), Vec3(max.X(), min.Y(), max.Z()), color, width, duration, depthEnabled);
- AddLine(Vec3(min.X(), min.Y(), min.Z()), Vec3(min.X(), min.Y(), max.Z()), color, width, duration, depthEnabled);
- // Front Box (Left, Top, Right, Bottom)
- AddLine(Vec3(min.X(), min.Y(), max.Z()), Vec3(min.X(), max.Y(), max.Z()), color, width, duration, depthEnabled);
- AddLine(Vec3(min.X(), max.Y(), max.Z()), Vec3(max.X(), max.Y(), max.Z()), color, width, duration, depthEnabled);
- AddLine(Vec3(max.X(), max.Y(), max.Z()), Vec3(max.X(), min.Y(), max.Z()), color, width, duration, depthEnabled);
- AddLine(Vec3(max.X(), min.Y(), max.Z()), Vec3(min.X(), min.Y(), max.Z()), color, width, duration, depthEnabled);
- }
Add Comment
Please, Sign In to add comment