/** * {@inheritDoc} * * @see org.eclipse.draw3d.ISceneListener#cameraChanged(org.eclipse.draw3d.camera.ICamera, * org.eclipse.draw3d.camera.ICamera) */ public void cameraChanged(ICamera i_oldCamera, ICamera i_newCamera) { i_oldCamera.removeCameraListener(m_cameraListener); i_newCamera.addCameraListener(m_cameraListener); coordinateSystemChanged(); }
/** * {@inheritDoc} * * @see org.eclipse.draw3d.AbstractSurface#getYAxis(org.eclipse.draw3d.geometry.Vector3f) */ @Override protected Vector3f getYAxis(Vector3f io_result) { ICamera camera = m_scene.getCamera(); Vector3f yAxis = camera.getUpVector(io_result); yAxis.scale(-1); return yAxis; }
/** * {@inheritDoc} * * @see org.eclipse.draw3d.AbstractSurface#getZAxis(org.eclipse.draw3d.geometry.Vector3f) */ @Override protected Vector3f getZAxis(Vector3f io_result) { ICamera camera = m_scene.getCamera(); return camera.getViewDirection(io_result); }
/** * {@inheritDoc} * * @see org.eclipse.draw3d.AbstractSurface#getXAxis(org.eclipse.draw3d.geometry.Vector3f) */ @Override protected Vector3f getXAxis(Vector3f io_result) { ICamera camera = m_scene.getCamera(); return camera.getRightVector(io_result); }
/** * {@inheritDoc} * * @see org.eclipse.draw3d.AbstractSurface#getOrigin(org.eclipse.draw3d.geometry.Vector3f) */ @Override protected Vector3f getOrigin(Vector3f io_result) { ICamera camera = m_scene.getCamera(); return camera.unProject(0, 0, m_depth, null, io_result); }