Base |
The BaseCamera type exposes the following members.
Name | Description | |
---|---|---|
ArrangeOverride |
override ArrangeOverride - used to display design time info
(Overrides FrameworkElementArrangeOverride(Size)) | |
BaseCreateFrom | This method is called from CreateFrom method and actually sets the properties on this camera. | |
BeginCameraUpdate | BeginCameraUpdate method must be called in each UpdateCamera method, to ensure that the CameraChanged event is fired after all the UpdateCamera methods in all child cameras are called. | |
BeginInit |
BeginInit
(Overrides FrameworkElementBeginInit) | |
CameraPropertyChanged | Called when a property that updates the camera is changed | |
CameraTypePropertyPropertyChanged | Called when CameraType is changed | |
CameraWidthPropertyChanged | Called when CameraWidth is changed | |
ConvertToWpfCamera | ConvertToWpfCamera method converts Ab3d.PowerToys camera to a standard WPF camera. | |
CreateFrom | Creates an Ab3d.Camera from a WPF's Camera. | |
CreateMouseRay3D(Point, Point3D, Vector3D) | CreateMouseRay3D calculates the 3D ray that goes from the mouse position into the 3D scene. The ray goes from rayOrigin in the rayDirection. If the ray cannot be calculated this method returns false. | |
CreateMouseRay3D(Point, Size, Matrix3D, Matrix3D, Point3D, Vector3D) | Obsolete. CreateMouseRay3D calculates a normalized 3D ray that goes from the mouse position into the 3D scene. The ray goes from rayOrigin in the rayDirection. If the ray cannot be calculated this method returns false. | |
CreateNewCamera(BaseCameraCameraTypes) | Creates a new Camera for the cameraType. | |
CreateNewCamera(Viewport3D) | Creates a new Camera for the viewport3D | |
CreateNewCamera(Viewport3D, BaseCameraCameraTypes) | Creates a new Camera for the viewport3D and cameraType. | |
CreateOrthographicMouseRay3D | CreateOrthographicMouseRay3D is used for orthographic camera and calculates a normalized 3D ray that goes from the mouse position into the 3D scene for an Orthographic camera. The ray goes from rayOrigin in the rayDirection. If the ray cannot be calculated this method returns false. For perspective camera use CreatePerspectiveMouseRay3D(Point, Size, Matrix3D, Matrix3D, Point3D, Vector3D) or use non-static CreateMouseRay3D(Point, Point3D, Vector3D) method. | |
CreatePerspectiveMouseRay3D | CreatePerspectiveMouseRay3D is used for perspective camera and calculates a normalized 3D ray that goes from the mouse position into the 3D scene. The ray goes from rayOrigin in the rayDirection. If the ray cannot be calculated this method returns false. For orthographic camera use CreateOrthographicMouseRay3D(Point, Size, Point3D, Vector3D, Vector3D, Double, Double, Point3D, Vector3D) or use non-static CreateMouseRay3D(Point, Point3D, Vector3D) method. | |
EndCameraUpdate | EndCameraUpdate method must be called in each UpdateCamera method, to ensure that the CameraChanged event is fired after all the UpdateCamera methods in all child cameras are called. | |
EndInit |
EndInit
(Overrides FrameworkElementEndInit) | |
FarPlaneDistancePropertyChanged | Called when FarPlaneDistance is changed | |
FieldOfViewPropertyChanged | Called when FieldOfView is changed | |
ForceRefresh | Forces a refresh of the camera. | |
GetCameraMatrices(Matrix3D, Matrix3D) | GetCameraMatrices gets view and projection matrix of the current camera. | |
GetCameraMatrices(Viewport3D, Matrix3D, Matrix3D) | GetCameraMatrices gets view and projection matrix of the camera used by the specified viewport3D. | |
GetCameraMatrices(BaseCamera, Double, Matrix3D, Matrix3D) | GetCameraMatrices gets view and projection matrix of specified Ab3d.PowerToys camera and specified viewport's aspect ratio. The method sets matrices even if TargetViewport3D is not assigned to the camera. | |
GetCameraMatrices(Camera, Double, Matrix3D, Matrix3D) | GetCameraMatrices gets view and projection matrix of specified camera and specified viewport's aspect ratio. | |
GetCameraMatrixes(Matrix3D, Matrix3D) | GetCameraMatrixes gets view and projection matrix of the current camera. | |
GetCameraMatrixes(Viewport3D, Matrix3D, Matrix3D) | GetCameraMatrixes gets view and projection matrix of the camera used by the specified viewport3D. | |
GetCameraMatrixes(BaseCamera, Double, Matrix3D, Matrix3D) | GetCameraMatrixes gets view and projection matrix of specified Ab3d.PowerToys camera and specified viewport's aspect ratio. The method sets matrixes even if TargetViewport3D is not assigned to the camera. | |
GetCameraMatrixes(Camera, Double, Matrix3D, Matrix3D) | GetCameraMatrixes gets view and projection matrix of specified camera and specified viewport's aspect ratio. | |
GetCameraPlaneOrientation(Vector3D, Vector3D, Vector3D) | GetCameraPlaneOrientation gets plane's width and height vectors that can be used to orient the plane 3D model so that it is aligned with the camera view. | |
GetCameraPlaneOrientation(ProjectionCamera, Vector3D, Vector3D, Vector3D) | GetCameraPlaneOrientation sets plane width and height vectors that can be used to orient the plane 3D model so that it is aligned with the camera view. | |
GetCameraPosition | Gets the position of the camera. | |
GetMousePositionOnPlane | GetMousePositionOnPlane calculates a position where a ray from mouse position intersects a plane. Returns false if there is no intersection. | |
GetScreenSize | GetScreenSize calculates a size on screen (in same units as size of Viewport3D.Width - without DPI scale) of a Size in 3D space (worldSize) that is at distanceFromCamera and shown with this camera and in TargetViewport3D. | |
GetTargetViewport3DSceneBounds | Returns a Rect3D that represents the bounding box of the 3D scene defined in the TargetViewport3D. | |
GetWorldSize | GetWorldSize calculates a size in 3D world coordinates from a size provided in 2D screen coordinates. The calculation is based on the this camera and the screen size of TargetViewport3D. | |
GetWorldToViewportMatrix | Gets Matrix3D that can be used to convert 3D coordinates to 2D viewport (screen) coordinates. If the method returns true, than the worldToViewportMatrix was set; if false is returned than the matrix cannot be calculated. | |
GetWPFCameraDirections | The method gets lookDirection and upDirection from WPF's camera | |
GetWPFCameraPosition | Returns a Position of the WPF camera. | |
InitInfoElement | Initializes the info element that is used for design time support | |
IsDesignTimeInfoIconShownPropertyChanged | Called when IsDesignTimeInfoIconShown is changed | |
IsValid | 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. | |
Line3DTo2D(Point3D, Point3D, Point, Point) | Converts a 3D line that is defined by startPositionWorld and endPositionWorld to a line on the screen that is defined by startPositionScreen and endPositionScreen. This method correctly handles the case when the 3D line crosses the camera near plane (goes behind the camera). In this case the line needs to be cropped at the camera near plane. | |
Line3DTo2D(Point3D, Point3D, Size, Point, Point) | Converts a 3D line that is defined by startPositionWorld and endPositionWorld to a line on the screen that is defined by startPositionScreen and endPositionScreen. The method takes a custom Viewport3D size and does not require that this Camera class is connected to real Viewport3D. This method correctly handles the case when the 3D line crosses the camera near plane (goes behind the camera). In this case the line needs to be cropped at the camera near plane. | |
MeasureOverride |
override MeasureOverride - used to display design time info
(Overrides FrameworkElementMeasureOverride(Size)) | |
NearPlaneDistancePropertyChanged | Called when NearPlaneDistance is changed | |
OnCameraChanged | Called to raise CameraChangedRoutedEvent | |
OnCameraLoaded | OnCameraLoaded methods ensures that the CurrentCamera is set | |
OnIsRotatingChanged | OnIsRotatingChanged is caled to fire IsRotatingChanged event. | |
OnIsValidChanged | OnIsValidChanged is called on IsValidChanged event. The event is subscribed by calling SubscribeToIsValidChanged and unsubscribed by calling UnsubscribeFromIsValidChanged. | |
OnPreviewCameraChanged | OnPreviewCameraChanged calls the PreviewCameraChangedEvent routed event. | |
OnRender |
OnRender
(Overrides UIElementOnRender(DrawingContext)) | |
OnRendering | Called when Rendering event is subscribed | |
OnTargetViewport3DChanged | OnTargetViewport3DChanged is called when the TargetViewport3D is changed | |
Point3DTo2D(Point3D) | Converts a Point3D to the Point 2D on the screen. | |
Point3DTo2D(Point3D, Size) | Converts a Point3D to the Point 2D on the screen with custom Viewport3D size (no need that this Camera class is connected to real Viewport3D) | |
Points3DTo2D(IListPoint3D, Point, Transform3D, Boolean) | Points3DTo2D calculates 2D screen positions from the specified 3D positions. Calculated screen positions are stored into the specified points2D array (its size must be at least the size of the 3D positions). | |
Points3DTo2D(Point3D, Point, Transform3D, Boolean) | Points3DTo2D calculates 2D screen positions from the specified 3D positions. Calculated screen positions are stored into the specified points2D array (its size must be at least the size of the 3D positions). | |
Rect3DTo2D | Converts a Rect3D to the Rect 2D on the screen. | |
Refresh | Refresh method refreshes the camera. | |
RefreshCurrentCamera | Refreshes the CurrentCamera - check if TargetViewport3D is null and tries to find it, also creates a new camera is necessary | |
RenderToBitmap(Brush, Int32) | Renders TargetViewport3D to bitmap with specified backgroundBrush and dpi. The size of the created bitmap is the same as the size of the TargetViewport3D. | |
RenderToBitmap(Int32, Int32, Int32, Brush, Int32) | Renders TargetViewport3D to bitmap. It is possible to specify custom bitmap width and height (when customWidth and customHeight are bigger than 0). When antialiasingLevel is bigger than 1, the bitmap is rendered into bigger image and than scaled down to create an antialiasing effect. | |
RotateCamera | Rotates the camera for the specified heading and attitude | |
StartRotation(Double, Double) | StartRotation method immediately starts Heading and Attitude animation for this camera. To slowly start the camera rotation and than accelerating the rotation, use the StartRotation(Double, Double, Double, BaseCameraEasingFunctionDelegate) method. | |
StartRotation(Double, Double, Double, BaseCameraEasingFunctionDelegate) | StartRotation method slowly starts the camera rotation (changing Heading and Attitude) and than accelerates the rotation. To immediately start rotation for this camera, use the StartRotation(Double, Double) method. | |
StopRotation | StopRotation immediately stops the animation of the camera. To slowly stop the camera rotation with preserving the camera's inertia, use the StopRotation(Double, BaseCameraEasingFunctionDelegate) method. | |
StopRotation(Double, BaseCameraEasingFunctionDelegate) | StopRotation slowly stops the animation of the camera with preserving the rotation inertia. | |
SubscribeRenderingEvent | Subscribe to Rendering event | |
SubscribeToIsValidChanged | SubscribeToIsValidChanged | |
TargetViewport3DPropertyChanged | Called when a property that updates the camera is changed | |
TryToUpdate | Update the Camera if it is already initialized and is not in a batch updated (using BeginInit) | |
UnsubscribeFromIsValidChanged | UnsubscribeFromIsValidChanged | |
UnsubscribeRenderingEvent | Unsubscribe to Rendering event | |
UpdateCamera | Updates the CurrentCamera | |
UpdateCameraLight | Updates the camera light if needed | |
UpdateCameraLightData | Updates the CameraLight based on the current camera position | |
UpdateWorldToViewportMatrix | Updates the worldToViewportMatrix if needed | |
UpdateWpfCamera | UpdateWpfCamera method updates the specified WPF camera from this Ab3d.PowerToys camera. |