MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / get_edge

Method get_edge

core/math/aabb.cpp:365–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

363}
364
365void AABB::get_edge(int p_edge, Vector3 &r_from, Vector3 &r_to) const {
366 ERR_FAIL_INDEX(p_edge, 12);
367 switch (p_edge) {
368 case 0: {
369 r_from = Vector3(position.x + size.x, position.y, position.z);
370 r_to = Vector3(position.x, position.y, position.z);
371 } break;
372 case 1: {
373 r_from = Vector3(position.x + size.x, position.y, position.z + size.z);
374 r_to = Vector3(position.x + size.x, position.y, position.z);
375 } break;
376 case 2: {
377 r_from = Vector3(position.x, position.y, position.z + size.z);
378 r_to = Vector3(position.x + size.x, position.y, position.z + size.z);
379
380 } break;
381 case 3: {
382 r_from = Vector3(position.x, position.y, position.z);
383 r_to = Vector3(position.x, position.y, position.z + size.z);
384
385 } break;
386 case 4: {
387 r_from = Vector3(position.x, position.y + size.y, position.z);
388 r_to = Vector3(position.x + size.x, position.y + size.y, position.z);
389 } break;
390 case 5: {
391 r_from = Vector3(position.x + size.x, position.y + size.y, position.z);
392 r_to = Vector3(position.x + size.x, position.y + size.y, position.z + size.z);
393 } break;
394 case 6: {
395 r_from = Vector3(position.x + size.x, position.y + size.y, position.z + size.z);
396 r_to = Vector3(position.x, position.y + size.y, position.z + size.z);
397
398 } break;
399 case 7: {
400 r_from = Vector3(position.x, position.y + size.y, position.z + size.z);
401 r_to = Vector3(position.x, position.y + size.y, position.z);
402
403 } break;
404 case 8: {
405 r_from = Vector3(position.x, position.y, position.z + size.z);
406 r_to = Vector3(position.x, position.y + size.y, position.z + size.z);
407
408 } break;
409 case 9: {
410 r_from = Vector3(position.x, position.y, position.z);
411 r_to = Vector3(position.x, position.y + size.y, position.z);
412
413 } break;
414 case 10: {
415 r_from = Vector3(position.x + size.x, position.y, position.z);
416 r_to = Vector3(position.x + size.x, position.y + size.y, position.z);
417
418 } break;
419 case 11: {
420 r_from = Vector3(position.x + size.x, position.y, position.z + size.z);
421 r_to = Vector3(position.x + size.x, position.y + size.y, position.z + size.z);
422

Callers 15

_setupMethod · 0.80
get_debug_mesh_linesMethod · 0.80
GridMapEditorMethod · 0.80
intersects_aabbMethod · 0.80
redrawMethod · 0.80
redrawMethod · 0.80
redrawMethod · 0.80
redrawMethod · 0.80
redrawMethod · 0.80
redrawMethod · 0.80
redrawMethod · 0.80

Calls 1

Vector3Function · 0.70

Tested by

no test coverage detected