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
p1Vector2The point.
viewportWidthintviewportHeightintcameraCameraCorerotationAxisXVector3rotationAxisYVector3
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
cameraModeCameraModeThe camera mode.
p1Vector2The p1.
p2Vector2The p2.
rotateAroundVector3The rotate around.
sensitivityfloatThe sensitivity.
viewportWidthintWidth of the viewport.
viewportHeightintHeight of the viewport.
cameraCameraCoreThe camera.
invertFactorintThe invert factor. Right Handed System = 1; LeftHandedSystem = -1;
newPositionVector3The new position.
newLookDirectionVector3The new look direction.
newUpDirectionVector3The 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
cameraModeCameraModeThe camera mode.
p1Vector2The p1.
p2Vector2The p2.
rotateAroundVector3The rotate around.
sensitivityfloatThe sensitivity.
viewportWidthintWidth of the viewport.
viewportHeightintHeight of the viewport.
cameraCameraCoreThe camera.
invertFactorintThe invert factor. Right Handed = 1; Left Handed = -1
newPositionVector3The new position.
newLookDirectionVector3The new look direction.
newUpDirectionVector3The 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
cameraModeCameraModeThe camera mode.
deltaVector2The delta.
rotateAroundVector3The rotate around.
sensitivityfloatThe sensitivity.
viewportWidthintWidth of the viewport.
viewportHeightintHeight of the viewport.
cameraCameraCoreThe camera.
invertFactorintThe invert factor. Right Handed = 1; Left Handed = -1;
modelUpDirectionVector3The model up direction.
newPositionVector3The new position.
newLookDirectionVector3The new look direction.
newUpDirectionVector3The new up direction.