C# 클래스 Glare.Box2d

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

공개 프로퍼티들

프로퍼티 타입 설명
Max Vector2d
Min Vector2d
Zero Box2d

공개 메소드들

메소드 설명
Box2d ( Double minX, Double minY, Double maxX, Double maxY ) : System

Create a Box2d by providing minimum and maximum extents.

Box2d ( Vector2d min, Vector2d max ) : System

Create a Box2d by providing minimum and maximum extents.

Distance ( Vector2d point ) : Double

Get the closest distance between this Box2d and the Vector2d.

Intersect ( Vector2d point ) : Containment

Get the intersection type between this box and the point.

NearestPointTo ( Vector2d point ) : Vector2d

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

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

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

Overlaps ( Vector2d point ) : bool

Get whether this Box2d inclusively intersects with the Vector2d.

Random ( Random rng ) : Vector2d

Get a random position within the box.

Random ( Random rng, Vector2d &result ) : void

Get a random position within the box.

Relative ( Double minX, Double minY, Double sizeX, Double sizeY ) : Box2d

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

Relative ( Vector2d min, Vector2d size ) : Box2d

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

Relative ( Double minX, Double minY, Double sizeX, Double sizeY, Box2d &result ) : void

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

Relative ( Vector2d min, Vector2d size, Box2d &result ) : void

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

ToString ( ) : string

Convert to a string representation of the Box2d.

ToString ( string format, IFormatProvider provider ) : string

Convert to a string representation of the Box2d.

메소드 상세

Box2d() 공개 메소드

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

Box2d() 공개 메소드

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

Distance() 공개 메소드

Get the closest distance between this Box2d and the Vector2d.
public Distance ( Vector2d point ) : Double
point Vector2d
리턴 Double

Intersect() 공개 메소드

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

NearestPointTo() 공개 메소드

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

NearestPointTo() 공개 메소드

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

Overlaps() 공개 메소드

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

Random() 공개 메소드

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

Random() 공개 메소드

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

Relative() 공개 정적인 메소드

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

Relative() 공개 정적인 메소드

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

Relative() 공개 정적인 메소드

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

Relative() 공개 정적인 메소드

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

ToString() 공개 메소드

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

ToString() 공개 메소드

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

프로퍼티 상세

Max 공개적으로 프로퍼티

The maximum extents of the Box2d.
public Vector2d Max
리턴 Vector2d

Min 공개적으로 프로퍼티

The minimum extents of the Box2d.
public Vector2d Min
리턴 Vector2d

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

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