| SceneHelperLookAt Method (SceneNode, Vector3F, Vector3F) |
Rotates the scene node so that it faces a certain direction (in world space).
Namespace: DigitalRune.Graphics.SceneGraphAssembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax public static void LookAt(
this SceneNode node,
Vector3F target,
Vector3F upVector
)
<ExtensionAttribute>
Public Shared Sub LookAt (
node As SceneNode,
target As Vector3F,
upVector As Vector3F
)
public:
[ExtensionAttribute]
static void LookAt(
SceneNode^ node,
Vector3F target,
Vector3F upVector
)
[<ExtensionAttribute>]
static member LookAt :
node : SceneNode *
target : Vector3F *
upVector : Vector3F -> unit
Parameters
- node
- Type: DigitalRune.Graphics.SceneGraphSceneNode
The scene node. - target
- Type: DigitalRune.Mathematics.AlgebraVector3F
The target coordinates in world space at which the scene node is "looking".
- upVector
- Type: DigitalRune.Mathematics.AlgebraVector3F
The direction that is "up" from the scene node's point of view given in world space. (Does
not need to be normalized.)
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
SceneNode. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Exceptions Remarks
A scene node uses the same coordinate system as the XNA Framework:
By default, the positive x-axis points to the right, the positive y-axis points up, and the
positive z-axis points towards the viewer. This method rotates the scene node so that its
local forward direction (0, 0, -1) is pointing towards target.
See Also