|
BoxHitShape | |
State = BoxHitShape(X1#, Y1#, X2#, Y2#, ShapeIndex, ShapeX#, ShapeY#) | |
Parameters: X1# = The X (top left) coord of the test box Y1# = The Y (top left) coord of the test box X2# = The X (bottom right) coord of the test box Y2# = The Y (bottom right) coord of the test box ShapeIndex = The index of the shape you wish to test ShapeX# = The base X position of the test shape ShapeY# = The base Y position of the test shape |
|
Returns: State = The hit state of the circle (0 = outside of shape, 1 = intersects shape) |
|
The BoxHitShape function checks if a BOX is inside, or intersects a vector shape. It will return a true (1) when it intersects, or a false(0) when it does not. FACTS: * The box coordinates don't have to be top to bottom, BoxHitShape will swap them internally for you. Mini Tutorial: This example checks if a box positioned at the mouse pointer position, hits a moving shape.
Sample output, |
Related Info: | CircleHitShape | LineHitShape | PointHitShape | ShapeHitShape : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |