C# 클래스 Glare.Box2

A two-dimensional box that uses Length elements.
파일 보기 프로젝트 열기: Burton-Radons/Alexandria 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Max System.Vector2
Min System.Vector2
Zero Box2

공개 메소드들

메소드 설명
Box2 ( Length minX, Length minY, Length maxX, Length maxY ) : System

Create a Box2 by providing minimum and maximum extents.

Box2 ( System.Vector2 min, System.Vector2 max ) : System

Create a Box2 by providing minimum and maximum extents.

Distance ( System.Vector2 point ) : Length

Get the closest distance between this Box2 and the Vector2.

Intersect ( System.Vector2 point ) : Containment

Get the intersection type between this box and the point.

NearestPointTo ( System.Vector2 point ) : System.Vector2

Get the nearest point between this Box2 and a Vector2. If the Vector2 is inside this Box2, it is returned untouched.

NearestPointTo ( System.Vector2 &point, System.Vector2 &result ) : void

Get the nearest point between this Box2 and a Vector2. If the Vector2 is inside this Box2, it is returned untouched.

Overlaps ( System.Vector2 point ) : bool

Get whether this Box2 inclusively intersects with the Vector2.

Random ( Random rng ) : System.Vector2

Get a random position within the box.

Random ( Random rng, System.Vector2 &result ) : void

Get a random position within the box.

Relative ( Length minX, Length minY, Length sizeX, Length sizeY ) : Box2

Create a Box2 by providing the minimum extent and the size of each side.

Relative ( System.Vector2 min, System.Vector2 size ) : Box2

Create a Box2 by providing the minimum extent and the size of each side.

Relative ( Length minX, Length minY, Length sizeX, Length sizeY, Box2 &result ) : void

Create a Box2 by providing the minimum extent and the size of each side.

Relative ( System.Vector2 min, System.Vector2 size, Box2 &result ) : void

Create a Box2 by providing the minimum extent and the size of each side.

ToString ( ) : string

Convert to a string representation of the Box2.

ToString ( string format, IFormatProvider provider ) : string

Convert to a string representation of the Box2.

메소드 상세

Box2() 공개 메소드

Create a Box2 by providing minimum and maximum extents.
public Box2 ( Length minX, Length minY, Length maxX, Length maxY ) : System
minX Length
minY Length
maxX Length
maxY Length
리턴 System

Box2() 공개 메소드

Create a Box2 by providing minimum and maximum extents.
public Box2 ( System.Vector2 min, System.Vector2 max ) : System
min System.Vector2
max System.Vector2
리턴 System

Distance() 공개 메소드

Get the closest distance between this Box2 and the Vector2.
public Distance ( System.Vector2 point ) : Length
point System.Vector2
리턴 Length

Intersect() 공개 메소드

Get the intersection type between this box and the point.
public Intersect ( System.Vector2 point ) : Containment
point System.Vector2
리턴 Containment

NearestPointTo() 공개 메소드

Get the nearest point between this Box2 and a Vector2. If the Vector2 is inside this Box2, it is returned untouched.
public NearestPointTo ( System.Vector2 point ) : System.Vector2
point System.Vector2
리턴 System.Vector2

NearestPointTo() 공개 메소드

Get the nearest point between this Box2 and a Vector2. If the Vector2 is inside this Box2, it is returned untouched.
public NearestPointTo ( System.Vector2 &point, System.Vector2 &result ) : void
point System.Vector2
result System.Vector2
리턴 void

Overlaps() 공개 메소드

Get whether this Box2 inclusively intersects with the Vector2.
public Overlaps ( System.Vector2 point ) : bool
point System.Vector2
리턴 bool

Random() 공개 메소드

Get a random position within the box.
public Random ( Random rng ) : System.Vector2
rng System.Random
리턴 System.Vector2

Random() 공개 메소드

Get a random position within the box.
public Random ( Random rng, System.Vector2 &result ) : void
rng System.Random
result System.Vector2
리턴 void

Relative() 공개 정적인 메소드

Create a Box2 by providing the minimum extent and the size of each side.
public static Relative ( Length minX, Length minY, Length sizeX, Length sizeY ) : Box2
minX Length
minY Length
sizeX Length
sizeY Length
리턴 Box2

Relative() 공개 정적인 메소드

Create a Box2 by providing the minimum extent and the size of each side.
public static Relative ( System.Vector2 min, System.Vector2 size ) : Box2
min System.Vector2
size System.Vector2
리턴 Box2

Relative() 공개 정적인 메소드

Create a Box2 by providing the minimum extent and the size of each side.
public static Relative ( Length minX, Length minY, Length sizeX, Length sizeY, Box2 &result ) : void
minX Length
minY Length
sizeX Length
sizeY Length
result Box2
리턴 void

Relative() 공개 정적인 메소드

Create a Box2 by providing the minimum extent and the size of each side.
public static Relative ( System.Vector2 min, System.Vector2 size, Box2 &result ) : void
min System.Vector2
size System.Vector2
result Box2
리턴 void

ToString() 공개 메소드

Convert to a string representation of the Box2.
public ToString ( ) : string
리턴 string

ToString() 공개 메소드

Convert to a string representation of the Box2.
public ToString ( string format, IFormatProvider provider ) : string
format string
provider IFormatProvider
리턴 string

프로퍼티 상세

Max 공개적으로 프로퍼티

The maximum extents of the Box2.
public Vector2,System Max
리턴 System.Vector2

Min 공개적으로 프로퍼티

The minimum extents of the Box2.
public Vector2,System Min
리턴 System.Vector2

Zero 공개적으로 정적으로 프로퍼티

Get an empty Box2 centred on the origin.
public static Box2,Glare Zero
리턴 Box2