Class: Fox::FXSphered
- Inherits:
-
Object
- Object
- Fox::FXSphered
- Defined in:
- rdoc-sources/FXSphered.rb
Overview
Spherical bounds
Instance Attribute Summary collapse
-
#center ⇒ Object
Sphere center FXVec3d.
-
#radius ⇒ Object
Sphere radius [Float].
Instance Method Summary collapse
-
#contains?(sphere) ⇒ Boolean
Return
true
if this sphere properly contains sphere (another FXSphered instance). -
#diameter ⇒ Object
Return the diameter of this sphere.
-
#empty? ⇒ Boolean
Return
true
if this sphere is empty (i.e. has zero radius). -
#include!(sphere) ⇒ Object
Include the sphere sphere (an FXSphered instance) into this sphere and return self.
-
#includeInRadius!(sphere) ⇒ Object
Expand radius to include sphere (an FXSphered instance) and return self.
-
#initialize(bounds) ⇒ FXSphered
constructor
Initialize sphere to fully contain the given bounding box (an FXRanged instance).
-
#intersect(plane) ⇒ Object
Intersect this sphere with the plane ax+by+cz+w and return -1, 0 or +1.
-
#intersects?(u, v) ⇒ Boolean
Return
true
if this sphere intersects the ray between points u and v (both FXVec3d instances). -
#overlaps?(sphere) ⇒ Boolean
Return
true
if this sphere overlaps with another sphere.
Constructor Details
#initialize(bounds) ⇒ FXSphered
Initialize sphere to fully contain the given bounding box (an FXRanged instance).
13 |
# File 'rdoc-sources/FXSphered.rb', line 13 def initialize; end |
Instance Attribute Details
#center ⇒ Object
Sphere center Fox::FXVec3d
7 8 9 |
# File 'rdoc-sources/FXSphered.rb', line 7 def center @center end |
#radius ⇒ Object
Sphere radius [Float]
10 11 12 |
# File 'rdoc-sources/FXSphered.rb', line 10 def radius @radius end |
Instance Method Details
#contains?(sphere) ⇒ Boolean
Return true
if this sphere properly contains sphere (another FXSphered instance).
34 |
# File 'rdoc-sources/FXSphered.rb', line 34 def contains?(x, y, z); end |
#diameter ⇒ Object
Return the diameter of this sphere.
28 |
# File 'rdoc-sources/FXSphered.rb', line 28 def diameter; end |
#empty? ⇒ Boolean
Return true
if this sphere is empty (i.e. has zero radius).
31 |
# File 'rdoc-sources/FXSphered.rb', line 31 def empty?; end |
#include!(sphere) ⇒ Object
Include the sphere sphere (an FXSphered instance) into this sphere and return self.
46 |
# File 'rdoc-sources/FXSphered.rb', line 46 def include!(p); end |
#includeInRadius!(sphere) ⇒ Object
Expand radius to include sphere (an FXSphered instance) and return self.
49 |
# File 'rdoc-sources/FXSphered.rb', line 49 def includeInRadius!(x, y, z); end |
#intersect(plane) ⇒ Object
Intersect this sphere with the plane ax+by+cz+w and return -1, 0 or +1. Here, plane is an FXVec4d instance describing the plane.
65 |
# File 'rdoc-sources/FXSphered.rb', line 65 def intersect(plane); end |
#intersects?(u, v) ⇒ Boolean
Return true
if this sphere intersects the ray between points u and v (both FXVec3d instances).
72 |
# File 'rdoc-sources/FXSphered.rb', line 72 def intersects?(u, v); end |
#overlaps?(sphere) ⇒ Boolean
Return true
if this sphere overlaps with another sphere.
75 |
# File 'rdoc-sources/FXSphered.rb', line 75 def overlaps?(box); end |