Package javax.vecmath

Examples of javax.vecmath.Vector3f.negate()


    Transform convexInPlaneTrans = Stack.alloc(Transform.class);
    convexInPlaneTrans.inverse(planeObj.getWorldTransform(tmpTrans));
    convexInPlaneTrans.mul(convexObj.getWorldTransform(tmpTrans));

    Vector3f tmp = Stack.alloc(Vector3f.class);
    tmp.negate(planeNormal);
    planeInConvex.basis.transform(tmp);

    Vector3f vtx = convexShape.localGetSupportingVertex(tmp, Stack.alloc(Vector3f.class));
    Vector3f vtxInPlane = Stack.alloc(vtx);
    convexInPlaneTrans.transform(vtxInPlane);
View Full Code Here


    solver = new SequentialImpulseConstraintSolver();
    //ConstraintSolver* solver = new OdeConstraintSolver;
    dynamicsWorld = new DiscreteDynamicsWorld(dispatcher,broadphase,solver,collisionConfiguration);

    Vector3f gravity = new Vector3f();
    gravity.negate(cameraUp);
    gravity.scale(10f);
    dynamicsWorld.setGravity(gravity);

    new BspToBulletConverter().convertBsp(getClass().getResourceAsStream("exported.bsp.txt"));
   
View Full Code Here

//        double xDelta = p1.getX() - p2.getX();
//        double yDelta = p1.getY() - p2.getY();
//        double zDelta = p1.getZ() - p2.getZ();
       
        Vector3f delta = new Vector3f();
        delta.negate(p2);
        delta.add(p1);
 
        double deltaLength = Math.max(EPSILON, delta.length());

//        double deltaLength = Math.max(EPSILON, Math.sqrt((xDelta * xDelta)
 
View Full Code Here

                "Unexpected mathematical result in FRLayout:calcPositions [force]"); }

        delta.scale((float)(force / deltaLength));
       
        frVertexData.get(v2).add(delta);
        delta.negate();
        frVertexData.get(v1).add(delta);
       
//        FRVertexData fvd1 = getFRData(v1);
//        FRVertexData fvd2 = getFRData(v2);
//
View Full Code Here

//                    double xDelta = p1.getX() - p2.getX();
//                    double yDelta = p1.getY() - p2.getY();
//                    double zDelta = p1.getZ() - p2.getZ();

                    Vector3f delta = new Vector3f();
                    delta.negate(p2);
                    delta.add(p1);

                    double deltaLength = Math.max(EPSILON, delta.length());

//                    double deltaLength = Math.max(EPSILON, Math
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.