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
cameraOrthographicCameraCoreAn orthographic camera.
newWidthfloatThe width to animate to.
animationTimefloatAnimation 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
cameraCameraCoreThe camera.
newLookDirVector3The new look direction.
newUpDirectionVector3The new up direction.
animationTimefloatThe animation time.
CreateFrustum(CameraCore, float)
public static BoundingFrustum CreateFrustum(this CameraCore camera, float aspectRatio)
Parameters
cameraCameraCoreaspectRatiofloat
Returns
LookAt(CameraCore, Vector3, Vector3, Vector3, float)
Looks at.
public static void LookAt(this CameraCore camera, Vector3 target, Vector3 newLookDirection, Vector3 newUpDirection, float animationTime)
Parameters
cameraCameraCoreThe camera.
targetVector3The target.
newLookDirectionVector3The new look direction.
newUpDirectionVector3The new up direction.
animationTimefloatThe 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
cameraCameraCoreThe camera.
targetVector3The target.
newLookDirectionVector3The new look direction.
animationTimefloatThe 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
cameraCameraCoreThe camera.
targetVector3The target.
animationTimefloatThe animation time.
Reset(CameraCore)
Resets the specified camera.
public static void Reset(this CameraCore camera)
Parameters
cameraCameraCoreThe camera.
Reset(OrthographicCameraCore)
Resets the specified orthographic camera.
public static void Reset(this OrthographicCameraCore camera)
Parameters
cameraOrthographicCameraCoreThe camera.
Reset(PerspectiveCameraCore)
Resets the specified perspective camera.
public static void Reset(this PerspectiveCameraCore camera)
Parameters
cameraPerspectiveCameraCoreThe 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
cameraCameraCoreThe actual camera.
viewportViewportCoreThe viewport.
boundsBoundingBoxThe bounding rectangle.
animationTimefloatThe 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
cameraCameraCoreThe camera.
viewportViewportCoreThe viewport.
centerVector3The center of the sphere.
radiusfloatThe radius of the sphere.
animationTimefloatThe 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
cameraCameraCoreThe actual camera.
viewportViewportCoreThe viewport.
animationTimefloatThe 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
cameraOrthographicCameraCoreaspectRatiofloatboundingBoxBoundingBoxpositionVector3lookDirVector3upDirVector3widthfloat
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
cameraPerspectiveCameraCoreaspectRatiofloatboundingBoxBoundingBoxpositionVector3lookDirVector3upDirVector3
ZoomToRectangle(CameraCore, ViewportCore, RectangleF)
Zooms the camera to the specified rectangle.
public static void ZoomToRectangle(this CameraCore camera, ViewportCore viewport, RectangleF zoomRectangle)
Parameters
cameraCameraCoreThe camera.
viewportViewportCoreThe viewport.
zoomRectangleRectangleFThe zoom rectangle.