* Added Camera.lookAtDirection()
* Added docs for Camera.containsGui() git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7268 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
1203073bd9
commit
9088d6230d
@ -619,11 +619,10 @@ public class Camera implements Savable, Cloneable {
|
|||||||
* <code>setDirection</code> sets the direction vector of the camera.
|
* <code>setDirection</code> sets the direction vector of the camera.
|
||||||
* This operation doesn't change the left and up vectors of the camera,
|
* This operation doesn't change the left and up vectors of the camera,
|
||||||
* which must change if the camera is to actually face the given
|
* which must change if the camera is to actually face the given
|
||||||
* direction. In most cases the method {@link Camera#lookAt(com.jme3.math.Vector3f, com.jme3.math.Vector3f) }
|
* direction. In most cases the method {@link Camera#lookAtDirection(com.jme3.math.Vector3f, com.jme3.math.Vector3f) }
|
||||||
* should be used instead.
|
* should be used instead.
|
||||||
*
|
*
|
||||||
* @param direction the direction this camera is facing.
|
* @param direction the direction this camera is facing.
|
||||||
* @see Camera#set
|
|
||||||
* @deprecated Manipulate the quaternion rotation instead:
|
* @deprecated Manipulate the quaternion rotation instead:
|
||||||
* {@link Camera#setRotation(com.jme3.math.Quaternion) }.
|
* {@link Camera#setRotation(com.jme3.math.Quaternion) }.
|
||||||
*/
|
*/
|
||||||
@ -636,6 +635,17 @@ public class Camera implements Savable, Cloneable {
|
|||||||
onFrameChange();
|
onFrameChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>lookAtDirection</code> sets the direction the camera is facing
|
||||||
|
* given a direction and an up vector.
|
||||||
|
*
|
||||||
|
* @param direction the direction this camera is facing.
|
||||||
|
*/
|
||||||
|
public void lookAtDirection(Vector3f direction, Vector3f up) {
|
||||||
|
this.rotation.lookAt(direction, up);
|
||||||
|
onFrameChange();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>setAxes</code> sets the axes (left, up and direction) for this
|
* <code>setAxes</code> sets the axes (left, up and direction) for this
|
||||||
* camera.
|
* camera.
|
||||||
@ -988,6 +998,15 @@ public class Camera implements Savable, Cloneable {
|
|||||||
return rVal;
|
return rVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>containsGui</code> tests a bounding volume against the ortho
|
||||||
|
* bounding box of the camera. A bounding box spanning from
|
||||||
|
* 0, 0 to Width, Height. Constrained by the viewport settings on the
|
||||||
|
* camera.
|
||||||
|
*
|
||||||
|
* @param bound the bound to check for culling
|
||||||
|
* @return True if the camera contains the gui element bounding volume.
|
||||||
|
*/
|
||||||
public boolean containsGui(BoundingVolume bound) {
|
public boolean containsGui(BoundingVolume bound) {
|
||||||
return guiBounding.intersects(bound);
|
return guiBounding.intersects(bound);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user