public static void Draw <C>(AccelMsg message, Drawing3d drawing, Color color, GameObject origin, float lengthScale = 1, float sphereRadius = 1, float thickness = 0.01f) where C : ICoordinateSpace, new() { Vector3 originPos = (origin == null) ? Vector3.zero : origin.transform.position; drawing.DrawArrow(originPos, originPos + message.linear.From <C>() * lengthScale, color, thickness); VisualizationUtils.DrawAngularVelocityArrow(drawing, message.angular.From <C>(), originPos, color, sphereRadius, thickness); }
public static void Draw <C>(ImuMsg message, Drawing3d drawing, Color color, float lengthScale = 1, float sphereRadius = 1, float thickness = 0.01f) where C : ICoordinateSpace, new() { QuaternionDefaultVisualizer.Draw <C>(message.orientation, drawing); drawing.DrawArrow(Vector3.zero, message.linear_acceleration.From <C>() * lengthScale, color, thickness); VisualizationUtils.DrawAngularVelocityArrow(drawing, message.angular_velocity.From <C>(), Vector3.zero, color, sphereRadius, thickness); }