Class Fox::FXRanged
In: rdoc-sources/FXRanged.rb
Parent: Object

Represents a range in 3-D space.

Methods

center   contains?   contains?   contains?   contains?   corner   depth   diagonal   diameter   empty?   height   include!   intersect   intersection   intersects?   longest   new   new   new   overlaps?   radius   shortest   union   width  

Attributes

lower  [RW]  Lower corner of range [FXVec3d]
upper  [RW]  Upper corner of range [FXVec3d]

Public Class methods

Initialize this FXRanged instance from another instance

Initialize box to fully contain the given sphere (an FXSphered instance)

Public Instance methods

Return the center of the box (a point, as an FXVec3d instance).

Returns true if this range contains the point p (an FXVec3d instance)

Returns true if this range contains the point (x, y, z).

Returns true if this box properly contains aRange (another FXRanged instance)

Returns true if this box properly contains aSphere (an FXSphered instance)

Return the _c_th corner of this box (an FXVec3d instance). Raises IndexError if c is less than zero or greater than 7.

Return the depth of the box

Return the diagonal vector for the box (an FXVec3d instance).

Return the length of the diagonal of the box

Returns true if this is an empty range (i.e. if any of the side lengths is zero or less).

Return the height of the box

Include the given range or point into this range and return a reference to self. Valid forms are:

    range.include!(aRange)  -> range
    range.include!(x, y, z) -> range
    range.include!(vec)     -> range
    range.include!(sphere)  -> range

Intersect box with a plane ax+by+cz+w; returns -1, 0 or 1.

Return a new FXRanged instance which is the intersection of this box and another box.

Return true if the ray from u to v (both FXVec3d instances representing the ray endpoints) intersects this box.

Return the length of the longest side of the box

Returns true if any part of this range overlaps the other range.

Return the radius of the box

Return the length of the shortest side of the box

Return a new FXRanged instance which is the union of this box and another box.

Return the width of the box

[Validate]