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

Method OnDebugDrawSelected

Source/Engine/Physics/Joints/SphericalJoint.cpp:36–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34#include "Engine/Core/Math/Color.h"
35
36void SphericalJoint::OnDebugDrawSelected()
37{
38 const Vector3 source = GetPosition();
39 const Vector3 target = GetTargetPosition();
40 const float size = 15.0f;
41 const float arrowSize = size / 100.0f * 0.5f;
42 const Color color = Color::Green.AlphaMultiplied(0.6f);
43 DEBUG_DRAW_WIRE_ARROW(source, GetOrientation(), arrowSize, arrowSize * 0.5f, Color::Red, 0, false);
44 if (EnumHasAnyFlags(_flags, SphericalJointFlag::Limit))
45 {
46 DEBUG_DRAW_CONE(source, GetOrientation(), size, _limit.YLimitAngle * DegreesToRadians, _limit.ZLimitAngle * DegreesToRadians, color, 0, false);
47 }
48 else
49 {
50 DEBUG_DRAW_SPHERE(BoundingSphere(source, size), color, 0, false);
51 }
52 DEBUG_DRAW_LINE(source, target, Color::Green * 0.6f, 0, false);
53
54 // Base
55 Joint::OnDebugDrawSelected();
56}
57
58#endif
59

Callers

nothing calls this directly

Calls 6

GetOrientationFunction · 0.85
EnumHasAnyFlagsFunction · 0.85
OnDebugDrawSelectedFunction · 0.85
AlphaMultipliedMethod · 0.80
GetPositionFunction · 0.50
BoundingSphereClass · 0.50

Tested by

no test coverage detected