public PxGhRigidDynamicSphere(Plane frame, float radius, Material material, float mass, Vector3d initialLinearVelocity, Vector3d initialAngularVelocity)
     : base(frame, initialLinearVelocity, initialAngularVelocity)
 {
     Actor.CreateShape(new SphereGeometry(radius), material);
     Mass = mass;
     DisplayMeshes.Add(Mesh.CreateFromSphere(new Sphere(Point3d.Origin, radius), 12, 6));
 }
예제 #2
0
        public PxGhRigidStaticBox(Plane frame, float length, float width, float height, Material material)
        {
            Actor.CreateShape(new BoxGeometry(length * 0.5f, width * 0.5f, height * 0.5f), material);
            Actor.GlobalPose = frame.ToMatrix();

            DisplayMeshes.Add(
                Mesh.CreateFromBox(
                    new Box(
                        frame,
                        new BoundingBox(-length * 0.5f, -width * 0.5f, -height * 0.5f, length * 0.5f, width * 0.5f, height * 0.5f)),
                    1, 1, 1));
        }
예제 #3
0
        public PxGhRigidStaticBox(Box box, Material material)
        {
            Point3d max    = box.BoundingBox.Max;
            Point3d min    = box.BoundingBox.Min;
            float   length = (float)(max.X - min.X);
            float   width  = (float)(max.Y - min.Y);
            float   height = (float)(max.Z - min.Z);

            Actor.CreateShape(new BoxGeometry(length * 0.5f, width * 0.5f, height * 0.5f), material);
            Actor.GlobalPose = box.Plane.ToMatrix();
            DisplayMeshes.Add(Mesh.CreateFromBox(box, 1, 1, 1));
        }
예제 #4
0
 public PxGhRigidDynamicBox(
     Plane frame,
     float length,
     float width,
     float height,
     Material material,
     float mass,
     Vector3d initialLinearVelocity,
     Vector3d initialAngularVelocity)
     : base(
         frame,
         initialLinearVelocity,
         initialAngularVelocity)
 {
     Actor.CreateShape(new BoxGeometry(length * 0.5f, width * 0.5f, height * 0.5f), material);
     Mass = mass;
     hX   = length * 0.5f;
     hY   = width * 0.5f;
     hZ   = height * 0.5f;
     DisplayMeshes.Add(Mesh.CreateFromBox(new BoundingBox(-hX, -hY, -hZ, hX, hY, hZ), 1, 1, 1));
 }
예제 #5
0
 public PxGhRigidStaticSphere(Plane frame, float radius, Material material)
 {
     Actor.CreateShape(new SphereGeometry(radius), material);
     Actor.GlobalPose = frame.ToMatrix();
     DisplayMeshes.Add(Mesh.CreateFromSphere(new Sphere(frame, radius), 32, 16));
 }
예제 #6
0
 private void UpdateAppSettingsWithSelectedCategories()
 {
     AppSettingsUtil.AddOrUpdateAppSettings(SettingKey.AssetStoreDecksChecked, DisplayDecks.ToString());
     AppSettingsUtil.AddOrUpdateAppSettings(SettingKey.AssetStoreGriptapesChecked, DisplayGriptapes.ToString());
     AppSettingsUtil.AddOrUpdateAppSettings(SettingKey.AssetStoreHatsChecked, DisplayHats.ToString());
     AppSettingsUtil.AddOrUpdateAppSettings(SettingKey.AssetStoreMapsChecked, DisplayMaps.ToString());
     AppSettingsUtil.AddOrUpdateAppSettings(SettingKey.AssetStorePantsChecked, DisplayPants.ToString());
     AppSettingsUtil.AddOrUpdateAppSettings(SettingKey.AssetStoreShirtsChecked, DisplayShirts.ToString());
     AppSettingsUtil.AddOrUpdateAppSettings(SettingKey.AssetStoreShoesChecked, DisplayShoes.ToString());
     AppSettingsUtil.AddOrUpdateAppSettings(SettingKey.AssetStoreTrucksChecked, DisplayTrucks.ToString());
     AppSettingsUtil.AddOrUpdateAppSettings(SettingKey.AssetStoreWheelsChecked, DisplayWheels.ToString());
     AppSettingsUtil.AddOrUpdateAppSettings(SettingKey.AssetStoreMeshesChecked, DisplayMeshes.ToString());
     AppSettingsUtil.AddOrUpdateAppSettings(SettingKey.AssetStoreCharactersChecked, DisplayCharacters.ToString());
 }