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<Self, Pseudo3dError>
pub fn look_at( position: Vec3, target: Vec3, up_hint: Vec3, projection: Projection3d, ) -> Result<Self, 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. Points outside the configured
frustum still return finite coordinates with inside_view set to false,
allowing a later mesh stage to clip segments and triangles explicitly.
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
Mutably borrows from an owned value. Read more