C# Class CSharpGL.IBoundingBoxHelper

Mostrar archivo Open project: bitzhuwei/CSharpGL

Public Methods

Method Description
Expand ( this boundingBox, float factor = 0.1f ) : BoundingBox

Expands the IBoundingBox's values.

GetCenter ( this boundingBox ) : vec3

Gets center position of this bounding box.

Render ( this boundingBox, Color color, RenderEventArgs arg ) : void

Render this bounding box.

Union ( this boundingBox, IBoundingBox another ) : BoundingBox

expand this boudning box's positions to wrap another one.

Union ( this box, vec3 point ) : BoundingBox

Private Methods

Method Description
Max ( vec3 a, vec3 b ) : vec3

Gets all maximum parts from two vec3.

Min ( vec3 a, vec3 b ) : vec3

Gets all minimum parts from two vec3.

Method Details

Expand() public static method

Expands the IBoundingBox's values.
public static Expand ( this boundingBox, float factor = 0.1f ) : BoundingBox
boundingBox this
factor float 0 for no expanding.
return BoundingBox

GetCenter() public static method

Gets center position of this bounding box.
public static GetCenter ( this boundingBox ) : vec3
boundingBox this
return vec3

Render() public static method

Render this bounding box.
public static Render ( this boundingBox, Color color, RenderEventArgs arg ) : void
boundingBox this
color Color
arg RenderEventArgs
return void

Union() public static method

expand this boudning box's positions to wrap another one.
public static Union ( this boundingBox, IBoundingBox another ) : BoundingBox
boundingBox this
another IBoundingBox
return BoundingBox

Union() public static method

public static Union ( this box, vec3 point ) : BoundingBox
box this
point vec3
return BoundingBox