pub struct RaycasterCamera {
pub is_perspective_camera: bool,
pub is_orthographic_camera: bool,
pub near: f64,
pub far: f64,
pub matrix_world: Matrix4,
pub matrix_world_inverse: Matrix4,
pub projection_matrix: Matrix4,
pub projection_matrix_inverse: Matrix4,
}Expand description
The camera state Raycaster.camera is read for — by Sprite.raycast()
and by LineSegments2’s screen-space raycast.
three.js stores a reference to the camera, so a raycast sees the camera
as it is when intersectObject() runs. The port’s cameras are plain
structs rather than scene nodes both can point at, so
Raycaster::set_from_camera copies what those two methods read. A
camera that moves between setFromCamera() and intersectObject() is the
one case where the two differ; every three.js example sets the ray and
intersects in the same breath.
Fields§
§is_perspective_camera: boolcamera.isPerspectiveCamera.
is_orthographic_camera: boolcamera.isOrthographicCamera.
near: f64camera.near.
far: f64camera.far.
matrix_world: Matrix4camera.matrixWorld.
matrix_world_inverse: Matrix4camera.matrixWorldInverse.
projection_matrix: Matrix4camera.projectionMatrix.
projection_matrix_inverse: Matrix4camera.projectionMatrixInverse.
Implementations§
Source§impl RaycasterCamera
impl RaycasterCamera
Sourcepub fn of(camera: &impl RenderCamera) -> Self
pub fn of(camera: &impl RenderCamera) -> Self
Snapshot camera.
Trait Implementations§
Source§impl Clone for RaycasterCamera
impl Clone for RaycasterCamera
impl Copy for RaycasterCamera
Source§impl Debug for RaycasterCamera
impl Debug for RaycasterCamera
Source§impl PartialEq for RaycasterCamera
impl PartialEq for RaycasterCamera
impl StructuralPartialEq for RaycasterCamera
Auto Trait Implementations§
impl Freeze for RaycasterCamera
impl RefUnwindSafe for RaycasterCamera
impl Send for RaycasterCamera
impl Sync for RaycasterCamera
impl Unpin for RaycasterCamera
impl UnsafeUnpin for RaycasterCamera
impl UnwindSafe for RaycasterCamera
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