Guest User

Untitled

a guest
Jul 19th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. void DebugDrawMgr::AddAABB(const Vec3 &min, const Vec3 &max, const Color &color, f32 width, f32 duration, bool depthEnabled)
  2. {
  3. // Rear Box (Left, Top, Right, Bottom)
  4. AddLine(Vec3(min.X(), min.Y(), min.Z()), Vec3(min.X(), max.Y(), min.Z()), color, width, duration, depthEnabled);
  5. AddLine(Vec3(min.X(), max.Y(), min.Z()), Vec3(max.X(), max.Y(), min.Z()), color, width, duration, depthEnabled);
  6. AddLine(Vec3(max.X(), max.Y(), min.Z()), Vec3(max.X(), min.Y(), min.Z()), color, width, duration, depthEnabled);
  7. AddLine(Vec3(max.X(), min.Y(), min.Z()), Vec3(min.X(), min.Y(), min.Z()), color, width, duration, depthEnabled);
  8.  
  9. // Connections (Top left, clockwise)
  10. AddLine(Vec3(min.X(), max.Y(), min.Z()), Vec3(min.X(), max.Y(), max.Z()), color, width, duration, depthEnabled);
  11. AddLine(Vec3(max.X(), max.Y(), min.Z()), Vec3(max.X(), max.Y(), max.Z()), color, width, duration, depthEnabled);
  12. AddLine(Vec3(max.X(), min.Y(), min.Z()), Vec3(max.X(), min.Y(), max.Z()), color, width, duration, depthEnabled);
  13. AddLine(Vec3(min.X(), min.Y(), min.Z()), Vec3(min.X(), min.Y(), max.Z()), color, width, duration, depthEnabled);
  14.  
  15. // Front Box (Left, Top, Right, Bottom)
  16. AddLine(Vec3(min.X(), min.Y(), max.Z()), Vec3(min.X(), max.Y(), max.Z()), color, width, duration, depthEnabled);
  17. AddLine(Vec3(min.X(), max.Y(), max.Z()), Vec3(max.X(), max.Y(), max.Z()), color, width, duration, depthEnabled);
  18. AddLine(Vec3(max.X(), max.Y(), max.Z()), Vec3(max.X(), min.Y(), max.Z()), color, width, duration, depthEnabled);
  19. AddLine(Vec3(max.X(), min.Y(), max.Z()), Vec3(min.X(), min.Y(), max.Z()), color, width, duration, depthEnabled);
  20. }
Add Comment
Please, Sign In to add comment