pub struct RenderOutput {
pub output_type: OutputType,
pub local_matrix: Option<Mat4>,
pub world_matrix: Option<Mat4>,
pub resolution: Option<RenderResolution>,
pub geometry: Option<GeometryOutput>,
pub attributes: RenderAttributes,
/* private fields */
}Expand description
The model output when a model has been processed.
Fields§
§output_type: OutputTypeThe output (2D/3D) this render output is expected to produce.
local_matrix: Option<Mat4>Local transformation matrix.
world_matrix: Option<Mat4>World transformation matrix.
resolution: Option<RenderResolution>The render resolution, calculated from transformation matrix.
geometry: Option<GeometryOutput>The output geometry.
attributes: RenderAttributesRender attributes.
Implementations§
Source§impl RenderOutput
impl RenderOutput
Sourcepub fn new(model: &Model) -> RenderResult<Self>
pub fn new(model: &Model) -> RenderResult<Self>
Create new render output for model.
Sourcepub fn set_world_matrix(&mut self, m: Mat4)
pub fn set_world_matrix(&mut self, m: Mat4)
Set the world matrix for render output.
Sourcepub fn set_geometry(&mut self, geo: GeometryOutput)
pub fn set_geometry(&mut self, geo: GeometryOutput)
Set the 2D geometry as render output.
Sourcepub fn resolution(&self) -> &Option<RenderResolution>
pub fn resolution(&self) -> &Option<RenderResolution>
Get render resolution.
Sourcepub fn set_resolution(&mut self, render_resolution: RenderResolution)
pub fn set_resolution(&mut self, render_resolution: RenderResolution)
Set render resolution.
Sourcepub fn local_matrix(&self) -> Option<Mat4>
pub fn local_matrix(&self) -> Option<Mat4>
Local matrix.
Sourcepub fn ground_radius(&self) -> Length
pub fn ground_radius(&self) -> Length
The radius of a centered circle that wraps the output geometries bounds on the ground.
Sourcepub fn scene_radius(&self) -> Length
pub fn scene_radius(&self) -> Length
The radius of a centered sphere that wraps the output geometries bounds.
Trait Implementations§
Source§impl CalcBounds2D for RenderOutput
impl CalcBounds2D for RenderOutput
Source§fn calc_bounds_2d(&self) -> Bounds2D
fn calc_bounds_2d(&self) -> Bounds2D
Fetch bounds.
Source§impl CalcBounds3D for RenderOutput
impl CalcBounds3D for RenderOutput
Source§fn calc_bounds_3d(&self) -> Bounds3D
fn calc_bounds_3d(&self) -> Bounds3D
Fetch bounds.
Source§impl Clone for RenderOutput
impl Clone for RenderOutput
Source§fn clone(&self) -> RenderOutput
fn clone(&self) -> RenderOutput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ComputedHash for RenderOutput
impl ComputedHash for RenderOutput
Source§fn computed_hash(&self) -> HashId
fn computed_hash(&self) -> HashId
Return computed hash value.
Source§impl Debug for RenderOutput
impl Debug for RenderOutput
Auto Trait Implementations§
impl Freeze for RenderOutput
impl RefUnwindSafe for RenderOutput
impl !Send for RenderOutput
impl !Sync for RenderOutput
impl Unpin for RenderOutput
impl UnwindSafe for RenderOutput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more