MCPcopy Create free account
hub / github.com/PerroEngine/Perro / editor_cursor_icon

Function editor_cursor_icon

perro_editor/res/scripts/scene/editor_viewport.rs:2200–2233  ·  view source on GitHub ↗
(ctx: &mut ScriptContext<'_, API>)

Source from the content-addressed store, hash-verified

2198 scale: Vector3,
2199 rotation: Quaternion,
2200) {
2201 let _ = create_editor_mesh_child(
2202 ctx,
2203 parent,
2204 "__editor_selected_axis",
2205 "__cube__",
2206 material,
2207 Transform3D::new(position, rotation, scale),
2208 );
2209}
2210
2211fn add_collision_vertices_3d<API: ScriptAPI + ?Sized>(
2212 ctx: &mut ScriptContext<'_, API>,
2213 parent: NodeID,
2214 material: MaterialID,
2215 shape: &Shape3D,
2216) {
2217 for point in collision_shape_vertex_points(shape) {
2218 let _ = create_editor_mesh_child(
2219 ctx,
2220 parent,
2221 "__editor_collision3d_vertex",
2222 "__cube__",
2223 material,
2224 Transform3D::new(
2225 point,
2226 Quaternion::IDENTITY,
2227 Vector3::new(0.075, 0.075, 0.075),
2228 ),
2229 );
2230 }
2231}
2232
2233fn collision_shape_vertex_points(shape: &Shape3D) -> Vec<Vector3> {
2234 match shape {
2235 Shape3D::Cube { size } => {
2236 let hx = size.x.abs() * 0.5;

Callers 1

update_editor_cursorFunction · 0.85

Calls 6

resize_cursor_iconFunction · 0.85
viewport_pointerFunction · 0.85
pick_resize_handleFunction · 0.85
pick_rotation_zoneFunction · 0.85
pick_preview_uiFunction · 0.85
is_emptyMethod · 0.45

Tested by

no test coverage detected