示例#1
0
 public SphereShape(RigidBody rigidBody, Matrix4x4 realParentPose, Material material, SphereShapeDescriptor descriptor)
 {
     var sphereShapeDescription = new SphereShapeDescription(descriptor.Radius)
                                      {Material = material._wrappedMaterial};
     _wrappedSphereShape =
         (StillDesign.PhysX.SphereShape)rigidBody.WrappedActor.CreateShape(sphereShapeDescription);
     SetRealParentPose(realParentPose);
     UserData = descriptor.UserData;
     if (rigidBody.HasDefaultShape)
     {
         rigidBody.WrappedActor.Shapes[0].Dispose();
         rigidBody.HasDefaultShape = false;
     }
 }
 public static ISphereShape CreateSphere(this IFactory<IShape> factory,
                                      SphereShapeDescriptor descriptor)
 {
     return factory.Create<ISphereShape, SphereShapeDescriptor>(descriptor);
 }
 public DefaultSphereShape(SphereShapeDescriptor descriptor)
 {
     Descriptor = descriptor;
 }
示例#4
0
 public SphereShape(SphereShapeDescriptor descriptor)
 {
     WrappedSphereShape = new global::DigitalRune.Geometry.Shapes.SphereShape(descriptor.Radius);
     UserData = descriptor.UserData;
 }