pub enum RenderOutput {
Geometry2D {
local_matrix: Option<Mat3>,
world_matrix: Option<Mat3>,
resolution: Option<RenderResolution>,
geometry: Geometry2DOutput,
},
Geometry3D {
local_matrix: Option<Mat4>,
world_matrix: Option<Mat4>,
resolution: Option<RenderResolution>,
geometry: Geometry3DOutput,
},
}
Expand description
The model output when a model has been processed.
Variants§
Geometry2D
2D render output.
Fields
§
resolution: Option<RenderResolution>
The render resolution, calculated from transformation matrix.
§
geometry: Geometry2DOutput
The output geometry.
Geometry3D
3D render output.
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_2d(&mut self, geo: Geometry2DOutput)
pub fn set_geometry_2d(&mut self, geo: Geometry2DOutput)
Set the 2D geometry as render output.
Sourcepub fn set_geometry_3d(&mut self, geo: Geometry3DOutput)
pub fn set_geometry_3d(&mut self, geo: Geometry3DOutput)
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 world_matrix(&self) -> Mat4
pub fn world_matrix(&self) -> Mat4
Get world matrix.
Trait Implementations§
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 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