if (parent != null) { worldScale.set(parent.getWorldScale()).multLocal(localScale); parent.getWorldRotation().mult(localRotation, worldRotation); worldTranslation = parent.getWorldRotation().mult(localTranslation, worldTranslation).multLocal(parent.getWorldScale()) .addLocal(parent.getWorldTranslation()); } else { worldScale.set(localScale); worldRotation.set(localRotation); worldTranslation.set(localTranslation); }
updateWorldVectors();
	public void rotateBillboard(Camera cam) {		//get the scale, translation and rotation of the node in world space		if (parent != null) {			worldScale.set(parent.getWorldScale()).multLocal(localScale);			parent.getWorldRotation().mult(localRotation, worldRotation);			worldTranslation = parent.getWorldRotation().mult(localTranslation,					worldTranslation).multLocal(parent.getWorldScale())					.addLocal(parent.getWorldTranslation());		} else {			worldScale.set(localScale);			worldRotation.set(localRotation);			worldTranslation.set(localTranslation);		}		switch (type) {		case AXIAL:			rotateAxial(cam);			break;		case SCREEN_ALIGNED:			rotateScreenAligned(cam);			break;		case CAMERA_ALIGNED:		    rotateCameraAligned(cam);		    break;		}		for (int i = 0, cSize = children.size(); i < cSize; i++) {			Spatial child = (Spatial) children.get(i);			if (child != null) {				child.updateGeometricState(lastTime, false);			}		}	}