Defined in:Orients the camera so that it looks in a given direction.
void LookInDirection(const Vector3D& direction);
void LookInDirection(const Vector3D& direction, const Vector3D& up);
||The direction in which to look. This must be unit length.|
||The general up direction. This must be unit length.|
LookInDirectionfunction modifies a camera's node transform so that the camera looks in the direction given by the
upparameter specifies the general up direction for the camera and defines the vertical plane containing both the direction vector. If the
upparameter is parallel to the
directionparameter, then the resulting node transform will be singular and subsequent rendering through the camera is undefined.
The direction in which to look should be specified in the camera's local coordinate space. Ordinarily, a camera resides in the infinite zone at the root of a scene, so the camera's local space is world space. In the case that the camera is a subnode of another node having a non-identity world transform, the
upparameters must be transformed into the camera's local space using the parent node's inverse world transform.
upparameter is omitted, then the direction (0,0,1) is used as the up direction.