C# 클래스 MilkShakeFramework.Tools.Maths.RotatedRectangle

파일 보기 프로젝트 열기: lucas-jones/MilkShake-old 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
CollisionRectangle Microsoft.Xna.Framework.Rectangle
Origin Vector2
Rotation float

공개 메소드들

메소드 설명
ChangePosition ( int theXPositionAdjustment, int theYPositionAdjustment ) : void

Used for changing the X and Y position of the RotatedRectangle

Intersects ( Rectangle theRectangle ) : bool

This intersects method can be used to check a standard XNA framework Rectangle object and see if it collides with a Rotated Rectangle object

Intersects ( RotatedRectangle theRectangle ) : bool

Check to see if two Rotated Rectangls have collided

LowerLeftCorner ( ) : Vector2
LowerRightCorner ( ) : Vector2
RotatedRectangle ( Rectangle theRectangle, float theInitialRotation ) : System
RotatedRectangle ( int X, int Y, int Width, int Height ) : System
UpperLeftCorner ( ) : Vector2
UpperRightCorner ( ) : Vector2

비공개 메소드들

메소드 설명
GenerateScalar ( Vector2 theRectangleCorner, Vector2 theAxis ) : int

Generates a scalar value that can be used to compare where corners of a rectangle have been projected onto a particular axis.

IsAxisCollision ( RotatedRectangle theRectangle, Vector2 aAxis ) : bool

Determines if a collision has occurred on an Axis of one of the planes parallel to the Rectangle

RotatePoint ( Vector2 thePoint, Vector2 theOrigin, float theRotation ) : Vector2

Rotate a point from a given location and adjust using the Origin we are rotating around

메소드 상세

ChangePosition() 공개 메소드

Used for changing the X and Y position of the RotatedRectangle
public ChangePosition ( int theXPositionAdjustment, int theYPositionAdjustment ) : void
theXPositionAdjustment int
theYPositionAdjustment int
리턴 void

Intersects() 공개 메소드

This intersects method can be used to check a standard XNA framework Rectangle object and see if it collides with a Rotated Rectangle object
public Intersects ( Rectangle theRectangle ) : bool
theRectangle Microsoft.Xna.Framework.Rectangle
리턴 bool

Intersects() 공개 메소드

Check to see if two Rotated Rectangls have collided
public Intersects ( RotatedRectangle theRectangle ) : bool
theRectangle RotatedRectangle
리턴 bool

LowerLeftCorner() 공개 메소드

public LowerLeftCorner ( ) : Vector2
리턴 Vector2

LowerRightCorner() 공개 메소드

public LowerRightCorner ( ) : Vector2
리턴 Vector2

RotatedRectangle() 공개 메소드

public RotatedRectangle ( Rectangle theRectangle, float theInitialRotation ) : System
theRectangle Microsoft.Xna.Framework.Rectangle
theInitialRotation float
리턴 System

RotatedRectangle() 공개 메소드

public RotatedRectangle ( int X, int Y, int Width, int Height ) : System
X int
Y int
Width int
Height int
리턴 System

UpperLeftCorner() 공개 메소드

public UpperLeftCorner ( ) : Vector2
리턴 Vector2

UpperRightCorner() 공개 메소드

public UpperRightCorner ( ) : Vector2
리턴 Vector2

프로퍼티 상세

CollisionRectangle 공개적으로 프로퍼티

public Rectangle,Microsoft.Xna.Framework CollisionRectangle
리턴 Microsoft.Xna.Framework.Rectangle

Origin 공개적으로 프로퍼티

public Vector2 Origin
리턴 Vector2

Rotation 공개적으로 프로퍼티

public float Rotation
리턴 float