pub struct Camera3d { /* private fields */ }Expand description
Validated 3D view and projection used for stereometry rendering.
Implementations§
Source§impl Camera3d
impl Camera3d
Sourcepub fn look_at(
position: Vec3,
target: Vec3,
up_hint: Vec3,
projection: Projection3d,
) -> Result<Camera3d, Pseudo3dError>
pub fn look_at( position: Vec3, target: Vec3, up_hint: Vec3, projection: Projection3d, ) -> Result<Camera3d, Pseudo3dError>
Builds a camera looking from position toward target.
up_hint must not be zero or parallel to the view direction.
Sourcepub const fn projection(self) -> Projection3d
pub const fn projection(self) -> Projection3d
Returns the current perspective or orthographic projection.
Sourcepub fn project_world(
self,
point: Vec3,
viewport: LogicalViewport,
) -> Result<ProjectedPoint3d, Pseudo3dError>
pub fn project_world( self, point: Vec3, viewport: LogicalViewport, ) -> Result<ProjectedPoint3d, Pseudo3dError>
Projects a world point into logical screen coordinates.
Points behind the camera return an error. Outside-frustum points whose
projection remains representable return finite coordinates with
inside_view set to false, allowing host-side classification without
losing the projected anchor; extreme finite inputs may instead return
Pseudo3dError::ArithmeticOverflow. In the v0.2 retained renderer,
explicit display edges are clipped separately. StrictPortable surface
rendering generates bounded canonical clipping geometry, rejecting
uncertain topology; Native delegates surface clipping to the GPU.
Trait Implementations§
impl Copy for Camera3d
impl StructuralPartialEq for Camera3d
Auto Trait Implementations§
impl Freeze for Camera3d
impl RefUnwindSafe for Camera3d
impl Send for Camera3d
impl Sync for Camera3d
impl Unpin for Camera3d
impl UnsafeUnpin for Camera3d
impl UnwindSafe for Camera3d
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.