Class: Fox::FXRangef

Inherits:
Object
  • Object
show all
Defined in:
rdoc-sources/FXRangef.rb

Overview

Represents a range in 3-D space.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sphere) ⇒ FXRangef

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



14
# File 'rdoc-sources/FXRangef.rb', line 14

def initialize(xlo=0.0, xhi=0.0, ylo=0.0, yhi=0.0, zlo=0.0, zhi=0.0) ; end

Instance Attribute Details

#lowerObject

Lower corner of range Fox::FXVec3f



8
9
10
# File 'rdoc-sources/FXRangef.rb', line 8

def lower
  @lower
end

#upperObject

Upper corner of range Fox::FXVec3f



11
12
13
# File 'rdoc-sources/FXRangef.rb', line 11

def upper
  @upper
end

Instance Method Details

#centerObject

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



47
# File 'rdoc-sources/FXRangef.rb', line 47

def center; end

#contains?(aSphere) ⇒ Boolean

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

Returns:

  • (Boolean)


54
# File 'rdoc-sources/FXRangef.rb', line 54

def contains?(x, y, z) ; end

#corner(c) ⇒ Object

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



90
# File 'rdoc-sources/FXRangef.rb', line 90

def corner(c); end

#depthObject

Return the depth of the box



29
# File 'rdoc-sources/FXRangef.rb', line 29

def depth; end

#diagonalObject

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



44
# File 'rdoc-sources/FXRangef.rb', line 44

def diagonal; end

#diameterObject

Return the length of the diagonal of the box



38
# File 'rdoc-sources/FXRangef.rb', line 38

def diameter; end

#empty?Boolean

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

Returns:

  • (Boolean)


51
# File 'rdoc-sources/FXRangef.rb', line 51

def empty?() ; end

#heightObject

Return the height of the box



26
# File 'rdoc-sources/FXRangef.rb', line 26

def height; end

#include!(*args) ⇒ Object

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


76
# File 'rdoc-sources/FXRangef.rb', line 76

def include!(*args) ; end

#intersect(plane) ⇒ Object

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



79
# File 'rdoc-sources/FXRangef.rb', line 79

def intersect(plane); end

#intersection(other) ⇒ Object

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



98
# File 'rdoc-sources/FXRangef.rb', line 98

def intersection(other); end

#intersects?(u, v) ⇒ Boolean

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

Returns:

  • (Boolean)


83
# File 'rdoc-sources/FXRangef.rb', line 83

def intersects?(u, v) ; end

#longestObject

Return the length of the longest side of the box



32
# File 'rdoc-sources/FXRangef.rb', line 32

def longest; end

#overlaps?(other) ⇒ Boolean

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

Returns:

  • (Boolean)


86
# File 'rdoc-sources/FXRangef.rb', line 86

def overlaps?(other) ; end

#radiusObject

Return the radius of the box.



41
# File 'rdoc-sources/FXRangef.rb', line 41

def radius; end

#shortestObject

Return the length of the shortest side of the box



35
# File 'rdoc-sources/FXRangef.rb', line 35

def shortest; end

#union(other) ⇒ Object

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



94
# File 'rdoc-sources/FXRangef.rb', line 94

def union(other); end

#widthObject

Return the width of the box



23
# File 'rdoc-sources/FXRangef.rb', line 23

def width; end