Table of Contents

Class StereoHelper

Namespace
HelixToolkit.Wpf
Assembly
HelixToolkit.Wpf.dll

Contains helper methods for stereoscopic views.

public static class StereoHelper
Inheritance
StereoHelper
Inherited Members

Methods

CalculateStereoBase(double, double, double, double)

Calculate the stereo base using the full Bercovitz formula B = P(LN/(L-N)) (1/F - (L+N)/2LN) http://nzphoto.tripod.com/stereo/3dtake/fbercowitz.htm

public static double CalculateStereoBase(double P, double L, double N, double F)

Parameters

P double

Parallax aimed for, in mm on the film

L double

Largest distance from the camera lens, mm

N double

Nearest distance from the camera lens, mm

F double

Focal length of the lens, mm

Returns

double

The stereo base

CalculateStereoBase(double, double, double, double, double)

Calculate the stereo base using the full Bercovitz formula

public static double CalculateStereoBase(double L, double N, double screenWidth, double depthRatio, double hfov)

Parameters

L double

Largest distance from the camera lens

N double

Nearest distance from the camera lens

screenWidth double

Width of screen

depthRatio double

depth ratio 1/30

hfov double

Horizontal field of view

Returns

double

The stereo base

CreateClone(Visual3D)

Create a clone of a Visual3D

public static Visual3D? CreateClone(Visual3D v)

Parameters

v Visual3D

a Visual3D

Returns

Visual3D

the clone

FindFocalLength(double, double)

Find the focal length given the field of view and the format http://en.wikipedia.org/wiki/Angle_of_view

public static double FindFocalLength(double fov, double format)

Parameters

fov double

field of view (degrees)

format double

e.g. 36mm

Returns

double

The focal length in the same unit as the format

UpdateStereoCameras(PerspectiveCamera?, PerspectiveCamera?, PerspectiveCamera?, double, bool, bool, bool)

Updates the left and right camera based on a center camera.

public static void UpdateStereoCameras(PerspectiveCamera? centerCamera, PerspectiveCamera? leftCamera, PerspectiveCamera? rightCamera, double stereoBase, bool crossViewing = false, bool sameUpDirection = true, bool sameDirection = true)

Parameters

centerCamera PerspectiveCamera

Center camera (input)

leftCamera PerspectiveCamera

Left camera (is updated)

rightCamera PerspectiveCamera

Right camera (is updated)

stereoBase double

Stereo base

crossViewing bool

true for cross-viewing, false for parallel-viewing (default is false)

sameUpDirection bool

use the same UpDirection for both cameras (default is true)

sameDirection bool

use the same LookDirection for both cameras (default is true)