Table of Contents

Class CameraMath

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

Methods

InitTurnballRotationAxes(Vector2, int, int, CameraCore, out Vector3, out Vector3)

Initializes the 'turn-ball' rotation axes from the specified point.

public static void InitTurnballRotationAxes(Vector2 p1, int viewportWidth, int viewportHeight, CameraCore camera, out Vector3 rotationAxisX, out Vector3 rotationAxisY)

Parameters

p1 Vector2

The point.

viewportWidth int
viewportHeight int
camera CameraCore
rotationAxisX Vector3
rotationAxisY Vector3

RotateTrackball(CameraMode, ref Vector2, ref Vector2, ref Vector3, float, int, int, CameraCore, int, out Vector3, out Vector3, out Vector3)

Rotates the trackball.

public static void RotateTrackball(CameraMode cameraMode, ref Vector2 p1, ref Vector2 p2, ref Vector3 rotateAround, float sensitivity, int viewportWidth, int viewportHeight, CameraCore camera, int invertFactor, out Vector3 newPosition, out Vector3 newLookDirection, out Vector3 newUpDirection)

Parameters

cameraMode CameraMode

The camera mode.

p1 Vector2

The p1.

p2 Vector2

The p2.

rotateAround Vector3

The rotate around.

sensitivity float

The sensitivity.

viewportWidth int

Width of the viewport.

viewportHeight int

Height of the viewport.

camera CameraCore

The camera.

invertFactor int

The invert factor. Right Handed System = 1; LeftHandedSystem = -1;

newPosition Vector3

The new position.

newLookDirection Vector3

The new look direction.

newUpDirection Vector3

The new up direction.

RotateTurnball(CameraMode, ref Vector2, ref Vector2, ref Vector3, float, int, int, CameraCore, int, out Vector3, out Vector3, out Vector3)

Rotates around three axes.

public static void RotateTurnball(CameraMode cameraMode, ref Vector2 p1, ref Vector2 p2, ref Vector3 rotateAround, float sensitivity, int viewportWidth, int viewportHeight, CameraCore camera, int invertFactor, out Vector3 newPosition, out Vector3 newLookDirection, out Vector3 newUpDirection)

Parameters

cameraMode CameraMode

The camera mode.

p1 Vector2

The p1.

p2 Vector2

The p2.

rotateAround Vector3

The rotate around.

sensitivity float

The sensitivity.

viewportWidth int

Width of the viewport.

viewportHeight int

Height of the viewport.

camera CameraCore

The camera.

invertFactor int

The invert factor. Right Handed = 1; Left Handed = -1

newPosition Vector3

The new position.

newLookDirection Vector3

The new look direction.

newUpDirection Vector3

The new up direction.

RotateTurntable(CameraMode, ref Vector2, ref Vector3, float, int, int, CameraCore, int, Vector3, out Vector3, out Vector3, out Vector3)

Rotates using turntable.

public static void RotateTurntable(CameraMode cameraMode, ref Vector2 delta, ref Vector3 rotateAround, float sensitivity, int viewportWidth, int viewportHeight, CameraCore camera, int invertFactor, Vector3 modelUpDirection, out Vector3 newPosition, out Vector3 newLookDirection, out Vector3 newUpDirection)

Parameters

cameraMode CameraMode

The camera mode.

delta Vector2

The delta.

rotateAround Vector3

The rotate around.

sensitivity float

The sensitivity.

viewportWidth int

Width of the viewport.

viewportHeight int

Height of the viewport.

camera CameraCore

The camera.

invertFactor int

The invert factor. Right Handed = 1; Left Handed = -1;

modelUpDirection Vector3

The model up direction.

newPosition Vector3

The new position.

newLookDirection Vector3

The new look direction.

newUpDirection Vector3

The new up direction.