Click or drag to resize
Ab4d.SharpEngine logo

FreeCameraGetFitIntoViewDistanceOrViewWidth(SceneNode, FitIntoViewType, Boolean, Vector3) Method

GetFitIntoViewDistanceOrViewWidth returns a Distance (for PerspectiveCamera) or a ViewWidth (for OrthographicCamera) and sets the newTargetPosition that will adjust the camera so that all the specified sceneNodes will be visible from one edge of the viewport to another edge.

Namespace: Ab4d.SharpEngine.Cameras
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.1.9680+a1b1e43de1ad9a7e35472c33948d688d7b40ef79
Syntax
C#
public float GetFitIntoViewDistanceOrViewWidth(
	SceneNode sceneNode,
	FitIntoViewType fitIntoViewType,
	bool adjustTargetPosition,
	out Vector3 newTargetPosition
)

Parameters

sceneNode  SceneNode
SceneNode (can be also a GroupNode) that will be checked and fit into the view
fitIntoViewType  FitIntoViewType
type of check
adjustTargetPosition  Boolean
true if the center position is adjusted; false if center position is preserved
newTargetPosition  Vector3
out Vector3 that specified the new target position

Return Value

Single
Distance (for PerspectiveCamera) or ViewWidth (for OrthographicCamera)

Implements

IFitIntoViewCameraGetFitIntoViewDistanceOrViewWidth(SceneNode, FitIntoViewType, Boolean, Vector3)
See Also