Table of Contents

Class CameraExtensions

Namespace
HelixToolkit.WinUI.SharpDX
Assembly
HelixToolkit.WinUI.SharpDX.dll
public static class CameraExtensions
Inheritance
CameraExtensions
Inherited Members

Methods

AnimateWidth(OrthographicCamera, double, double)

Animates the orthographic width.

public static void AnimateWidth(this OrthographicCamera camera, double newWidth, double animationTime)

Parameters

camera OrthographicCamera

An orthographic camera.

newWidth double

The width to animate to.

animationTime double

Animation time in milliseconds

ChangeDirection(Camera, Vector3, Vector3, double)

Changes the direction of a camera.

public static void ChangeDirection(this Camera camera, Vector3 newLookDir, Vector3 newUpDirection, double animationTime)

Parameters

camera Camera

The camera.

newLookDir Vector3

The new look direction.

newUpDirection Vector3

The new up direction.

animationTime double

The animation time.

CopyTo(ICameraModel, Camera?)

Copies the specified camera, converts field of view/width if necessary.

public static void CopyTo(this ICameraModel source, Camera? dest)

Parameters

source ICameraModel

The source camera.

dest Camera

The destination camera.

LookAt(Camera, Vector3, double)

Set the camera target point without changing the look direction.

public static void LookAt(this Camera camera, Vector3 target, double animationTime)

Parameters

camera Camera

The camera.

target Vector3

The target.

animationTime double

The animation time.

LookAt(Camera, Vector3, Vector3, double)

Set the camera target point and look direction

public static void LookAt(this Camera camera, Vector3 target, Vector3 newLookDirection, double animationTime)

Parameters

camera Camera

The camera.

target Vector3

The target.

newLookDirection Vector3

The new look direction.

animationTime double

The animation time.

LookAt(Camera, Vector3, Vector3, Vector3, double)

Set the camera target point and directions

public static void LookAt(this Camera camera, Vector3 target, Vector3 newLookDirection, Vector3 newUpDirection, double animationTime)

Parameters

camera Camera

The camera.

target Vector3

The target.

newLookDirection Vector3

The new look direction.

newUpDirection Vector3

The new up direction.

animationTime double

The animation time.

Reset(Camera)

Resets the specified camera.

public static void Reset(this Camera camera)

Parameters

camera Camera

The camera.

Reset(OrthographicCamera)

Resets the specified orthographic camera.

public static void Reset(this OrthographicCamera camera)

Parameters

camera OrthographicCamera

The camera.

Reset(PerspectiveCamera)

Resets the specified perspective camera.

public static void Reset(this PerspectiveCamera camera)

Parameters

camera PerspectiveCamera

The camera.

ZoomExtents(Camera, Viewport3DX, BoundingBox, double)

Zooms to fit the specified bounding rectangle.

public static void ZoomExtents(this Camera camera, Viewport3DX viewport, BoundingBox bounds, double animationTime = 0)

Parameters

camera Camera

The actual camera.

viewport Viewport3DX

The viewport.

bounds BoundingBox

The bounding rectangle.

animationTime double

The animation time.

ZoomExtents(Camera, Viewport3DX, double)

Zooms to fit the extents of the specified viewport.

public static void ZoomExtents(this Camera camera, Viewport3DX viewport, double animationTime = 0)

Parameters

camera Camera

The actual camera.

viewport Viewport3DX

The viewport.

animationTime double

The animation time.

ZoomExtents(Camera, Viewport3DX, Vector3, double, double)

Zooms to fit the specified sphere.

public static void ZoomExtents(this Camera camera, Viewport3DX viewport, Vector3 center, double radius, double animationTime = 0)

Parameters

camera Camera

The camera.

viewport Viewport3DX

The viewport.

center Vector3

The center of the sphere.

radius double

The radius of the sphere.

animationTime double

The animation time.

ZoomToRectangle(Camera, Viewport3DX, Rect)

Zooms the camera to the specified rectangle.

public static void ZoomToRectangle(this Camera camera, Viewport3DX viewport, Rect zoomRectangle)

Parameters

camera Camera

The camera.

viewport Viewport3DX

The viewport.

zoomRectangle Rect

The zoom rectangle.