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.
Members
TYPEto_refcamera_propertyconstructnewcameraset_camerachildrenviewport_3d_visualsnapshotscene_changed
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<Viewport3D>
Returns a strong reference to this object.
camera_property
fn camera_property() -> &'static StyledProperty<Option<Ref<Camera>>>
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
An empty viewport without a camera.
camera
fn camera(self: &Self) -> Option<Ref<Camera>>
The camera of the scene.
set_camera
fn set_camera(self: &Self, value: Option<Ref<Camera>>)
children
fn children(self: &Self) -> Visual3DCollection
The visuals of the scene (a shared handle to the collection).
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).
snapshot
fn snapshot(self: &Self) -> Arc<Scene3DSnapshot>
The scene as it is drawn now.
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherControlImplExtDerefUpcast<T>Upcast<Viewport3D>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplInteractiveImplInputElementImplControlImplFerroObjectImplLayoutableImplVisualImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.