private void Draw(Shape3D shape)
        {
            var p = shape.Position;

            switch (shape.ShapeType)
            {
            case ShapeTypes3D.Box: primitives.Draw((Box)shape, Color.Cyan);
                break;

            case ShapeTypes3D.Cylinder: primitives.Draw((Cylinder)shape, Color.Cyan);
                break;
            }
        }
Beispiel #2
0
        private void Draw(BoxShape shape, RigidBody body, Color color)
        {
            var size = shape.Size;
            var box  = new Box(size.X, size.Y, size.Z);

            box.Position    = body.Position.ToVec3();
            box.Orientation = body.Orientation.ToQuat();

            primitives.Draw(box, color);
        }