private void deletePhysicsElement(MeshPhysicsElementFactory factory, WorldRendering.Entity ent) { var el = ent.get <MeshStaticPhysicsElement>(); if (el != null) { factory.DeleteStaticElement(el); } ent.set <MeshStaticPhysicsElement>(null); }
public void Simulate() { if (!TW.Graphics.Keyboard.IsKeyPressed(Key.B)) { return; } var ent = new WorldRendering.Entity { WorldMatrix = Matrix.Translation(TW.Data.GetSingleton <CameraInfo>().ActiveCamera.ViewInverse.GetTranslation()), Mesh = mesh, Solid = true, Static = false }; TW.Data.GetSingleton <Datastore>().Persist(ent); }
public RenderData(VoxelTerrainChunk terrainChunk) { TerrainChunk = terrainChunk; _ent = new WorldRendering.Entity(); }
public EntityPhysX(WorldRendering.Entity ent, MeshPhysicsElementFactory factory) { Entity = ent; this.factory = factory; }