public MeshPhysicsElementFactory(PhysicsEngine engine, ClientPhysicsQuadTreeNode root) { Engine = engine; Root = root; MeshPhysicsPool = new MeshPhysicsPool(); actorBuilder = new MeshPhysicsActorBuilder(MeshPhysicsPool); }
/// <summary> /// World is in the constructor because this is a static physx object /// </summary> /// <param name="_mesh"></param> /// <param name="world"></param> public MeshStaticPhysicsElement(IMesh _mesh, Matrix world, MeshPhysicsActorBuilder _builder) { Mesh = _mesh; builder = _builder; worldMatrix = world; updateBoundingSphere(); }
internal void disposeInternal() { if (node != null) { node.RemoveStaticObject(this); } builder = null; scene = null; if (Actor != null) { Actor.Dispose(); } Actor = null; }
/// <summary> /// This constructor enables physics /// </summary> public MeshDynamicPhysicsElement(IMesh mesh, Matrix world, MeshPhysicsActorBuilder builder) { Mesh = mesh; this.world = world; Builder = builder; }