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);
    }
Пример #2
0
 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);
 }
 public static void Draw <C>(MagneticFieldMsg message, Drawing3d drawing, Color color, float lengthScale = 1) where C : ICoordinateSpace, new()
 {
     drawing.DrawArrow(Vector3.zero, message.magnetic_field.From <C>() * lengthScale, color);
 }