use of com.ardor3d.scenegraph.extension.CameraNode in project energy3d by concord-consortium.
the class SceneManager method initCamera.
public void initCamera() {
System.out.println("initCamera()");
final Camera camera = getCamera();
cameraNode = new CameraNode("Camera Node", camera);
root.attachChild(cameraNode);
cameraNode.updateFromCamera();
Scene.getInstance().updateEditShapes();
setCameraControl(CameraMode.ORBIT);
resetCamera(ViewMode.NORMAL);
SceneManager.getInstance().getCameraControl().reset();
taskManager.update(new Callable<Object>() {
@Override
public Object call() throws Exception {
final Spatial compass = createCompass();
compass.setScale(0.1);
compass.setTranslation(-1, -0.7, 2);
cameraNode.attachChild(compass);
final Spatial earth = createEarth();
earth.setScale(0.00012);
earth.setTranslation(-1, -0.67, 2);
cameraNode.attachChild(earth);
Scene.getInstance().updateEditShapes();
return null;
}
});
}
Aggregations