C# 클래스 Glare.Box2i

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

공개 프로퍼티들

프로퍼티 타입 설명
Max Vector2i
Min Vector2i
Zero Box2i

공개 메소드들

메소드 설명
Box2i ( Int32 minX, Int32 minY, Int32 maxX, Int32 maxY ) : System

Create a Box2i by providing minimum and maximum extents.

Box2i ( Vector2i min, Vector2i max ) : System

Create a Box2i by providing minimum and maximum extents.

Distance ( Vector2i point ) : double

Get the closest distance between this Box2i and the Vector2i.

Intersect ( Vector2i point ) : Containment

Get the intersection type between this box and the point.

NearestPointTo ( Vector2i point ) : Vector2i

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

NearestPointTo ( Vector2i &point, Vector2i &result ) : void

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

Overlaps ( Vector2i point ) : bool

Get whether this Box2i inclusively intersects with the Vector2i.

Random ( Random rng ) : Vector2i

Get a random position within the box.

Random ( Random rng, Vector2i &result ) : void

Get a random position within the box.

Relative ( Int32 minX, Int32 minY, Int32 sizeX, Int32 sizeY ) : Box2i

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

Relative ( Vector2i min, Vector2i size ) : Box2i

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

Relative ( Int32 minX, Int32 minY, Int32 sizeX, Int32 sizeY, Box2i &result ) : void

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

Relative ( Vector2i min, Vector2i size, Box2i &result ) : void

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

ToString ( ) : string

Convert to a string representation of the Box2i.

ToString ( string format, IFormatProvider provider ) : string

Convert to a string representation of the Box2i.

메소드 상세

Box2i() 공개 메소드

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

Box2i() 공개 메소드

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

Distance() 공개 메소드

Get the closest distance between this Box2i and the Vector2i.
public Distance ( Vector2i point ) : double
point Vector2i
리턴 double

Intersect() 공개 메소드

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

NearestPointTo() 공개 메소드

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

NearestPointTo() 공개 메소드

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

Overlaps() 공개 메소드

Get whether this Box2i inclusively intersects with the Vector2i.
public Overlaps ( Vector2i point ) : bool
point Vector2i
리턴 bool

Random() 공개 메소드

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

Random() 공개 메소드

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

Relative() 공개 정적인 메소드

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

Relative() 공개 정적인 메소드

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

Relative() 공개 정적인 메소드

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

Relative() 공개 정적인 메소드

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

ToString() 공개 메소드

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

ToString() 공개 메소드

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

프로퍼티 상세

Max 공개적으로 프로퍼티

The maximum extents of the Box2i.
public Vector2i Max
리턴 Vector2i

Min 공개적으로 프로퍼티

The minimum extents of the Box2i.
public Vector2i Min
리턴 Vector2i

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

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