C# Class Sharpex2D.Math.Polygon

Afficher le fichier Open project: ThuCommix/Sharpex2D Class Usage Examples

Méthodes publiques

Méthode Description
FromEllipse ( Ellipse ellipse ) : Polygon

Creates a new Polygon from ellipse.

FromRectangle ( Rectangle rectangle ) : Polygon

Creates a new Polygon from rectangle.

Intersects ( Polygon other ) : bool

Checks if this Polygon intersects with another Polygon.

Intersects ( Polygon other, Vector2 &minimumTranslationVector ) : bool

Checks if this Polygon intersects with another Polygon.

Polygon ( ) : System

Initializes a new Polygon class.

Polygon ( IEnumerable points ) : System

Initializes a new Polygon class.

Private Methods

Méthode Description
HasSeparatingAxisTo ( Polygon other, float &minOverlap, Vector2 &axis ) : bool

A value indicating whether the Polygon has a seperating axis.

ProjectTo ( Vector2 axis, float &min, float &max ) : void

Projects an axis.

Method Details

FromEllipse() public static méthode

Creates a new Polygon from ellipse.
public static FromEllipse ( Ellipse ellipse ) : Polygon
ellipse Ellipse The Ellipse.
Résultat Polygon

FromRectangle() public static méthode

Creates a new Polygon from rectangle.
public static FromRectangle ( Rectangle rectangle ) : Polygon
rectangle Rectangle The Rectangle.
Résultat Polygon

Intersects() public méthode

Checks if this Polygon intersects with another Polygon.
public Intersects ( Polygon other ) : bool
other Polygon The other Polygon.
Résultat bool

Intersects() public méthode

Checks if this Polygon intersects with another Polygon.
public Intersects ( Polygon other, Vector2 &minimumTranslationVector ) : bool
other Polygon The other Polygon.
minimumTranslationVector Vector2 /// Returns a vector with which the Polygon has to be translated at minimum to not /// collide with the second Polygon. ///
Résultat bool

Polygon() public méthode

Initializes a new Polygon class.
public Polygon ( ) : System
Résultat System

Polygon() public méthode

Initializes a new Polygon class.
public Polygon ( IEnumerable points ) : System
points IEnumerable The Points.
Résultat System