Property | Type | Description | |
---|---|---|---|
height | float | ||
width | float |
Method | Description | |
---|---|---|
Box ( float width, float height ) : Microsoft.Xna.Framework | ||
collidesWithShape ( |
||
containsPoint ( Vector2 point ) : bool | ||
overlaps ( |
||
pointCollidesWithShape ( Vector2 point, CollisionResult &result ) : bool | ||
updateBox ( float width, float height ) : void |
updates the Box points, recalculates the center and sets the width/height
|
Method | Description | |
---|---|---|
buildBox ( float width, float height ) : Vector2[] |
helper that builds the points a Polygon needs in the shape of a box
|
public Box ( float width, float height ) : Microsoft.Xna.Framework | ||
width | float | |
height | float | |
return | Microsoft.Xna.Framework |
public collidesWithShape ( |
||
other | ||
result | CollisionResult | |
return | bool |
public containsPoint ( Vector2 point ) : bool | ||
point | Vector2 | |
return | bool |
public pointCollidesWithShape ( Vector2 point, CollisionResult &result ) : bool | ||
point | Vector2 | |
result | CollisionResult | |
return | bool |
public updateBox ( float width, float height ) : void | ||
width | float | Width. |
height | float | Height. |
return | void |