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
cameraOrthographicCameraAn orthographic camera.
newWidthdoubleThe width to animate to.
animationTimedoubleAnimation 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
cameraCameraThe camera.
newLookDirVector3The new look direction.
newUpDirectionVector3The new up direction.
animationTimedoubleThe 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
sourceICameraModelThe source camera.
destCameraThe 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
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
cameraCameraThe camera.
targetVector3The target.
newLookDirectionVector3The new look direction.
animationTimedoubleThe 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
cameraCameraThe camera.
targetVector3The target.
newLookDirectionVector3The new look direction.
newUpDirectionVector3The new up direction.
animationTimedoubleThe animation time.
Reset(Camera)
Resets the specified camera.
public static void Reset(this Camera camera)
Parameters
cameraCameraThe camera.
Reset(OrthographicCamera)
Resets the specified orthographic camera.
public static void Reset(this OrthographicCamera camera)
Parameters
cameraOrthographicCameraThe camera.
Reset(PerspectiveCamera)
Resets the specified perspective camera.
public static void Reset(this PerspectiveCamera camera)
Parameters
cameraPerspectiveCameraThe 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
cameraCameraThe actual camera.
viewportViewport3DXThe viewport.
boundsBoundingBoxThe bounding rectangle.
animationTimedoubleThe 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
cameraCameraThe actual camera.
viewportViewport3DXThe viewport.
animationTimedoubleThe 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
cameraCameraThe camera.
viewportViewport3DXThe viewport.
centerVector3The center of the sphere.
radiusdoubleThe radius of the sphere.
animationTimedoubleThe 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
cameraCameraThe camera.
viewportViewport3DXThe viewport.
zoomRectangleRectThe zoom rectangle.