Package org.jdesktop.mtgame

Examples of org.jdesktop.mtgame.JBulletPhysicsComponent


        return cc;
    }

    protected PhysicsComponent setupPhysics(CollisionComponent physicsCC, PhysicsSystem physicsSystem, Node rootNode) {
        if (physicsCC!=null && physicsCC instanceof JBulletCollisionComponent && physicsSystem instanceof JBulletPhysicsSystem) {
            JBulletPhysicsComponent pc = ((JBulletPhysicsSystem)physicsSystem).createPhysicsComponent((JBulletCollisionComponent)physicsCC);
            CellPhysicsPropertiesComponent prop = cell.getComponent(CellPhysicsPropertiesComponent.class);
            if (prop!=null) {
                PhysicsProperties phy = prop.getPhysicsProperties(CellPhysicsPropertiesComponent.DEFAULT_NAME);
                if (phy!=null) {
                    System.err.println("---------------> setting mass on "+this);
                    pc.setMass(phy.getMass());
                }
            }
            return pc;
        } else {
            logger.warning("Unsupported PhysicsSystem "+physicsSystem);
View Full Code Here

TOP

Related Classes of org.jdesktop.mtgame.JBulletPhysicsComponent

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.