C# 클래스 Axiom.Math.AxisAlignedBox

A 3D box aligned with the x/y/z axes.
This class represents a simple box which is aligned with the axes. It stores 2 points as the extremeties of the box, one which is the minima of all 3 axes, and the other which is the maxima of all 3 axes. This class is typically used for an axis-aligned bounding box (AABB) for collision and visibility determination.
상속: ICloneable
파일 보기 프로젝트 열기: WolfgangSt/axiom 1 사용 예제들

공개 메소드들

메소드 설명
AxisAlignedBox ( ) : System
AxisAlignedBox ( AxisAlignedBox box ) : System
AxisAlignedBox ( Vector3 min, Vector3 max ) : System
Clone ( ) : object
Contains ( Vector3 v ) : bool

Tests whether the given point contained by this box.

Equals ( object obj ) : bool
FromDimensions ( Vector3 center, Vector3 size ) : AxisAlignedBox

Return new bounding box from the supplied dimensions.

GetHashCode ( ) : int
Intersection ( AxisAlignedBox b2 ) : AxisAlignedBox

Calculate the area of intersection of this box and another

Intersects ( AxisAlignedBox box2 ) : bool

Returns whether or not this box intersects another.

Intersects ( Plane plane ) : bool

Intersects ( Sphere sphere ) : bool

Tests whether this box intersects a sphere.

Intersects ( Vector3 vector ) : bool

Tests whether the vector point is within this box.

Merge ( AxisAlignedBox box ) : void

Allows for merging two boxes together (combining).

Merge ( Vector3 point ) : void

Extends the box to encompass the specified point (if needed).

Scale ( Vector3 factor ) : void

Scales the size of the box by the supplied factor.

SetExtents ( Vector3 min, Vector3 max ) : void

Sets both Minimum and Maximum at once, so that UpdateCorners only needs to be called once as well.

ToString ( ) : string
Transform ( Matrix4 matrix ) : void

operator ( ) : bool

비공개 메소드들

메소드 설명
UpdateCorners ( ) : void

메소드 상세

AxisAlignedBox() 공개 메소드

public AxisAlignedBox ( ) : System
리턴 System

AxisAlignedBox() 공개 메소드

public AxisAlignedBox ( AxisAlignedBox box ) : System
box AxisAlignedBox
리턴 System

AxisAlignedBox() 공개 메소드

public AxisAlignedBox ( Vector3 min, Vector3 max ) : System
min Vector3
max Vector3
리턴 System

Clone() 공개 메소드

public Clone ( ) : object
리턴 object

Contains() 공개 메소드

Tests whether the given point contained by this box.
public Contains ( Vector3 v ) : bool
v Vector3
리턴 bool

Equals() 공개 메소드

public Equals ( object obj ) : bool
obj object
리턴 bool

FromDimensions() 공개 정적인 메소드

Return new bounding box from the supplied dimensions.
public static FromDimensions ( Vector3 center, Vector3 size ) : AxisAlignedBox
center Vector3 Center of the new box
size Vector3 Entire size of the new box
리턴 AxisAlignedBox

GetHashCode() 공개 메소드

public GetHashCode ( ) : int
리턴 int

Intersection() 공개 메소드

Calculate the area of intersection of this box and another
public Intersection ( AxisAlignedBox b2 ) : AxisAlignedBox
b2 AxisAlignedBox
리턴 AxisAlignedBox

Intersects() 공개 메소드

Returns whether or not this box intersects another.
public Intersects ( AxisAlignedBox box2 ) : bool
box2 AxisAlignedBox
리턴 bool

Intersects() 공개 메소드

public Intersects ( Plane plane ) : bool
plane Plane
리턴 bool

Intersects() 공개 메소드

Tests whether this box intersects a sphere.
public Intersects ( Sphere sphere ) : bool
sphere Sphere
리턴 bool

Intersects() 공개 메소드

Tests whether the vector point is within this box.
public Intersects ( Vector3 vector ) : bool
vector Vector3
리턴 bool

Merge() 공개 메소드

Allows for merging two boxes together (combining).
public Merge ( AxisAlignedBox box ) : void
box AxisAlignedBox Source box.
리턴 void

Merge() 공개 메소드

Extends the box to encompass the specified point (if needed).
public Merge ( Vector3 point ) : void
point Vector3
리턴 void

Scale() 공개 메소드

Scales the size of the box by the supplied factor.
public Scale ( Vector3 factor ) : void
factor Vector3 Factor of scaling to apply to the box.
리턴 void

SetExtents() 공개 메소드

Sets both Minimum and Maximum at once, so that UpdateCorners only needs to be called once as well.
public SetExtents ( Vector3 min, Vector3 max ) : void
min Vector3
max Vector3
리턴 void

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

Transform() 공개 메소드

public Transform ( Matrix4 matrix ) : void
matrix Matrix4
리턴 void

operator() 공개 정적인 메소드

public static operator ( ) : bool
리턴 bool