pub struct Bound {
pub transform: Rigid,
pub min_target: Vec3,
pub max_target: Vec3,
pub min_eye: Vec3,
pub max_eye: Vec3,
pub min_up: Vec3,
pub max_up: Vec3,
pub min_distance: f32,
pub max_distance: f32,
pub hysteresis: f32,
}Expand description
Fields§
§transform: RigidIsometry in world space of bound inversely transforming target and eye positions.
min_target: Vec3Minimum components of target position in world space. Default splats f32::MIN.
max_target: Vec3Maximum components of target position in world space. Default splats f32::MAX.
min_eye: Vec3Minimum components of eye position in world space. Default splats f32::MIN.
max_eye: Vec3Maximum components of eye position in world space. Default splats f32::MAX.
min_up: Vec3Minimum components of up axis in bound space following yaw. Default splats f32::MIN.
See Clamp::up() implementation of Bound.
max_up: Vec3Maximum components of up axis in bound space following yaw. Default splats f32::MAX.
See Clamp::up() implementation of Bound.
min_distance: f32Minimum distance of eye from target. Default is 0.0.
max_distance: f32Maximum distance of eye from target. Default is f32::MAX.
hysteresis: f32Epsilon allowing clamped Delta to more likely pass revalidation.
Default is f32::EPSILON.sqrt().
Trait Implementations§
Source§impl Clamp for Bound
impl Clamp for Bound
Source§fn target(&self, frame: Frame) -> Option<Plane>
fn target(&self, frame: Frame) -> Option<Plane>
Find any boundary plane exceeded by target position.
Source§fn eye(&self, frame: Frame) -> Option<Plane>
fn eye(&self, frame: Frame) -> Option<Plane>
Find any boundary plane exceeded by eye position.
Distance planes are orthogonal to the roll axis at minimum or maximum distance from target.
Source§fn up(&self, frame: Frame) -> Option<Plane>
fn up(&self, frame: Frame) -> Option<Plane>
Find any boundary plane exceeded by up position.
Up position is expressed in bound space following yaw, i.e., rotated around y-axis by the
heading whose x-axis is the horizontal pitch axis. Its y-component bounds the tilt (e.g.,
min_up.y = 0.0 prevents turning upside down but allows rolling sideways over the pole)
whereas its x-component bounds the roll (e.g., min_up.x = max_up.x = 0.0 prevents rolling
and stops at the pole like a turntable) and its z-component bounds the forward tilt.