Click or drag to resize
AB4D logo

FreeCamera Methods

The FreeCamera type exposes the following members.

Methods
 NameDescription
Protected methodBaseCreateFrom This method is called from CreateFrom method and actually sets the properties on this camera.
(Overrides BaseCameraBaseCreateFrom(Camera))
Public methodFitIntoView(FitIntoViewType, Boolean, Double, Boolean) FitIntoView adjusts the camera's Distance (for PerspectiveCamera) or CameraWidth (for OrthographicCamera) and TargetPosition (if adjustTargetPosition is true) so that all the objects on the scene will be visible from one edge of the viewport to another edge.
Public methodFitIntoView(IListPoint3D, Boolean, Double, Boolean) FitIntoView adjusts the camera's Distance (for PerspectiveCamera) or CameraWidth (for OrthographicCamera) and TargetPosition (if adjustTargetPosition is true) so that all the specified positions will be visible from one edge of the viewport to another edge.
Public methodFitIntoView(Rect3D, Boolean, Double, Boolean) FitIntoView adjusts the camera's Distance (for PerspectiveCamera) or CameraWidth (for OrthographicCamera) and TargetPosition (if adjustTargetPosition is true) so that all the specified Rect3D will be visible from one edge of the viewport to another edge.
Public methodFitIntoView(IListVisual3D, FitIntoViewType, Boolean, Double, Boolean) FitIntoView adjusts the camera's Distance (for PerspectiveCamera) or CameraWidth (for OrthographicCamera) and TargetPosition (if adjustTargetPosition is true) so that all the objects on defined in list of Visual3D objects will be visible from one edge of the viewport to another edge.
Public methodGetFitIntoViewDistanceOrCameraWidth GetFitIntoViewDistanceOrCameraWidth returns Distance (for PerspectiveCamera) or CameraWidth (for OrthographicCamera) and sets the newTargetPosition that will adjust the camera so that all the objects on the scene will be visible from one edge of the viewport to another edge.
Public methodGetNormalizedUpDirection GetNormalizedUpDirection returns the normalized UpDirection vector. If the vector that is set to the UpDirection property is not perpendicular to the look direction, the returned up direction is corrected to be perpendicular.
Public methodGetNormalizedUpDirection(Vector3D, Vector3D) GetNormalizedUpDirection returns the normalized UpDirection vector. If the specified upDirection is not perpendicular to the look direction, the returned up direction is corrected to be perpendicular.
Public methodGetRotatedCamera GetRotatedCamera method calculates rotatedCameraPosition, rotatedTargetPosition and rotatedUpDirection based on the rotating the camera from the initial camera position and direction.
Public methodIsValid Gets a Boolean that specifies if the camera is valid (has TargetViewport3D that has a valid size; has valid values for all properties). When camera is valid the Point3DTo2D(Point3D) returns correct value; when the camera is not valid, the Point3DTo2D method cannot calculate the 2D screen position.
(Overrides BaseCameraIsValid(Boolean))
Public methodMoveBackward Moves the camera backward (in the opposite as look direction)
Public methodMoveDown Moves the camera down (in the opposite up direction)
Public methodMoveForward Moves the camera forward (in the look direction)
Public methodMoveLeft Moves the camera left (strafe)
Public methodMoveRight Moves the camera right (strafe)
Public methodMoveUp Moves the camera up (in the up direction)
Protected methodOnIsValidChanged OnIsValidChanged is called on IsValidChanged event. The event is subscribed by calling SubscribeToIsValidChanged and unsubscribed by calling UnsubscribeFromIsValidChanged.
(Overrides BaseCameraOnIsValidChanged(Object, EventArgs))
Public methodRotateCamera(Double, Double) Rotates the free camera for the specified heading and attitude. When RotationCenterPosition is set, the camera rotates around RotationCenterPosition which changes the TargetPosition and CameraPosition.
(Overrides BaseCameraRotateCamera(Double, Double))
Public methodRotateCamera(Double, Double, Double) Rotates the free camera for the specified heading, attitude and bank. When RotationCenterPosition is set, the camera rotates around RotationCenterPosition which changes the TargetPosition and CameraPosition.
Public methodRotateCamera(Double, Double, Double, Int32, FuncDouble, Double, FreeCameraAnimationNodeFreeCameraAnimationTypes) Rotates the free camera for the specified heading, attitude and bank. When RotationCenterPosition is set, the camera rotates around RotationCenterPosition which changes the TargetPosition and CameraPosition. When animationDurationInMilliseconds parameter is bigger then 0, then rotation is animated.
Public methodRotateTo(Point3D, Vector3D, Int32, FuncDouble, Double, FreeCameraAnimationNodeFreeCameraAnimationTypes) Animates the CameraPosition and UpDirection to the targetCameraPosition and targetUpDirection. The rotation preserves the TargetPosition and the distance between CameraPosition and TargetPosition. The animation takes animationDurationInMilliseconds and uses easingFunction. By default (when animationType is SphericalInterpolation), the animation uses spherical interpolation instead of linear interpolation to come from the current to the target position.
Public methodRotateTo(Point3D, Point3D, Vector3D, Int32, FuncDouble, Double, FreeCameraAnimationNodeFreeCameraAnimationTypes) Animates the CameraPosition, TargetPosition and UpDirection to the targetCameraPosition, targetTargetPosition and targetUpDirection. The animation takes animationDurationInMilliseconds and uses easingFunction. By default (when animationType is SphericalInterpolation), the animation uses spherical interpolation instead of linear interpolation to come from the current to the target position.
Public methodSetCameraPosition SetCameraPosition method preserves the current TargetPosition and sets the CameraPosition and the UpDirection based on the specified heading, attitude, bank and distance values.
Public methodSetTargetPosition SetTargetPosition method preserves the current CameraPosition and sets the TargetPosition and the UpDirection based on the specified heading, attitude, bank and distance values.
Protected methodStrafeCamera Calculates the moveVector based on the current camera's LookDirection and UpDirection
Protected methodUpdateCamera Updates the ProjectionCamera
(Overrides BaseCameraUpdateCamera(ProjectionCamera))
Top
See Also