C# Class HelixToolkit.Wpf.CameraHelper

Provides extension methods for Camera derived classes.
ファイルを表示 Open project: litdev1/LitDev Class Usage Examples

Public Methods

Method Description
AnimateTo ( System.Windows.Media.Media3D.ProjectionCamera camera, System.Windows.Media.Media3D.Point3D newPosition, System.Windows.Media.Media3D.Vector3D newDirection, System.Windows.Media.Media3D.Vector3D newUpDirection, double animationTime ) : void

Animates the camera position and directions.

AnimateWidth ( System.Windows.Media.Media3D.OrthographicCamera camera, double newWidth, double animationTime ) : void

Animates the orthographic width.

ChangeDirection ( System.Windows.Media.Media3D.ProjectionCamera camera, System.Windows.Media.Media3D.Vector3D newLookDir, System.Windows.Media.Media3D.Vector3D newUpDirection, double animationTime ) : void

Changes the direction of a camera.

Copy ( System.Windows.Media.Media3D.ProjectionCamera source, System.Windows.Media.Media3D.ProjectionCamera dest ) : void

Copies the specified camera, converts field of view/width if neccessary.

CopyDirectionOnly ( System.Windows.Media.Media3D.ProjectionCamera source, System.Windows.Media.Media3D.ProjectionCamera dest, double distance ) : void

Copy the direction of the source Camera. Used for the CoordinateSystem view.

CreateDefaultCamera ( ) : System.Windows.Media.Media3D.PerspectiveCamera

Creates a default perspective camera.

GetInfo ( Camera camera ) : string

Gets an information string about the specified camera.

LookAt ( System.Windows.Media.Media3D.ProjectionCamera camera, System.Windows.Media.Media3D.Point3D target, System.Windows.Media.Media3D.Vector3D newLookDirection, System.Windows.Media.Media3D.Vector3D newUpDirection, double animationTime ) : void

Set the camera target point and directions

LookAt ( System.Windows.Media.Media3D.ProjectionCamera camera, System.Windows.Media.Media3D.Point3D target, System.Windows.Media.Media3D.Vector3D newLookDirection, double animationTime ) : void

Set the camera target point and look direction

LookAt ( System.Windows.Media.Media3D.ProjectionCamera camera, System.Windows.Media.Media3D.Point3D target, double animationTime ) : void

Set the camera target point without changing the look direction.

LookAt ( System.Windows.Media.Media3D.ProjectionCamera camera, System.Windows.Media.Media3D.Point3D target, double distance, double animationTime ) : void

Set the camera target point and camera distance.

Reset ( Camera camera ) : void

Resets the specified camera.

Reset ( System.Windows.Media.Media3D.OrthographicCamera camera ) : void

Resets the specified orthographic camera.

Reset ( System.Windows.Media.Media3D.PerspectiveCamera camera ) : void

Resets the specified perspective camera.

ZoomExtents ( System.Windows.Media.Media3D.ProjectionCamera camera, System.Windows.Controls.Viewport3D viewport, System.Windows.Media.Media3D.Point3D center, double radius, double animationTime ) : void

Zooms to fit the specified sphere.

ZoomExtents ( System.Windows.Media.Media3D.ProjectionCamera actualCamera, System.Windows.Controls.Viewport3D viewport, System.Windows.Media.Media3D.Rect3D bounds, double animationTime ) : void

Zooms to fit the specified bounding rectangle.

ZoomExtents ( System.Windows.Media.Media3D.ProjectionCamera actualCamera, System.Windows.Controls.Viewport3D viewport, double animationTime ) : void

Zooms to fit the extents of the specified viewport.

ZoomToRectangle ( System.Windows.Media.Media3D.ProjectionCamera camera, System.Windows.Controls.Viewport3D viewport, Rect zoomRectangle ) : void

Zooms the camera to the specified rectangle.

Method Details

AnimateTo() public static method

