Package edu.cmu.cs.stage3.math

Examples of edu.cmu.cs.stage3.math.Plane


//       // Bullet 2:
//       //  test if the box intersects the plane of the triangle
//       //  compute plane equation of triangle: normal * x + d = 0
//        Vector3f normal = new Vector3f();
//        e0.cross(e1, normal);
        Plane p = vars.plane;

        p.setPlanePoints(v1, v2, v3);
        if (bbox.whichSide(p) == Plane.Side.Negative) {
            vars.release();
            return false;
        }
//
View Full Code Here


    }

    public void write(JmeExporter ex) throws IOException {
        super.write(ex);
        OutputCapsule capsule = ex.getCapsule(this);
        capsule.write(plane, "collisionPlane", new Plane());
    }
View Full Code Here

    }

    public void read(JmeImporter im) throws IOException {
        super.read(im);
        InputCapsule capsule = im.getCapsule(this);
        plane = (Plane) capsule.readSavable("collisionPlane", new Plane());
        createShape();
    }
View Full Code Here

    rootNode.addLight(sun);
  }

  private void initStarGate() {
    Vector3f waterLocation = new Vector3f(0, -6, 0);
    waterProcessor.setPlane(new Plane(Vector3f.UNIT_Y, waterLocation.dot(Vector3f.UNIT_Y)));

    Node ship = new Node("Carrier");

    Spatial center = assetManager.loadModel("spaceobject/gates/stargate/center.mesh.xml");
    center.setShadowMode(ShadowMode.Receive);
View Full Code Here

  public void removeAuthoringToolStateListener(edu.cmu.cs.stage3.alice.authoringtool.event.AuthoringToolStateListener listener) {
    stateListeners.remove(listener);
  }

  protected void fireStateChanging(int previousState, int currentState) {
    AuthoringToolStateChangedEvent ev = new AuthoringToolStateChangedEvent(previousState, currentState, world);
    for (java.util.Iterator iter = stateListeners.iterator(); iter.hasNext();) {
      AuthoringToolStateListener listener = (AuthoringToolStateListener) iter.next();
      try {
        listener.stateChanging(ev);
      } catch (Throwable t) {
View Full Code Here

      }
    }
  }

  protected void fireWorldLoading(edu.cmu.cs.stage3.alice.core.World world) {
    AuthoringToolStateChangedEvent ev = new AuthoringToolStateChangedEvent(AuthoringToolStateChangedEvent.AUTHORING_STATE, AuthoringToolStateChangedEvent.AUTHORING_STATE, world);
    for (java.util.Iterator iter = stateListeners.iterator(); iter.hasNext();) {
      AuthoringToolStateListener listener = (AuthoringToolStateListener) iter.next();
      try {
        listener.worldLoading(ev);
      } catch (Throwable t) {
View Full Code Here

      }
    }
  }

  protected void fireWorldUnLoading(edu.cmu.cs.stage3.alice.core.World world) {
    AuthoringToolStateChangedEvent ev = new AuthoringToolStateChangedEvent(AuthoringToolStateChangedEvent.AUTHORING_STATE, AuthoringToolStateChangedEvent.AUTHORING_STATE, world);
    for (java.util.Iterator iter = stateListeners.iterator(); iter.hasNext();) {
      AuthoringToolStateListener listener = (AuthoringToolStateListener) iter.next();
      try {
        listener.worldUnLoading(ev);
      } catch (Throwable t) {
View Full Code Here

      }
    }
  }

  protected void fireWorldStarting(int previousState, int currentState, edu.cmu.cs.stage3.alice.core.World world) {
    AuthoringToolStateChangedEvent ev = new AuthoringToolStateChangedEvent(previousState, currentState, world);
    for (java.util.Iterator iter = stateListeners.iterator(); iter.hasNext();) {
      AuthoringToolStateListener listener = (AuthoringToolStateListener) iter.next();
      try {
        listener.worldStarting(ev);
      } catch (Throwable t) {
View Full Code Here

      }
    }
  }

  protected void fireWorldStopping(int previousState, int currentState, edu.cmu.cs.stage3.alice.core.World world) {
    AuthoringToolStateChangedEvent ev = new AuthoringToolStateChangedEvent(previousState, currentState, world);
    for (java.util.Iterator iter = stateListeners.iterator(); iter.hasNext();) {
      AuthoringToolStateListener listener = (AuthoringToolStateListener) iter.next();
      try {
        listener.worldStopping(ev);
      } catch (Throwable t) {
View Full Code Here

      }
    }
  }

  protected void fireWorldPausing(int previousState, int currentState, edu.cmu.cs.stage3.alice.core.World world) {
    AuthoringToolStateChangedEvent ev = new AuthoringToolStateChangedEvent(previousState, currentState, world);
    for (java.util.Iterator iter = stateListeners.iterator(); iter.hasNext();) {
      AuthoringToolStateListener listener = (AuthoringToolStateListener) iter.next();
      try {
        listener.worldPausing(ev);
      } catch (Throwable t) {
View Full Code Here

TOP

Related Classes of edu.cmu.cs.stage3.math.Plane

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.