ferroui_media3d
module · ferroui-media3d · v0.5.0
module ferroui_media3d
WPF-style 3D for FerroUI (#608, docs/porting/media3d.md).
The values of System.Windows.Media.Media3D, with WPF's names and behaviour and Rust types:
Point3D, Vector3D, Size3D, Rect3D, Point4D, Matrix3D and
Quaternion, with double-precision components (narrowed to single precision only when a
scene is handed to the GPU). Their operators are the traits of std::ops, the members WPF guards
with exceptions return a Result, and each value parses and writes WPF's text form in the
invariant culture ("0,0,5", "Identity", "Empty"), which is also the form markup writes
them in.
The scene model of Viewport3D, with WPF's classes and properties:
- the transforms
Transform3D,TranslateTransform3D,ScaleTransform3D,RotateTransform3D,MatrixTransform3DandTransform3DGroup, and the rotationsRotation3D,AxisAngleRotation3DandQuaternionRotation3D; - the cameras
Camera,ProjectionCamera,PerspectiveCamera,OrthographicCameraandMatrixCamera; - the models
Model3D,GeometryModel3DandModel3DGroup, and the lightsLight,AmbientLight,DirectionalLight,PointLightBase,PointLightandSpotLight; - the geometry
Geometry3DandMeshGeometry3D, with the collectionsPoint3DCollection,Vector3DCollectionandInt32Collection(and the base library'sPointsfor the texture coordinates); - the materials
Material,DiffuseMaterial,SpecularMaterial,EmissiveMaterialandMaterialGroup, painting with the brushes of FerroUI; - the visuals
Visual3D,ModelVisual3DandViewport3DVisual, and the controlViewport3D.
A Viewport3DVisual compiles its scene into an immutable Scene3DSnapshot (world
matrices, shared meshes, material layers, lights in world space, the camera with its planes
fitted to the scene, and three generations), which Viewport3D draws through the
render-data operation DrawScene3D; the renderers are in another crate.
register_types adds the classes, the markup metadata of the values and collections (their
text converters) and the XML namespace of the framework to the tables of the markup loader.
Contents
Camera— structCameraImpl— traitCameraImplExt— traitMatrixCamera— structOrthographicCamera— structPerspectiveCamera— structProjectionCamera— structScene3DChange— enumInt32Collection— structMaterialCollection— structModel3DCollection— structPoint3DCollection— structTransform3DCollection— structVector3DCollection— structVisual3DCollection— structViewport3D— structMatrix3DError— enumQuaternionError— enumSize3DError— enumGeometry3D— structGeometry3DImpl— traitGeometry3DImplExt— traitMeshGeometry3D— structAmbientLight— structDirectionalLight— structLight— structPointLight— structPointLightBase— structSpotLight— structregister_types— functionASSEMBLY— staticDiffuseMaterial— structEmissiveMaterial— structMaterial— structMaterialGroup— structSpecularMaterial— structMatrix3D— structGeometryModel3D— structModel3D— structModel3DGroup— structModel3DImpl— traitModel3DImplExt— traitPoint3D— structPoint4D— structQuaternion— structRect3D— structAxisAngleRotation3D— structQuaternionRotation3D— structRotation3D— structRotation3DImpl— traitRotation3DImplExt— traitSize3D— structMatrixTransform3D— structRotateTransform3D— structScaleTransform3D— structTransform3D— structTransform3DGroup— structTransform3DImpl— traitTransform3DImplExt— traitTranslateTransform3D— structVector3D— structViewport3DVisual— structModelVisual3D— structVisual3D— structMeshData— useScene3DBounds— useScene3DCamera— useScene3DCameraKind— useScene3DFrame— useScene3DLight— useScene3DMaterialKind— useScene3DMaterialLayer— useScene3DModel— useScene3DSnapshot— use
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.