private void deletePhysicsElement(MeshPhysicsElementFactory factory, WorldRendering.Entity ent) { var el = ent.get <MeshStaticPhysicsElement>(); if (el != null) { factory.DeleteStaticElement(el); } ent.set <MeshStaticPhysicsElement>(null); }
public PhysXSimulator() { data = TW.Data.GetSingleton <PhysXData>(); root = new ClientPhysicsQuadTreeNode( new BoundingBox(new Vector3(-1000, -1000, -1000), new Vector3(1000, 1000, 1000)).xna()); QuadTree.Split(root, 6); data.RootNode = root; factory = new MeshPhysicsElementFactory(TW.Physics, root); factory.Initialize(); entityUpdater = new EntityPhysXUpdater(factory, root); DebugRenderer = new PhysicsDebugRenderer(TW.Graphics, TW.Physics.Scene); DebugRenderer.Initialize(); }
public EntityPhysX(WorldRendering.Entity ent, MeshPhysicsElementFactory factory) { Entity = ent; this.factory = factory; }
public EntityPhysXUpdater(MeshPhysicsElementFactory factory, ClientPhysicsQuadTreeNode root) { this.factory = factory; this.root = root; }
public MeshPhysicsFactoryXNA(PhysicsEngine engine, ClientPhysicsQuadTreeNode root) { Factory = new MeshPhysicsElementFactory(engine, root); }