Table of Contents

Class CameraCoreExtensions

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

Methods

AnimateWidth(OrthographicCameraCore, float, float)

Animates the orthographic width.

public static void AnimateWidth(this OrthographicCameraCore camera, float newWidth, float animationTime)

Parameters

camera OrthographicCameraCore

An orthographic camera.

newWidth float

The width to animate to.

animationTime float

Animation time in milliseconds

ChangeDirection(CameraCore, Vector3, Vector3, float)

Changes the direction of a camera.

public static void ChangeDirection(this CameraCore camera, Vector3 newLookDir, Vector3 newUpDirection, float animationTime)

Parameters

camera CameraCore

The camera.

newLookDir Vector3

The new look direction.

newUpDirection Vector3

The new up direction.

animationTime float

The animation time.

CreateFrustum(CameraCore, float)

public static BoundingFrustum CreateFrustum(this CameraCore camera, float aspectRatio)

Parameters

camera CameraCore
aspectRatio float

Returns

BoundingFrustum

LookAt(CameraCore, Vector3, Vector3, Vector3, float)

Looks at.

public static void LookAt(this CameraCore camera, Vector3 target, Vector3 newLookDirection, Vector3 newUpDirection, float animationTime)

Parameters

camera CameraCore

The camera.

target Vector3

The target.

newLookDirection Vector3

The new look direction.

newUpDirection Vector3

The new up direction.

animationTime float

The animation time.

LookAt(CameraCore, Vector3, Vector3, float)

Set the camera target point and look direction

public static void LookAt(this CameraCore camera, Vector3 target, Vector3 newLookDirection, float animationTime)

Parameters

camera CameraCore

The camera.

target Vector3

The target.

newLookDirection Vector3

The new look direction.

animationTime float

The animation time.

LookAt(CameraCore, Vector3, float)

Set the camera target point without changing the look direction.

public static void LookAt(this CameraCore camera, Vector3 target, float animationTime)

Parameters

camera CameraCore

The camera.

target Vector3

The target.

animationTime float

The animation time.

Reset(CameraCore)

Resets the specified camera.

public static void Reset(this CameraCore camera)

Parameters

camera CameraCore

The camera.

Reset(OrthographicCameraCore)

Resets the specified orthographic camera.

public static void Reset(this OrthographicCameraCore camera)

Parameters

camera OrthographicCameraCore

The camera.

Reset(PerspectiveCameraCore)

Resets the specified perspective camera.

public static void Reset(this PerspectiveCameraCore camera)

Parameters

camera PerspectiveCameraCore

The camera.

ZoomExtents(CameraCore, ViewportCore, BoundingBox, float)

Zooms to fit the specified bounding rectangle.

public static void ZoomExtents(this CameraCore camera, ViewportCore viewport, BoundingBox bounds, float animationTime = 0)

Parameters

camera CameraCore

The actual camera.

viewport ViewportCore

The viewport.

bounds BoundingBox

The bounding rectangle.

animationTime float

The animation time.

ZoomExtents(CameraCore, ViewportCore, Vector3, float, float)

Zooms to fit the specified sphere.

public static void ZoomExtents(this CameraCore camera, ViewportCore viewport, Vector3 center, float radius, float animationTime = 0)

Parameters

camera CameraCore

The camera.

viewport ViewportCore

The viewport.

center Vector3

The center of the sphere.

radius float

The radius of the sphere.

animationTime float

The animation time.

ZoomExtents(CameraCore, ViewportCore, float)

Zooms to fit the extents of the specified viewport.

public static void ZoomExtents(this CameraCore camera, ViewportCore viewport, float animationTime = 0)

Parameters

camera CameraCore

The actual camera.

viewport ViewportCore

The viewport.

animationTime float

The animation time.

ZoomExtents(OrthographicCameraCore, float, BoundingBox, out Vector3, out Vector3, out Vector3, out float)

public static void ZoomExtents(this OrthographicCameraCore camera, float aspectRatio, BoundingBox boundingBox, out Vector3 position, out Vector3 lookDir, out Vector3 upDir, out float width)

Parameters

camera OrthographicCameraCore
aspectRatio float
boundingBox BoundingBox
position Vector3
lookDir Vector3
upDir Vector3
width float

ZoomExtents(PerspectiveCameraCore, float, BoundingBox, out Vector3, out Vector3, out Vector3)

public static void ZoomExtents(this PerspectiveCameraCore camera, float aspectRatio, BoundingBox boundingBox, out Vector3 position, out Vector3 lookDir, out Vector3 upDir)

Parameters

camera PerspectiveCameraCore
aspectRatio float
boundingBox BoundingBox
position Vector3
lookDir Vector3
upDir Vector3

ZoomToRectangle(CameraCore, ViewportCore, RectangleF)

Zooms the camera to the specified rectangle.

public static void ZoomToRectangle(this CameraCore camera, ViewportCore viewport, RectangleF zoomRectangle)

Parameters

camera CameraCore

The camera.

viewport ViewportCore

The viewport.

zoomRectangle RectangleF

The zoom rectangle.