IsPointInside
Introduction
Code Example
using Microsoft.Xna.Framework.Graphics;
using FlatRedBall.Math.Geometry;
using FlatRedBall.Input;Polygon polygon;polygon = Polygon.CreateRectangle(3, 3);
ShapeManager.AddPolygon(polygon);
IsMouseVisible = true;if (polygon.IsPointInside(
InputManager.Mouse.WorldXAt(polygon.Z),
InputManager.Mouse.WorldYAt(polygon.Z)))
{
polygon.Color = Color.Red;
}
else
{
polygon.Color = Color.Yellow;
}
IsPointInside and ForceUpdateDependencies
Last updated
Was this helpful?