MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / convertToNodeSpace

Method convertToNodeSpace

Source/Node/Node.cpp:668–674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

666}
667
668Vec2 Node::convertToNodeSpace(const Vec2& worldPoint) {
669 Matrix invWorld;
670 bx::mtxInverse(invWorld.m, getWorld().m);
671 Vec3 point;
672 point = Vec3::from(bx::mul(bx::Vec3{worldPoint.x, worldPoint.y, 0.0f}, invWorld.m));
673 return point.toVec2();
674}
675
676Vec2 Node::convertToWorldSpace(const Vec2& nodePoint) {
677 Vec3 point = Vec3::from(bx::mul(bx::Vec3{nodePoint.x, nodePoint.y, 0.0f}, getWorld().m));

Callers 7

touchForButtonFunction · 0.80
displayClipsFunction · 0.80
generateClipsFunction · 0.80
getTouchedItemFunction · 0.80
itemForTouchMethod · 0.80
runMethod · 0.80

Calls 3

mtxInverseFunction · 0.85
toVec2Method · 0.80
mulClass · 0.50

Tested by

no test coverage detected