Animates the camera position and directions.
public static AnimateTo ( System.Windows.Media.Media3D.ProjectionCamera camera, System.Windows.Media.Media3D.Point3D newPosition, System.Windows.Media.Media3D.Vector3D newDirection, System.Windows.Media.Media3D.Vector3D newUpDirection, double animationTime ) : void
camera System.Windows.Media.Media3D.ProjectionCamera /// The camera to animate. ///
newPosition System.Windows.Media.Media3D.Point3D /// The position to animate to. ///
newDirection System.Windows.Media.Media3D.Vector3D /// The direction to animate to. ///
newUpDirection System.Windows.Media.Media3D.Vector3D /// The up direction to animate to. ///
animationTime double /// Animation time in milliseconds. ///
return void

AnimateWidth() public static method

Animates the orthographic width.
public static AnimateWidth ( System.Windows.Media.Media3D.OrthographicCamera camera, double newWidth, double animationTime ) : void
camera System.Windows.Media.Media3D.OrthographicCamera /// An ortographic camera. ///
newWidth double /// The width to animate to. ///
animationTime double /// Animation time in milliseconds ///
return void

ChangeDirection() public static method

Changes the direction of a camera.
public static ChangeDirection ( System.Windows.Media.Media3D.ProjectionCamera camera, System.Windows.Media.Media3D.Vector3D newLookDir, System.Windows.Media.Media3D.Vector3D newUpDirection, double animationTime ) : void
camera System.Windows.Media.Media3D.ProjectionCamera /// The camera. ///
newLookDir System.Windows.Media.Media3D.Vector3D /// The new look dir. ///
newUpDirection System.Windows.Media.Media3D.Vector3D /// The new up direction. ///
animationTime double /// The animation time. ///
return void

Copy() public static method

Copies the specified camera, converts field of view/width if neccessary.
public static Copy ( System.Windows.Media.Media3D.ProjectionCamera source, System.Windows.Media.Media3D.ProjectionCamera dest ) : void
source System.Windows.Media.Media3D.ProjectionCamera /// The source camera. ///
dest System.Windows.Media.Media3D.ProjectionCamera /// The destination camera. ///
return void

CopyDirectionOnly() public static method

Copy the direction of the source Camera. Used for the CoordinateSystem view.
public static CopyDirectionOnly ( System.Windows.Media.Media3D.ProjectionCamera source, System.Windows.Media.Media3D.ProjectionCamera dest, double distance ) : void
source System.Windows.Media.Media3D.ProjectionCamera /// The source camera. ///
dest System.Windows.Media.Media3D.ProjectionCamera /// The destination camera. ///
distance double /// New length of the LookDirection vector. ///
return void

CreateDefaultCamera() public static method

Creates a default perspective camera.
public static CreateDefaultCamera ( ) : System.Windows.Media.Media3D.PerspectiveCamera
return System.Windows.Media.Media3D.PerspectiveCamera

GetInfo() public static method

Gets an information string about the specified camera.
public static GetInfo ( Camera camera ) : string
camera System.Windows.Media.Media3D.Camera /// The camera. ///
return string

LookAt() public static method

Set the camera target point and directions
public static LookAt ( System.Windows.Media.Media3D.ProjectionCamera camera, System.Windows.Media.Media3D.Point3D target, System.Windows.Media.Media3D.Vector3D newLookDirection, System.Windows.Media.Media3D.Vector3D newUpDirection, double animationTime ) : void
camera System.Windows.Media.Media3D.ProjectionCamera /// The camera. ///
target System.Windows.Media.Media3D.Point3D /// The target. ///
newLookDirection System.Windows.Media.Media3D.Vector3D /// The new look direction. ///
newUpDirection System.Windows.Media.Media3D.Vector3D /// The new up direction. ///
animationTime double /// The animation time. ///
return void

LookAt() public static method

Set the camera target point and look direction
public static LookAt ( System.Windows.Media.Media3D.ProjectionCamera camera, System.Windows.Media.Media3D.Point3D target, System.Windows.Media.Media3D.Vector3D newLookDirection, double animationTime ) : void
camera System.Windows.Media.Media3D.ProjectionCamera /// The camera. ///
target System.Windows.Media.Media3D.Point3D /// The target. ///
newLookDirection System.Windows.Media.Media3D.Vector3D /// The new look direction. ///
animationTime double /// The animation time. ///
return void

