Package com.jme3.scene

Examples of com.jme3.scene.CameraNode.attachChild()


        // maybe dont reset to ragdoll out of animations?
        scanSpatial(model);


        if (parent != null) {
            parent.attachChild(model);

        }
        model.setLocalTranslation(initPosition);
        model.setLocalRotation(initRotation);
        model.setLocalScale(initScale);
View Full Code Here


                childCollisionShape.rotation.mult(tempRot, tempRot);
                geometry.setLocalRotation(tempRot);

                vars.release();

                node.attachChild(geometry);
            }
            debugShape = node;
        } else {
            debugShape = createDebugShape(collisionShape);
        }
View Full Code Here

    /** Create a pivot node at (0,0,0) and attach it to the root node */
    Node pivot = new Node("pivot");
    rootNode.attachChild(pivot); // put this node in the scene

    /** Attach the two boxes to the *pivot* node. */
    pivot.attachChild(blue);
    pivot.attachChild(red);
    /** Rotate the pivot node: Note that both boxes have rotated! */
    pivot.rotate(.4f, .4f, 0f);
  }
}
View Full Code Here

    Node pivot = new Node("pivot");
    rootNode.attachChild(pivot); // put this node in the scene

    /** Attach the two boxes to the *pivot* node. */
    pivot.attachChild(blue);
    pivot.attachChild(red);
    /** Rotate the pivot node: Note that both boxes have rotated! */
    pivot.rotate(.4f, .4f, 0f);
  }
}
View Full Code Here

    @Override
    public void setSpatial(Spatial spatial) {
        if (spatial != null && spatial instanceof Node) {
            Node node = (Node) spatial;
            node.attachChild(geomA);
            node.attachChild(geomB);
        } else if (spatial == null && this.spatial != null) {
            Node node = (Node) this.spatial;
            node.detachChild(geomA);
            node.detachChild(geomB);
View Full Code Here

    @Override
    public void setSpatial(Spatial spatial) {
        if (spatial != null && spatial instanceof Node) {
            Node node = (Node) spatial;
            node.attachChild(geomA);
            node.attachChild(geomB);
        } else if (spatial == null && this.spatial != null) {
            Node node = (Node) this.spatial;
            node.detachChild(geomA);
            node.detachChild(geomB);
        }
View Full Code Here

    @Override
    public void setSpatial(Spatial spatial) {
        if (spatial != null && spatial instanceof Node) {
            Node node = (Node) spatial;
            node.attachChild(geom);
        } else if (spatial == null && this.spatial != null) {
            Node node = (Node) this.spatial;
            node.detachChild(geom);
        }
        super.setSpatial(spatial);
View Full Code Here

        if (myShape != body.getCollisionShape()) {
            Node node = (Node) this.spatial;
            node.detachChild(geom);
            geom = DebugShapeFactory.getDebugShape(body.getCollisionShape());
            geom.setMaterial(debugAppState.DEBUG_YELLOW);
            node.attachChild(geom);
        }
        applyPhysicsTransform(body.getPhysicsLocation(location), body.getPhysicsRotation(rotation));
        geom.setLocalScale(body.getCollisionShape().getScale());
    }
View Full Code Here

    @Override
    public void setSpatial(Spatial spatial) {
        if (spatial != null && spatial instanceof Node) {
            Node node = (Node) spatial;
            node.attachChild(geom);
        } else if (spatial == null && this.spatial != null) {
            Node node = (Node) this.spatial;
            node.detachChild(geom);
        }
        super.setSpatial(spatial);
View Full Code Here

        if(myShape != body.getCollisionShape()){
            Node node = (Node) this.spatial;
            node.detachChild(geom);
            geom = DebugShapeFactory.getDebugShape(body.getCollisionShape());
            geom.setMaterial(debugAppState.DEBUG_PINK);
            node.attachChild(geom);
        }
        applyPhysicsTransform(body.getPhysicsLocation(location), Quaternion.IDENTITY);
        geom.setLocalScale(body.getCollisionShape().getScale());
    }
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.