Barotrauma Client Doc
Barotrauma.Polygon Class Reference

Original source: https://github.com/craftworkgames/MonoGame.Extended/blob/develop/Source/MonoGame.Extended/Shapes/Polygon.cs More...

Inheritance diagram for Barotrauma.Polygon:

Public Member Functions

 Polygon (IEnumerable< Vector2 > vertices)
 
void Offset (Vector2 amount)
 
void Rotate (float amount)
 
void Scale (Vector2 amount)
 
Polygon TransformedCopy (Vector2 offset, float rotation, Vector2 scale)
 
bool Contains (Vector2 point)
 
bool Contains (float x, float y)
 
override bool Equals (object obj)
 
bool Equals (Polygon other)
 
override int GetHashCode ()
 

Static Public Member Functions

static bool operator== (Polygon a, Polygon b)
 
static bool operator!= (Polygon a, Polygon b)
 

Properties

Vector2[] Vertices [get]
 
float Left [get]
 
float Right [get]
 
float Top [get]
 
float Bottom [get]
 

Detailed Description

Constructor & Destructor Documentation

◆ Polygon()

Barotrauma.Polygon.Polygon ( IEnumerable< Vector2 >  vertices)

Definition at line 214 of file ShapeExtensions.cs.

Member Function Documentation

◆ Contains() [1/2]

bool Barotrauma.Polygon.Contains ( float  x,
float  y 
)

Definition at line 323 of file ShapeExtensions.cs.

◆ Contains() [2/2]

bool Barotrauma.Polygon.Contains ( Vector2  point)

Definition at line 318 of file ShapeExtensions.cs.

◆ Equals() [1/2]

override bool Barotrauma.Polygon.Equals ( object  obj)

Definition at line 352 of file ShapeExtensions.cs.

◆ Equals() [2/2]

bool Barotrauma.Polygon.Equals ( Polygon  other)

Definition at line 358 of file ShapeExtensions.cs.

◆ GetHashCode()

override int Barotrauma.Polygon.GetHashCode ( )

Definition at line 363 of file ShapeExtensions.cs.

◆ Offset()

void Barotrauma.Polygon.Offset ( Vector2  amount)

Definition at line 265 of file ShapeExtensions.cs.

◆ operator!=()

static bool Barotrauma.Polygon.operator!= ( Polygon  a,
Polygon  b 
)
static

Definition at line 347 of file ShapeExtensions.cs.

◆ operator==()

static bool Barotrauma.Polygon.operator== ( Polygon  a,
Polygon  b 
)
static

Definition at line 342 of file ShapeExtensions.cs.

◆ Rotate()

void Barotrauma.Polygon.Rotate ( float  amount)

Definition at line 271 of file ShapeExtensions.cs.

◆ Scale()

void Barotrauma.Polygon.Scale ( Vector2  amount)

Definition at line 277 of file ShapeExtensions.cs.

◆ TransformedCopy()

Polygon Barotrauma.Polygon.TransformedCopy ( Vector2  offset,
float  rotation,
Vector2  scale 
)

Definition at line 309 of file ShapeExtensions.cs.

Property Documentation

◆ Bottom

float Barotrauma.Polygon.Bottom
get

Definition at line 260 of file ShapeExtensions.cs.

◆ Left

float Barotrauma.Polygon.Left
get

Definition at line 245 of file ShapeExtensions.cs.

◆ Right

float Barotrauma.Polygon.Right
get

Definition at line 250 of file ShapeExtensions.cs.

◆ Top

float Barotrauma.Polygon.Top
get

Definition at line 255 of file ShapeExtensions.cs.

◆ Vertices

Vector2 [] Barotrauma.Polygon.Vertices
get

Definition at line 231 of file ShapeExtensions.cs.