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

Function move_doc_ui_node

perro_editor/res/scripts/scene/editor_viewport.rs:2249–2307  ·  view source on GitHub ↗
(
    ctx: &mut ScriptContext<'_, API>,
    key: u32,
    root_delta: Vector2,
    snap: bool,
)

Source from the content-addressed store, hash-verified

2247 Vector3::new(-hx, hy, hz),
2248 ]
2249 }
2250 Shape3D::Sphere { radius } => {
2251 let r = radius.abs();
2252 vec![
2253 Vector3::new(r, 0.0, 0.0),
2254 Vector3::new(-r, 0.0, 0.0),
2255 Vector3::new(0.0, r, 0.0),
2256 Vector3::new(0.0, -r, 0.0),
2257 Vector3::new(0.0, 0.0, r),
2258 Vector3::new(0.0, 0.0, -r),
2259 ]
2260 }
2261 Shape3D::Capsule {
2262 radius,
2263 half_height,
2264 }
2265 | Shape3D::Cylinder {
2266 radius,
2267 half_height,
2268 }
2269 | Shape3D::Cone {
2270 radius,
2271 half_height,
2272 } => {
2273 let r = radius.abs();
2274 let h = half_height.abs();
2275 vec![
2276 Vector3::new(r, h, 0.0),
2277 Vector3::new(-r, h, 0.0),
2278 Vector3::new(0.0, h, r),
2279 Vector3::new(0.0, h, -r),
2280 Vector3::new(r, -h, 0.0),
2281 Vector3::new(-r, -h, 0.0),
2282 Vector3::new(0.0, -h, r),
2283 Vector3::new(0.0, -h, -r),
2284 ]
2285 }
2286 Shape3D::TriPrism { size } => {
2287 let hx = size.x.abs() * 0.5;
2288 let hy = size.y.abs() * 0.5;
2289 let hz = size.z.abs() * 0.5;
2290 vec![
2291 Vector3::new(-hx, -hy, -hz),
2292 Vector3::new(hx, -hy, -hz),
2293 Vector3::new(0.0, hy, -hz),
2294 Vector3::new(-hx, -hy, hz),
2295 Vector3::new(hx, -hy, hz),
2296 Vector3::new(0.0, hy, hz),
2297 ]
2298 }
2299 Shape3D::TriangularPyramid { size } => {
2300 let hx = size.x.abs() * 0.5;
2301 let hy = size.y.abs() * 0.5;
2302 let hz = size.z.abs() * 0.5;
2303 vec![
2304 Vector3::new(-hx, -hy, -hz),
2305 Vector3::new(hx, -hy, -hz),
2306 Vector3::new(0.0, -hy, hz),

Callers 1

update_ui_dragFunction · 0.85

Calls 3

rebuild_previewFunction · 0.85
refresh_allFunction · 0.85

Tested by

no test coverage detected