Viewport3DVisual
struct · ferroui-media3d · v0.5.0
struct Viewport3DVisual
WPF's Viewport3DVisual; see the documentation of the module.
Members
TYPEto_refcamera_propertyviewport_propertyconstructnewcameraset_cameraviewportset_viewportchildrenstructure_generationrecord_generationcamera_generationchangedsnapshotmodel_sourcedescendant_bounds
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<Viewport3DVisual>
Returns a strong reference to this object.
camera_property
fn camera_property() -> &'static StyledProperty<Option<Ref<Camera>>>
viewport_property
fn viewport_property() -> &'static StyledProperty<Rect>
construct
fn construct() -> Self
Creates the class data; see FerroObject::construct.
new
fn new() -> Ref<Self>
An empty scene without a camera.
camera
fn camera(self: &Self) -> Option<Ref<Camera>>
The camera; without one nothing is drawn.
set_camera
fn set_camera(self: &Self, value: Option<Ref<Camera>>)
viewport
fn viewport(self: &Self) -> Rect
The area the scene is drawn in (the arranged bounds of its Viewport3D); the camera
takes its aspect ratio.
set_viewport
fn set_viewport(self: &Self, value: Rect)
children
fn children(self: &Self) -> Visual3DCollection
The visuals of the scene (a shared handle to the collection).
structure_generation
fn structure_generation(self: &Self) -> u64
The generation of the structure of the scene.
record_generation
fn record_generation(self: &Self) -> u64
The generation of the records of the scene.
camera_generation
fn camera_generation(self: &Self) -> u64
The generation of the camera and the viewport.
changed
fn changed(self: &Self, handler: impl Fn(Scene3DChange) -> () + 'static) -> Subscription
Calls handler on every change of the scene (after its generation was bumped), until
the returned guard is dropped.
snapshot
fn snapshot(self: &Self) -> Arc<Scene3DSnapshot>
The scene as an immutable snapshot: the same one while nothing changes.
model_source
fn model_source(self: &Self, index: usize) -> Option<(Ref<Visual3D>, Ref<GeometryModel3D>)>
The visual and the model the model at index of the current snapshot was made from (for
the 3D hit testing); None for another index or when they no longer exist.
descendant_bounds
fn descendant_bounds(self: &Self) -> Rect3D
The bounds of what the scene shows, in the world.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtClassDefaultsErasedDestructorIntoEitherDerefUpcast<T>Upcast<Viewport3DVisual>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.