FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Camera

    struct · ferroui-media3d · v0.5.0

    struct Camera
    

    WPF's Camera: the base of the cameras, with a Transform that places the camera in the world.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<Camera>
    

    Returns a strong reference to this object.

    Source

    get_view_matrix

    fn get_view_matrix(self: &Self) -> Matrix3D
    

    The matrix from the world to the coordinates of the camera, its transform included (WPF's GetViewMatrix). Not finite when the transform has no inverse: the camera then shows nothing.

    Source

    get_projection_matrix

    fn get_projection_matrix(self: &Self, aspect_ratio: f64, near_plane_distance: f64, far_plane_distance: f64) -> Matrix3D
    

    The matrix from the coordinates of the camera to the clip space for the aspect ratio (width over height) and the near and far planes (WPF's GetProjectionMatrix, with the planes given, as the snapshot fits them to the scene). A matrix camera ignores the planes.

    Source

    transform_property

    fn transform_property() -> &'static StyledProperty<Option<Ref<Transform3D>>>
    

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    transform

    fn transform(self: &Self) -> Option<Ref<Transform3D>>
    

    The transform that places the camera in the world; none is the identity.

    Source

    set_transform

    fn set_transform(self: &Self, value: Option<Ref<Transform3D>>)
    

    Source

    changed

    fn changed(self: &Self, handler: impl Fn(Scene3DChange) -> () + 'static) -> Subscription
    

    Calls handler on every change of the camera, until the returned guard is dropped.

    Source

    world_position

    fn world_position(self: &Self) -> Option<Point3D>
    

    The position of the camera in the world: the origin of its coordinates.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.