| 1314 | } |
| 1315 | |
| 1316 | Vector2 Tr2Sprite2dScene::InverseTransformPoint( const Vector2& point ) const |
| 1317 | { |
| 1318 | if( m_transformStack->empty() ) |
| 1319 | { |
| 1320 | return point; |
| 1321 | } |
| 1322 | else |
| 1323 | { |
| 1324 | const TransformStackEntry& topEntry = m_transformStack->back(); |
| 1325 | |
| 1326 | if( topEntry.isTranslationOnly ) |
| 1327 | { |
| 1328 | return point - topEntry.translation; |
| 1329 | } |
| 1330 | else |
| 1331 | { |
| 1332 | auto transformed = Transform( Vector4( point.x, point.y, 0, 1 ), Inverse( topEntry.transform ) ); |
| 1333 | return Vector2( transformed.x, transformed.y ); |
| 1334 | } |
| 1335 | } |
| 1336 | } |
| 1337 | |
| 1338 | bool Tr2Sprite2dScene::IsInside( const Vector2& pointIn, const Vector2& topLeft, float width, float height, float radius ) |
| 1339 | { |