public Plane(Vector3 first, Vector3 second, Vector3 third, Texture2D texture, double hO, double vO, double tR, double hS, double vS) { //a plane is defined by three points. we want the second of the points to be the corner so that first -> second -> third goes along //two edges of the plane this.first = MapEngine.toWorldSpace(first); this.second = MapEngine.toWorldSpace(second); this.third = MapEngine.toWorldSpace(third); meshFirst = this.first; meshSecond = this.second; meshThird = this.third; this.texture = texture; plane = new Microsoft.Xna.Framework.Plane(this.first, this.second, this.third); //this accounts for a different winding from XNA plane.Normal = -plane.Normal; fixMeshOrder(); hOffset = hO; vOffset = vO; textureRotation = tR; hScale = hS; vScale = vS; }
public void loadMap(String mapFile) { mapEngine = new MapEngine(this, mapFile, textures); aiEngine.generateAIMesh(); physicsEngine.generateCollisionGrid(500); }