FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Viewport3D

    struct · ferroui-media3d · v0.5.0

    struct Viewport3D
    

    WPF's Viewport3D: the scene of its Camera and Children (the visuals of a Viewport3DVisual, which this control hosts), drawn over its arranged bounds.

    It draws nothing where no model is (it has no background), clips to its bounds by default (ClipToBounds is true, as in WPF), and composes like any element under its transform, clip, opacity and effects: it records one DrawScene3D operation with the snapshot of its scene. Its desired size is zero unless a size is set, as WPF's.

    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<Viewport3D>
    

    Returns a strong reference to this object.

    Source

    camera_property

    fn camera_property() -> &'static StyledProperty<Option<Ref<Camera>>>
    

    Source

    construct

    fn construct() -> Self
    

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

    Source

    new

    fn new() -> Ref<Self>
    

    An empty viewport without a camera.

    Source

    camera

    fn camera(self: &Self) -> Option<Ref<Camera>>
    

    The camera of the scene.

    Source

    set_camera

    fn set_camera(self: &Self, value: Option<Ref<Camera>>)
    

    Source

    children

    fn children(self: &Self) -> Visual3DCollection
    

    The visuals of the scene (a shared handle to the collection).

    Source

    viewport_3d_visual

    fn viewport_3d_visual(self: &Self) -> &Ref<Viewport3DVisual>
    

    The scene this control hosts (WPF keeps it private; it is the way to its generations and to the 3D hit testing).

    Source

    snapshot

    fn snapshot(self: &Self) -> Arc<Scene3DSnapshot>
    

    The scene as it is drawn now.

    Source

    scene_changed

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

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

    Source

    Trait implementations

    Availability

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