Example #1
0
void DebugDrawDir(DebugDraw &draw, const core::math::Vec4 &start, const core::math::Vec4 &dir, const core::math::Color &color) {
  const Color color1(color.r(), color.g(), color.b(), 0);
  const Color color2(color.r(), color.g(), color.b(), 255);
  draw.addLine(start, start + dir, color1, color2);
}
Example #2
0
void DebugDrawMatrix(DebugDraw &draw, const core::math::Matrix44 &mat) {
  draw.addLine(mat.pos() + mat.left() * 0.5f, mat.pos() - mat.left() * 0.5f, Color(255, 0, 0, 255), Color(64, 0, 0, 255));
  draw.addLine(mat.pos() + mat.up() * 0.5f, mat.pos() - mat.up() * 0.5f, Color(0, 255, 0, 255), Color(0, 64, 0, 255));
  draw.addLine(mat.pos() + mat.at() * 0.5f, mat.pos() - mat.at() * 0.5f, Color(0, 0, 255, 255), Color(0, 0, 64, 255));
}
Example #3
0
void DebugDrawPoint(DebugDraw &draw, const core::math::Vec4 &point) {
  const Color white(255, 255, 255, 255);
  draw.addLine(point + core::math::G_UpVector * 0.5f, point - core::math::G_UpVector * 0.5f, white, white);
  draw.addLine(point + core::math::G_LeftVector * 0.5f, point - core::math::G_LeftVector * 0.5f, white, white);
  draw.addLine(point + core::math::G_AtVector * 0.5f, point - core::math::G_AtVector * 0.5f, white, white);
}