LookAt() public static method

Set the camera target point without changing the look direction.
public static LookAt ( System.Windows.Media.Media3D.ProjectionCamera camera, System.Windows.Media.Media3D.Point3D target, double animationTime ) : void
camera System.Windows.Media.Media3D.ProjectionCamera /// The camera. ///
target System.Windows.Media.Media3D.Point3D /// The target. ///
animationTime double /// The animation time. ///
return void

LookAt() public static method

Set the camera target point and camera distance.
public static LookAt ( System.Windows.Media.Media3D.ProjectionCamera camera, System.Windows.Media.Media3D.Point3D target, double distance, double animationTime ) : void
camera System.Windows.Media.Media3D.ProjectionCamera /// The camera. ///
target System.Windows.Media.Media3D.Point3D /// The target point. ///
distance double /// The distance to the camera. ///
animationTime double /// The animation time. ///
return void

Reset() public static method

Resets the specified camera.
public static Reset ( Camera camera ) : void
camera System.Windows.Media.Media3D.Camera /// The camera. ///
return void

Reset() public static method

Resets the specified orthographic camera.
public static Reset ( System.Windows.Media.Media3D.OrthographicCamera camera ) : void
camera System.Windows.Media.Media3D.OrthographicCamera /// The camera. ///
return void

Reset() public static method

Resets the specified perspective camera.
public static Reset ( System.Windows.Media.Media3D.PerspectiveCamera camera ) : void
camera System.Windows.Media.Media3D.PerspectiveCamera /// The camera. ///
return void

ZoomExtents() public static method

Zooms to fit the specified sphere.
public static ZoomExtents ( System.Windows.Media.Media3D.ProjectionCamera camera, System.Windows.Controls.Viewport3D viewport, System.Windows.Media.Media3D.Point3D center, double radius, double animationTime ) : void
camera System.Windows.Media.Media3D.ProjectionCamera /// The camera. ///
viewport System.Windows.Controls.Viewport3D /// The viewport. ///
center System.Windows.Media.Media3D.Point3D /// The center of the sphere. ///
radius double /// The radius of the sphere. ///
animationTime double /// The animation time. ///
return void

ZoomExtents() public static method

Zooms to fit the specified bounding rectangle.
public static ZoomExtents ( System.Windows.Media.Media3D.ProjectionCamera actualCamera, System.Windows.Controls.Viewport3D viewport, System.Windows.Media.Media3D.Rect3D bounds, double animationTime ) : void
actualCamera System.Windows.Media.Media3D.ProjectionCamera /// The actual camera. ///
viewport System.Windows.Controls.Viewport3D /// The viewport. ///
bounds System.Windows.Media.Media3D.Rect3D /// The bounding rectangle. ///
animationTime double /// The animation time. ///
return void

ZoomExtents() public static method

Zooms to fit the extents of the specified viewport.
public static ZoomExtents ( System.Windows.Media.Media3D.ProjectionCamera actualCamera, System.Windows.Controls.Viewport3D viewport, double animationTime ) : void
actualCamera System.Windows.Media.Media3D.ProjectionCamera /// The actual camera. ///
viewport System.Windows.Controls.Viewport3D /// The viewport. ///
animationTime double /// The animation time. ///
return void

ZoomToRectangle() public static method

Zooms the camera to the specified rectangle.
public static ZoomToRectangle ( System.Windows.Media.Media3D.ProjectionCamera camera, System.Windows.Controls.Viewport3D viewport, Rect zoomRectangle ) : void
camera System.Windows.Media.Media3D.ProjectionCamera /// The camera. ///
viewport System.Windows.Controls.Viewport3D /// The viewport. ///
zoomRectangle System.Windows.Rect /// The zoom rectangle. ///
return void