MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / hitTest

Method hitTest

src/main/java/fieldbox/boxes/plugins/Handles.java:310–319  ·  view source on GitHub ↗
(Draggable x, Vec3 nodePosition, Vec2 mousePosition)

Source from the content-addressed store, hash-verified

308
309 if (x.source != null && x.source.attributes.has(inside)) {
310 Viewport v = x.source.attributes.get(inside);
311 Vec2 at = v.viewportToDrawingSpace(nodePosition);
312 return at.distance(mousePosition);
313 }
314
315 return nodePosition.toVec2().distance(mousePosition);
316 }
317
318 private Vec3 applyDrag(Draggable x, Vec2 mouseWas, Vec2 mouseNow, Vec3 initialPosition) {
319 if (x.source != null && x.source.attributes.has(inside)) {
320 System.out.println(" this is 3d");
321 Viewport v = x.source.attributes.get(inside);
322

Callers 1

onMouseDownMethod · 0.95

Calls 5

distanceMethod · 0.95
getMethod · 0.65
hasMethod · 0.45
toVec2Method · 0.45

Tested by

no test coverage detected