pub struct OrthographicProjection {
pub near: f32,
pub far: f32,
pub viewport_origin: Vec2,
pub scaling_mode: ScalingMode,
pub scale: f32,
pub area: Rect,
}
Expand description
Project a 3D space onto a 2D surface using parallel lines, i.e., unlike PerspectiveProjection
,
the size of objects remains the same regardless of their distance to the camera.
The volume contained in the projection is called the view frustum. Since the viewport is rectangular and projection lines are parallel, the view frustum takes the shape of a cuboid.
Note that the scale of the projection and the apparent size of objects are inversely proportional. As the size of the projection increases, the size of objects decreases.
§Examples
Configure the orthographic projection to one world unit per 100 window pixels:
let projection = Projection::Orthographic(OrthographicProjection {
scaling_mode: ScalingMode::WindowSize,
scale: 0.01,
..OrthographicProjection::default_2d()
});
Fields§
§near: f32
The distance of the near clipping plane in world units.
Objects closer than this will not be rendered.
Defaults to 0.0
far: f32
The distance of the far clipping plane in world units.
Objects further than this will not be rendered.
Defaults to 1000.0
viewport_origin: Vec2
Specifies the origin of the viewport as a normalized position from 0 to 1, where (0, 0) is the bottom left and (1, 1) is the top right. This determines where the camera’s position sits inside the viewport.
When the projection scales due to viewport resizing, the position of the camera, and thereby viewport_origin
,
remains at the same relative point.
Consequently, this is pivot point when scaling. With a bottom left pivot, the projection will expand upwards and to the right. With a top right pivot, the projection will expand downwards and to the left. Values in between will caused the projection to scale proportionally on each axis.
Defaults to (0.5, 0.5)
, which makes scaling affect opposite sides equally, keeping the center
point of the viewport centered.
scaling_mode: ScalingMode
How the projection will scale to the viewport.
Defaults to ScalingMode::WindowSize
,
and works in concert with OrthographicProjection::scale
to determine the final effect.
For simplicity, zooming should be done by changing OrthographicProjection::scale
,
rather than changing the parameters of the scaling mode.
scale: f32
Scales the projection.
As scale increases, the apparent size of objects decreases, and vice versa.
Note: scaling can be set by scaling_mode
as well.
This parameter scales on top of that.
This property is particularly useful in implementing zoom functionality.
Defaults to 1.0
, which under standard settings corresponds to a 1:1 mapping of world units to rendered pixels.
See ScalingMode::WindowSize
for more information.
area: Rect
The area that the projection covers relative to viewport_origin
.
Bevy’s camera_system
automatically
updates this value when the viewport is resized depending on OrthographicProjection
’s other fields.
In this case, area
should not be manually modified.
It may be necessary to set this manually for shadow projections and such.
Implementations§
Source§impl OrthographicProjection
impl OrthographicProjection
Sourcepub fn default_2d() -> OrthographicProjection
pub fn default_2d() -> OrthographicProjection
Returns the default orthographic projection for a 2D context.
The near plane is set to a negative value so that the camera can still render the scene when using positive z coordinates to order foreground elements.
Sourcepub fn default_3d() -> OrthographicProjection
pub fn default_3d() -> OrthographicProjection
Returns the default orthographic projection for a 3D context.
The near plane is set to 0.0 so that the camera doesn’t render objects that are behind it.
Examples found in repository?
13fn setup(
14 mut commands: Commands,
15 mut meshes: ResMut<Assets<Mesh>>,
16 mut materials: ResMut<Assets<StandardMaterial>>,
17) {
18 // camera
19 commands.spawn((
20 Camera3d::default(),
21 Projection::from(OrthographicProjection {
22 // 6 world units per pixel of window height.
23 scaling_mode: ScalingMode::FixedVertical {
24 viewport_height: 6.0,
25 },
26 ..OrthographicProjection::default_3d()
27 }),
28 Transform::from_xyz(5.0, 5.0, 5.0).looking_at(Vec3::ZERO, Vec3::Y),
29 ));
30
31 // plane
32 commands.spawn((
33 Mesh3d(meshes.add(Plane3d::default().mesh().size(5.0, 5.0))),
34 MeshMaterial3d(materials.add(Color::srgb(0.3, 0.5, 0.3))),
35 ));
36 // cubes
37 commands.spawn((
38 Mesh3d(meshes.add(Cuboid::default())),
39 MeshMaterial3d(materials.add(Color::srgb(0.8, 0.7, 0.6))),
40 Transform::from_xyz(1.5, 0.5, 1.5),
41 ));
42 commands.spawn((
43 Mesh3d(meshes.add(Cuboid::default())),
44 MeshMaterial3d(materials.add(Color::srgb(0.8, 0.7, 0.6))),
45 Transform::from_xyz(1.5, 0.5, -1.5),
46 ));
47 commands.spawn((
48 Mesh3d(meshes.add(Cuboid::default())),
49 MeshMaterial3d(materials.add(Color::srgb(0.8, 0.7, 0.6))),
50 Transform::from_xyz(-1.5, 0.5, 1.5),
51 ));
52 commands.spawn((
53 Mesh3d(meshes.add(Cuboid::default())),
54 MeshMaterial3d(materials.add(Color::srgb(0.8, 0.7, 0.6))),
55 Transform::from_xyz(-1.5, 0.5, -1.5),
56 ));
57 // light
58 commands.spawn((PointLight::default(), Transform::from_xyz(3.0, 8.0, 5.0)));
59}
More examples
43fn setup(
44 asset_server: Res<AssetServer>,
45 camera_settings: Res<CameraSettings>,
46 mut commands: Commands,
47 mut meshes: ResMut<Assets<Mesh>>,
48 mut materials: ResMut<Assets<StandardMaterial>>,
49) {
50 commands.spawn((
51 Name::new("Camera"),
52 Camera3d::default(),
53 Projection::from(OrthographicProjection {
54 // We can set the scaling mode to FixedVertical to keep the viewport height constant as its aspect ratio changes.
55 // The viewport height is the height of the camera's view in world units when the scale is 1.
56 scaling_mode: ScalingMode::FixedVertical {
57 viewport_height: camera_settings.orthographic_viewport_height,
58 },
59 // This is the default value for scale for orthographic projections.
60 // To zoom in and out, change this value, rather than `ScalingMode` or the camera's position.
61 scale: 1.,
62 ..OrthographicProjection::default_3d()
63 }),
64 Transform::from_xyz(5.0, 5.0, 5.0).looking_at(Vec3::ZERO, Vec3::Y),
65 ));
66
67 commands.spawn((
68 Name::new("Plane"),
69 Mesh3d(meshes.add(Plane3d::default().mesh().size(5.0, 5.0))),
70 MeshMaterial3d(materials.add(StandardMaterial {
71 base_color: Color::srgb(0.3, 0.5, 0.3),
72 // Turning off culling keeps the plane visible when viewed from beneath.
73 cull_mode: None,
74 ..default()
75 })),
76 ));
77
78 commands.spawn((
79 Name::new("Fox"),
80 SceneRoot(
81 asset_server.load(GltfAssetLabel::Scene(0).from_asset("models/animated/Fox.glb")),
82 ),
83 // Note: the scale adjustment is purely an accident of our fox model, which renders
84 // HUGE unless mitigated!
85 Transform::from_translation(Vec3::splat(0.0)).with_scale(Vec3::splat(0.025)),
86 ));
87
88 commands.spawn((
89 Name::new("Light"),
90 PointLight::default(),
91 Transform::from_xyz(3.0, 8.0, 5.0),
92 ));
93}
94
95fn instructions(mut commands: Commands) {
96 commands.spawn((
97 Name::new("Instructions"),
98 Text::new(
99 "Scroll mouse wheel to zoom in/out\n\
100 Space: switch between orthographic and perspective projections",
101 ),
102 Node {
103 position_type: PositionType::Absolute,
104 top: Val::Px(12.),
105 left: Val::Px(12.),
106 ..default()
107 },
108 ));
109}
110
111fn switch_projection(
112 mut camera: Single<&mut Projection, With<Camera>>,
113 camera_settings: Res<CameraSettings>,
114 keyboard_input: Res<ButtonInput<KeyCode>>,
115) {
116 if keyboard_input.just_pressed(KeyCode::Space) {
117 // Switch projection type
118 **camera = match **camera {
119 Projection::Orthographic(_) => Projection::Perspective(PerspectiveProjection {
120 fov: camera_settings.perspective_zoom_range.start,
121 ..default()
122 }),
123 Projection::Perspective(_) => Projection::Orthographic(OrthographicProjection {
124 scaling_mode: ScalingMode::FixedVertical {
125 viewport_height: camera_settings.orthographic_viewport_height,
126 },
127 ..OrthographicProjection::default_3d()
128 }),
129 _ => return,
130 }
131 }
132}
44fn setup(
45 mut commands: Commands,
46 mut meshes: ResMut<Assets<Mesh>>,
47 mut materials: ResMut<Assets<StandardMaterial>>,
48) {
49 warn!(include_str!("warning_string.txt"));
50
51 const LIGHT_RADIUS: f32 = 0.3;
52 const LIGHT_INTENSITY: f32 = 1000.0;
53 const RADIUS: f32 = 50.0;
54 const N_LIGHTS: usize = 100_000;
55
56 commands.spawn((
57 Mesh3d(meshes.add(Sphere::new(RADIUS).mesh().ico(9).unwrap())),
58 MeshMaterial3d(materials.add(Color::WHITE)),
59 Transform::from_scale(Vec3::NEG_ONE),
60 ));
61
62 let mesh = meshes.add(Cuboid::default());
63 let material = materials.add(StandardMaterial {
64 base_color: DEEP_PINK.into(),
65 ..default()
66 });
67
68 // NOTE: This pattern is good for testing performance of culling as it provides roughly
69 // the same number of visible meshes regardless of the viewing angle.
70 // NOTE: f64 is used to avoid precision issues that produce visual artifacts in the distribution
71 let golden_ratio = 0.5f64 * (1.0f64 + 5.0f64.sqrt());
72
73 // Spawn N_LIGHTS many lights
74 commands.spawn_batch((0..N_LIGHTS).map(move |i| {
75 let mut rng = thread_rng();
76
77 let spherical_polar_theta_phi = fibonacci_spiral_on_sphere(golden_ratio, i, N_LIGHTS);
78 let unit_sphere_p = spherical_polar_to_cartesian(spherical_polar_theta_phi);
79
80 (
81 PointLight {
82 range: LIGHT_RADIUS,
83 intensity: LIGHT_INTENSITY,
84 color: Color::hsl(rng.gen_range(0.0..360.0), 1.0, 0.5),
85 ..default()
86 },
87 Transform::from_translation((RADIUS as f64 * unit_sphere_p).as_vec3()),
88 )
89 }));
90
91 // camera
92 match std::env::args().nth(1).as_deref() {
93 Some("orthographic") => commands.spawn((
94 Camera3d::default(),
95 Projection::from(OrthographicProjection {
96 scaling_mode: ScalingMode::FixedHorizontal {
97 viewport_width: 20.0,
98 },
99 ..OrthographicProjection::default_3d()
100 }),
101 )),
102 _ => commands.spawn(Camera3d::default()),
103 };
104
105 // add one cube, the only one with strong handles
106 // also serves as a reference point during rotation
107 commands.spawn((
108 Mesh3d(mesh),
109 MeshMaterial3d(material),
110 Transform {
111 translation: Vec3::new(0.0, RADIUS, 0.0),
112 scale: Vec3::splat(5.0),
113 ..default()
114 },
115 ));
116}
15fn setup(
16 mut commands: Commands,
17 mut meshes: ResMut<Assets<Mesh>>,
18 mut materials: ResMut<Assets<StandardMaterial>>,
19 asset_server: Res<AssetServer>,
20) {
21 let sphere_mesh = meshes.add(Sphere::new(0.45));
22 // add entities to the world
23 for y in -2..=2 {
24 for x in -5..=5 {
25 let x01 = (x + 5) as f32 / 10.0;
26 let y01 = (y + 2) as f32 / 4.0;
27 // sphere
28 commands.spawn((
29 Mesh3d(sphere_mesh.clone()),
30 MeshMaterial3d(materials.add(StandardMaterial {
31 base_color: Srgba::hex("#ffd891").unwrap().into(),
32 // vary key PBR parameters on a grid of spheres to show the effect
33 metallic: y01,
34 perceptual_roughness: x01,
35 ..default()
36 })),
37 Transform::from_xyz(x as f32, y as f32 + 0.5, 0.0),
38 ));
39 }
40 }
41 // unlit sphere
42 commands.spawn((
43 Mesh3d(sphere_mesh),
44 MeshMaterial3d(materials.add(StandardMaterial {
45 base_color: Srgba::hex("#ffd891").unwrap().into(),
46 // vary key PBR parameters on a grid of spheres to show the effect
47 unlit: true,
48 ..default()
49 })),
50 Transform::from_xyz(-5.0, -2.5, 0.0),
51 ));
52
53 commands.spawn((
54 DirectionalLight {
55 illuminance: 1_500.,
56 ..default()
57 },
58 Transform::from_xyz(50.0, 50.0, 50.0).looking_at(Vec3::ZERO, Vec3::Y),
59 ));
60
61 // labels
62 commands.spawn((
63 Text::new("Perceptual Roughness"),
64 TextFont {
65 font_size: 30.0,
66 ..default()
67 },
68 Node {
69 position_type: PositionType::Absolute,
70 top: Val::Px(20.0),
71 left: Val::Px(100.0),
72 ..default()
73 },
74 ));
75
76 commands.spawn((
77 Text::new("Metallic"),
78 TextFont {
79 font_size: 30.0,
80 ..default()
81 },
82 Node {
83 position_type: PositionType::Absolute,
84 top: Val::Px(130.0),
85 right: Val::ZERO,
86 ..default()
87 },
88 Transform {
89 rotation: Quat::from_rotation_z(std::f32::consts::PI / 2.0),
90 ..default()
91 },
92 ));
93
94 commands.spawn((
95 Text::new("Loading Environment Map..."),
96 TextFont {
97 font_size: 30.0,
98 ..default()
99 },
100 Node {
101 position_type: PositionType::Absolute,
102 bottom: Val::Px(20.0),
103 right: Val::Px(20.0),
104 ..default()
105 },
106 EnvironmentMapLabel,
107 ));
108
109 // camera
110 commands.spawn((
111 Camera3d::default(),
112 Transform::from_xyz(0.0, 0.0, 8.0).looking_at(Vec3::default(), Vec3::Y),
113 Projection::from(OrthographicProjection {
114 scale: 0.01,
115 scaling_mode: ScalingMode::WindowSize,
116 ..OrthographicProjection::default_3d()
117 }),
118 EnvironmentMapLight {
119 diffuse_map: asset_server.load("environment_maps/pisa_diffuse_rgb9e5_zstd.ktx2"),
120 specular_map: asset_server.load("environment_maps/pisa_specular_rgb9e5_zstd.ktx2"),
121 intensity: 900.0,
122 ..default()
123 },
124 ));
125}
26fn setup(
27 mut commands: Commands,
28 mut meshes: ResMut<Assets<Mesh>>,
29 mut materials: ResMut<Assets<StandardMaterial>>,
30) {
31 let transform = Transform::from_xyz(-2.0, 2.5, 5.0).looking_at(Vec3::ZERO, Vec3::Y);
32
33 // Plane
34 commands.spawn((
35 Mesh3d(meshes.add(Plane3d::default().mesh().size(5.0, 5.0))),
36 MeshMaterial3d(materials.add(Color::srgb(0.3, 0.5, 0.3))),
37 ));
38
39 // Cube
40 commands.spawn((
41 Mesh3d(meshes.add(Cuboid::default())),
42 MeshMaterial3d(materials.add(Color::srgb(0.8, 0.7, 0.6))),
43 Transform::from_xyz(0.0, 0.5, 0.0),
44 ));
45
46 // Light
47 commands.spawn((
48 PointLight {
49 shadows_enabled: true,
50 ..default()
51 },
52 Transform::from_xyz(4.0, 8.0, 4.0),
53 ));
54
55 // Main perspective camera:
56 //
57 // The main perspective image to use as a comparison for the sub views.
58 commands.spawn((
59 Camera3d::default(),
60 Camera::default(),
61 ExampleViewports::PerspectiveMain,
62 transform,
63 ));
64
65 // Perspective camera right half:
66 //
67 // For this camera, the projection is perspective, and `size` is half the
68 // width of the `full_size`, while the x value of `offset` is set to half
69 // the value of the full width, causing the right half of the image to be
70 // shown. Since the viewport has an aspect ratio of 1x1 and the sub view has
71 // an aspect ratio of 1x2, the image appears stretched along the horizontal
72 // axis.
73 commands.spawn((
74 Camera3d::default(),
75 Camera {
76 sub_camera_view: Some(SubCameraView {
77 // The values of `full_size` and `size` do not have to be the
78 // exact values of your physical viewport. The important part is
79 // the ratio between them.
80 full_size: UVec2::new(10, 10),
81 // The `offset` is also relative to the values in `full_size`
82 // and `size`
83 offset: Vec2::new(5.0, 0.0),
84 size: UVec2::new(5, 10),
85 }),
86 order: 1,
87 ..default()
88 },
89 ExampleViewports::PerspectiveStretched,
90 transform,
91 ));
92
93 // Perspective camera moving:
94 //
95 // For this camera, the projection is perspective, and the offset is updated
96 // continuously in 150 units per second in `move_camera_view`. Since the
97 // `full_size` is 500x500, the image should appear to be moving across the
98 // full image once every 3.3 seconds. `size` is a fifth of the size of
99 // `full_size`, so the image will appear zoomed in.
100 commands.spawn((
101 Camera3d::default(),
102 Camera {
103 sub_camera_view: Some(SubCameraView {
104 full_size: UVec2::new(500, 500),
105 offset: Vec2::ZERO,
106 size: UVec2::new(100, 100),
107 }),
108 order: 2,
109 ..default()
110 },
111 transform,
112 ExampleViewports::PerspectiveMoving,
113 MovingCameraMarker,
114 ));
115
116 // Perspective camera different aspect ratio:
117 //
118 // For this camera, the projection is perspective, and the aspect ratio of
119 // the sub view (2x1) is different to the aspect ratio of the full view
120 // (2x2). The aspect ratio of the sub view matches the aspect ratio of
121 // the viewport and should show an unstretched image of the top half of the
122 // full perspective image.
123 commands.spawn((
124 Camera3d::default(),
125 Camera {
126 sub_camera_view: Some(SubCameraView {
127 full_size: UVec2::new(800, 800),
128 offset: Vec2::ZERO,
129 size: UVec2::new(800, 400),
130 }),
131 order: 3,
132 ..default()
133 },
134 ExampleViewports::PerspectiveControl,
135 transform,
136 ));
137
138 // Main orthographic camera:
139 //
140 // The main orthographic image to use as a comparison for the sub views.
141 commands.spawn((
142 Camera3d::default(),
143 Projection::from(OrthographicProjection {
144 scaling_mode: ScalingMode::FixedVertical {
145 viewport_height: 6.0,
146 },
147 ..OrthographicProjection::default_3d()
148 }),
149 Camera {
150 order: 4,
151 ..default()
152 },
153 ExampleViewports::OrthographicMain,
154 transform,
155 ));
156
157 // Orthographic camera left half:
158 //
159 // For this camera, the projection is orthographic, and `size` is half the
160 // width of the `full_size`, causing the left half of the image to be shown.
161 // Since the viewport has an aspect ratio of 1x1 and the sub view has an
162 // aspect ratio of 1x2, the image appears stretched along the horizontal axis.
163 commands.spawn((
164 Camera3d::default(),
165 Projection::from(OrthographicProjection {
166 scaling_mode: ScalingMode::FixedVertical {
167 viewport_height: 6.0,
168 },
169 ..OrthographicProjection::default_3d()
170 }),
171 Camera {
172 sub_camera_view: Some(SubCameraView {
173 full_size: UVec2::new(2, 2),
174 offset: Vec2::ZERO,
175 size: UVec2::new(1, 2),
176 }),
177 order: 5,
178 ..default()
179 },
180 ExampleViewports::OrthographicStretched,
181 transform,
182 ));
183
184 // Orthographic camera moving:
185 //
186 // For this camera, the projection is orthographic, and the offset is
187 // updated continuously in 150 units per second in `move_camera_view`. Since
188 // the `full_size` is 500x500, the image should appear to be moving across
189 // the full image once every 3.3 seconds. `size` is a fifth of the size of
190 // `full_size`, so the image will appear zoomed in.
191 commands.spawn((
192 Camera3d::default(),
193 Projection::from(OrthographicProjection {
194 scaling_mode: ScalingMode::FixedVertical {
195 viewport_height: 6.0,
196 },
197 ..OrthographicProjection::default_3d()
198 }),
199 Camera {
200 sub_camera_view: Some(SubCameraView {
201 full_size: UVec2::new(500, 500),
202 offset: Vec2::ZERO,
203 size: UVec2::new(100, 100),
204 }),
205 order: 6,
206 ..default()
207 },
208 transform,
209 ExampleViewports::OrthographicMoving,
210 MovingCameraMarker,
211 ));
212
213 // Orthographic camera different aspect ratio:
214 //
215 // For this camera, the projection is orthographic, and the aspect ratio of
216 // the sub view (2x1) is different to the aspect ratio of the full view
217 // (2x2). The aspect ratio of the sub view matches the aspect ratio of
218 // the viewport and should show an unstretched image of the top half of the
219 // full orthographic image.
220 commands.spawn((
221 Camera3d::default(),
222 Projection::from(OrthographicProjection {
223 scaling_mode: ScalingMode::FixedVertical {
224 viewport_height: 6.0,
225 },
226 ..OrthographicProjection::default_3d()
227 }),
228 Camera {
229 sub_camera_view: Some(SubCameraView {
230 full_size: UVec2::new(200, 200),
231 offset: Vec2::ZERO,
232 size: UVec2::new(200, 100),
233 }),
234 order: 7,
235 ..default()
236 },
237 ExampleViewports::OrthographicControl,
238 transform,
239 ));
240}
Trait Implementations§
Source§impl CameraProjection for OrthographicProjection
impl CameraProjection for OrthographicProjection
Source§fn get_clip_from_view(&self) -> Mat4
fn get_clip_from_view(&self) -> Mat4
Source§fn get_clip_from_view_for_sub(&self, sub_view: &SubCameraView) -> Mat4
fn get_clip_from_view_for_sub(&self, sub_view: &SubCameraView) -> Mat4
SubCameraView
.Source§fn update(&mut self, width: f32, height: f32)
fn update(&mut self, width: f32, height: f32)
Source§fn get_frustum_corners(&self, z_near: f32, z_far: f32) -> [Vec3A; 8]
fn get_frustum_corners(&self, z_near: f32, z_far: f32) -> [Vec3A; 8]
Source§fn compute_frustum(&self, camera_transform: &GlobalTransform) -> Frustum
fn compute_frustum(&self, camera_transform: &GlobalTransform) -> Frustum
Source§impl Clone for OrthographicProjection
impl Clone for OrthographicProjection
Source§fn clone(&self) -> OrthographicProjection
fn clone(&self) -> OrthographicProjection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for OrthographicProjection
impl Debug for OrthographicProjection
Source§impl From<OrthographicProjection> for Projection
impl From<OrthographicProjection> for Projection
Source§fn from(value: OrthographicProjection) -> Projection
fn from(value: OrthographicProjection) -> Projection
Source§impl FromArg for &'static OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl FromArg for &'static OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§impl FromArg for &'static mut OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl FromArg for &'static mut OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§impl FromArg for OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl FromArg for OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§impl FromReflect for OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl FromReflect for OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn from_reflect(
reflect: &(dyn PartialReflect + 'static),
) -> Option<OrthographicProjection>
fn from_reflect( reflect: &(dyn PartialReflect + 'static), ) -> Option<OrthographicProjection>
Self
from a reflected value.Source§fn take_from_reflect(
reflect: Box<dyn PartialReflect>,
) -> Result<Self, Box<dyn PartialReflect>>
fn take_from_reflect( reflect: Box<dyn PartialReflect>, ) -> Result<Self, Box<dyn PartialReflect>>
Self
using,
constructing the value using from_reflect
if that fails. Read moreSource§impl FromWorld for OrthographicProjection
impl FromWorld for OrthographicProjection
Source§fn from_world(_world: &mut World) -> OrthographicProjection
fn from_world(_world: &mut World) -> OrthographicProjection
Self
using data from the given World
.Source§impl GetOwnership for &OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl GetOwnership for &OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§impl GetOwnership for &mut OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl GetOwnership for &mut OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§impl GetOwnership for OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl GetOwnership for OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§impl GetTypeRegistration for OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl GetTypeRegistration for OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn get_type_registration() -> TypeRegistration
fn get_type_registration() -> TypeRegistration
TypeRegistration
for this type.Source§fn register_type_dependencies(registry: &mut TypeRegistry)
fn register_type_dependencies(registry: &mut TypeRegistry)
Source§impl IntoReturn for &OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl IntoReturn for &OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn into_return<'into_return>(self) -> Return<'into_return>where
&OrthographicProjection: 'into_return,
fn into_return<'into_return>(self) -> Return<'into_return>where
&OrthographicProjection: 'into_return,
Source§impl IntoReturn for &mut OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl IntoReturn for &mut OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn into_return<'into_return>(self) -> Return<'into_return>where
&mut OrthographicProjection: 'into_return,
fn into_return<'into_return>(self) -> Return<'into_return>where
&mut OrthographicProjection: 'into_return,
Source§impl IntoReturn for OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl IntoReturn for OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn into_return<'into_return>(self) -> Return<'into_return>where
OrthographicProjection: 'into_return,
fn into_return<'into_return>(self) -> Return<'into_return>where
OrthographicProjection: 'into_return,
Source§impl PartialReflect for OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl PartialReflect for OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn get_represented_type_info(&self) -> Option<&'static TypeInfo>
fn get_represented_type_info(&self) -> Option<&'static TypeInfo>
Source§fn try_apply(
&mut self,
value: &(dyn PartialReflect + 'static),
) -> Result<(), ApplyError>
fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>
Source§fn reflect_kind(&self) -> ReflectKind
fn reflect_kind(&self) -> ReflectKind
Source§fn reflect_ref(&self) -> ReflectRef<'_>
fn reflect_ref(&self) -> ReflectRef<'_>
Source§fn reflect_mut(&mut self) -> ReflectMut<'_>
fn reflect_mut(&mut self) -> ReflectMut<'_>
Source§fn reflect_owned(self: Box<OrthographicProjection>) -> ReflectOwned
fn reflect_owned(self: Box<OrthographicProjection>) -> ReflectOwned
Source§fn try_into_reflect(
self: Box<OrthographicProjection>,
) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>
fn try_into_reflect( self: Box<OrthographicProjection>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>
Source§fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>
fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>
Source§fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>
fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>
Source§fn into_partial_reflect(
self: Box<OrthographicProjection>,
) -> Box<dyn PartialReflect>
fn into_partial_reflect( self: Box<OrthographicProjection>, ) -> Box<dyn PartialReflect>
Source§fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)
fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)
Source§fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)
fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)
Source§fn reflect_partial_eq(
&self,
value: &(dyn PartialReflect + 'static),
) -> Option<bool>
fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>
Source§fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Source§fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>
fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>
Self
using reflection. Read moreSource§fn apply(&mut self, value: &(dyn PartialReflect + 'static))
fn apply(&mut self, value: &(dyn PartialReflect + 'static))
Source§fn clone_value(&self) -> Box<dyn PartialReflect>
fn clone_value(&self) -> Box<dyn PartialReflect>
reflect_clone
. To convert reflected values to dynamic ones, use to_dynamic
.Self
into its dynamic representation. Read moreSource§fn to_dynamic(&self) -> Box<dyn PartialReflect>
fn to_dynamic(&self) -> Box<dyn PartialReflect>
Source§fn reflect_hash(&self) -> Option<u64>
fn reflect_hash(&self) -> Option<u64>
Source§fn is_dynamic(&self) -> bool
fn is_dynamic(&self) -> bool
Source§impl Reflect for OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl Reflect for OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn into_any(self: Box<OrthographicProjection>) -> Box<dyn Any>
fn into_any(self: Box<OrthographicProjection>) -> Box<dyn Any>
Box<dyn Any>
. Read moreSource§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut dyn Any
. Read moreSource§fn into_reflect(self: Box<OrthographicProjection>) -> Box<dyn Reflect>
fn into_reflect(self: Box<OrthographicProjection>) -> Box<dyn Reflect>
Source§fn as_reflect(&self) -> &(dyn Reflect + 'static)
fn as_reflect(&self) -> &(dyn Reflect + 'static)
Source§fn as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)
fn as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)
Source§impl Struct for OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl Struct for OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn field(&self, name: &str) -> Option<&(dyn PartialReflect + 'static)>
fn field(&self, name: &str) -> Option<&(dyn PartialReflect + 'static)>
name
as a &dyn PartialReflect
.Source§fn field_mut(
&mut self,
name: &str,
) -> Option<&mut (dyn PartialReflect + 'static)>
fn field_mut( &mut self, name: &str, ) -> Option<&mut (dyn PartialReflect + 'static)>
name
as a
&mut dyn PartialReflect
.Source§fn field_at(&self, index: usize) -> Option<&(dyn PartialReflect + 'static)>
fn field_at(&self, index: usize) -> Option<&(dyn PartialReflect + 'static)>
index
as a
&dyn PartialReflect
.Source§fn field_at_mut(
&mut self,
index: usize,
) -> Option<&mut (dyn PartialReflect + 'static)>
fn field_at_mut( &mut self, index: usize, ) -> Option<&mut (dyn PartialReflect + 'static)>
index
as a &mut dyn PartialReflect
.Source§fn name_at(&self, index: usize) -> Option<&str>
fn name_at(&self, index: usize) -> Option<&str>
index
.Source§fn iter_fields(&self) -> FieldIter<'_> ⓘ
fn iter_fields(&self) -> FieldIter<'_> ⓘ
fn to_dynamic_struct(&self) -> DynamicStruct
Source§fn clone_dynamic(&self) -> DynamicStruct
fn clone_dynamic(&self) -> DynamicStruct
to_dynamic_struct
insteadDynamicStruct
.Source§fn get_represented_struct_info(&self) -> Option<&'static StructInfo>
fn get_represented_struct_info(&self) -> Option<&'static StructInfo>
None
if TypeInfo
is not available.Source§impl TypePath for OrthographicProjection
impl TypePath for OrthographicProjection
Source§fn type_path() -> &'static str
fn type_path() -> &'static str
Source§fn short_type_path() -> &'static str
fn short_type_path() -> &'static str
Source§fn type_ident() -> Option<&'static str>
fn type_ident() -> Option<&'static str>
Source§fn crate_name() -> Option<&'static str>
fn crate_name() -> Option<&'static str>
Source§impl Typed for OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl Typed for OrthographicProjectionwhere
OrthographicProjection: Any + Send + Sync,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Vec2: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
ScalingMode: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Rect: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Auto Trait Implementations§
impl Freeze for OrthographicProjection
impl RefUnwindSafe for OrthographicProjection
impl Send for OrthographicProjection
impl Sync for OrthographicProjection
impl Unpin for OrthographicProjection
impl UnwindSafe for OrthographicProjection
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
, which can then be
downcast
into Box<dyn 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>
, which 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.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.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DynamicTypePath for Twhere
T: TypePath,
impl<T> DynamicTypePath for Twhere
T: TypePath,
Source§fn reflect_type_path(&self) -> &str
fn reflect_type_path(&self) -> &str
TypePath::type_path
.Source§fn reflect_short_type_path(&self) -> &str
fn reflect_short_type_path(&self) -> &str
Source§fn reflect_type_ident(&self) -> Option<&str>
fn reflect_type_ident(&self) -> Option<&str>
TypePath::type_ident
.Source§fn reflect_crate_name(&self) -> Option<&str>
fn reflect_crate_name(&self) -> Option<&str>
TypePath::crate_name
.Source§fn reflect_module_path(&self) -> Option<&str>
fn reflect_module_path(&self) -> Option<&str>
Source§impl<T> DynamicTyped for Twhere
T: Typed,
impl<T> DynamicTyped for Twhere
T: Typed,
Source§fn reflect_type_info(&self) -> &'static TypeInfo
fn reflect_type_info(&self) -> &'static TypeInfo
Typed::type_info
.Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<S> GetField for Swhere
S: Struct,
impl<S> GetField for Swhere
S: Struct,
Source§impl<T> GetPath for T
impl<T> GetPath for T
Source§fn reflect_path<'p>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>>
fn reflect_path<'p>( &self, path: impl ReflectPath<'p>, ) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>>
path
. Read moreSource§fn reflect_path_mut<'p>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>>
fn reflect_path_mut<'p>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>>
path
. Read moreSource§fn path<'p, T>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&T, ReflectPathError<'p>>where
T: Reflect,
fn path<'p, T>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&T, ReflectPathError<'p>>where
T: Reflect,
path
. Read moreSource§fn path_mut<'p, T>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut T, ReflectPathError<'p>>where
T: Reflect,
fn path_mut<'p, T>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut T, ReflectPathError<'p>>where
T: Reflect,
path
. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.