Package jinngine.physics.constraint

Examples of jinngine.physics.constraint.Constraint


    // torso1
    Geometry torso1geometry = new Box(1.7,1,1.7);
    Body torso1 = new Body( "torso1", torso1geometry );
    torso1.setPosition(new Vector3(-5,-11,-25));

    Constraint neck = new UniversalJoint(head,torso1,new Vector3(-5,-10,-25), new Vector3(0,0,1), new Vector3(1,0,0));
    scene.addConstraint(neck);

    // torso2
    Geometry torso2geometry = new Box(1.5,1,1.5);
    Body torso2 = new Body( "torso2", torso2geometry );
View Full Code Here


  @Override
  public void setup(Scene scene) {
    // first of, find contact constraints that involves the body we want to monitor
    Iterator<Constraint> iter = scene.getConstraints(body);
    while (iter.hasNext()) {
      Constraint constraint = iter.next();
      // if the constraint is a contact constraint, add it to the monitoring list
      if (constraint instanceof ContactConstraint ) {
        monitoredconstraints.add((ContactConstraint)constraint);
      }
    }// while constraints
View Full Code Here

TOP

Related Classes of jinngine.physics.constraint.Constraint

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.