MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / OnDebugDrawSelected

Method OnDebugDrawSelected

Source/Engine/Physics/Joints/SliderJoint.cpp:47–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45#include "Engine/Debug/DebugDraw.h"
46
47void SliderJoint::OnDebugDrawSelected()
48{
49 const Vector3 source = GetPosition();
50 const Vector3 normal = GetOrientation() * Vector3::Right;
51 float min = -100.0f, max = 100.0f;
52 if (EnumHasAnyFlags(_flags, SliderJointFlag::Limit))
53 {
54 min = _limit.Lower;
55 max = _limit.Upper;
56 if (max < min)
57 Swap(min, max);
58 }
59 DEBUG_DRAW_LINE(source + normal * min, source + normal * max, Color::Green * 0.6f, 0, false);
60
61 // Base
62 Joint::OnDebugDrawSelected();
63}
64
65#endif
66

Callers

nothing calls this directly

Calls 5

GetOrientationFunction · 0.85
EnumHasAnyFlagsFunction · 0.85
OnDebugDrawSelectedFunction · 0.85
GetPositionFunction · 0.50
SwapFunction · 0.50

Tested by

no test coverage detected