FX::FXSphered Class Reference

#include <FXSphered.h>

List of all members.


Detailed Description

Spherical bounds.

Public Member Functions

 FXSphered ()
 FXSphered (const FXSphered &sphere)
 FXSphered (const FXVec3d &cen, FXdouble rad=0.0)
 FXSphered (FXdouble x, FXdouble y, FXdouble z, FXdouble rad=0.0)
 FXSphered (const FXRanged &bounds)
FXSpheredoperator= (const FXSphered &sphere)
FXSpheredset (const FXSphered &sphere)
FXSpheredset (const FXVec3d &cen, FXdouble rad)
FXSpheredset (FXdouble x, FXdouble y, FXdouble z, FXdouble rad)
bool operator== (const FXSphered &s) const
bool operator!= (const FXSphered &s) const
FXdouble diameter () const
bool empty () const
bool contains (FXdouble x, FXdouble y, FXdouble z) const
bool contains (const FXVec3d &p) const
bool contains (const FXRanged &box) const
bool contains (const FXSphered &sphere) const
FXSpheredinclude (FXdouble x, FXdouble y, FXdouble z)
FXSpheredinclude (const FXVec3d &p)
FXSpheredincludeInRadius (FXdouble x, FXdouble y, FXdouble z)
FXSpheredincludeInRadius (const FXVec3d &p)
FXSpheredinclude (const FXRanged &box)
FXSpheredincludeInRadius (const FXRanged &box)
FXSpheredinclude (const FXSphered &sphere)
FXSpheredincludeInRadius (const FXSphered &sphere)
FXint intersect (const FXVec4d &plane) const
bool intersect (const FXVec3d &u, const FXVec3d &v) const

Public Attributes

FXVec3d center
FXdouble radius

Friends

FXAPI bool overlap (const FXRanged &a, const FXSphered &b)
FXAPI bool overlap (const FXSphered &a, const FXRanged &b)
FXAPI bool overlap (const FXSphered &a, const FXSphered &b)
FXAPI FXStreamoperator<< (FXStream &store, const FXSphered &sphere)
FXAPI FXStreamoperator>> (FXStream &store, FXSphered &sphere)

Constructor & Destructor Documentation

FX::FXSphered::FXSphered (  )  [inline]

Default constructor.

FX::FXSphered::FXSphered ( const FXSphered sphere  )  [inline]

Copy constructor.

FX::FXSphered::FXSphered ( const FXVec3d cen,
FXdouble  rad = 0.0 
) [inline]

Initialize from center and radius.

FX::FXSphered::FXSphered ( FXdouble  x,
FXdouble  y,
FXdouble  z,
FXdouble  rad = 0.0 
) [inline]

Initialize from center and radius.

FX::FXSphered::FXSphered ( const FXRanged bounds  ) 

Initialize sphere to fully contain the given bounding box.


Member Function Documentation

FXSphered& FX::FXSphered::operator= ( const FXSphered sphere  )  [inline]

Assignment.

References center, and radius.

FXSphered& FX::FXSphered::set ( const FXSphered sphere  )  [inline]

Set value from another sphere.

FXSphered& FX::FXSphered::set ( const FXVec3d cen,
FXdouble  rad 
) [inline]

Set value from center and radius.

FXSphered& FX::FXSphered::set ( FXdouble  x,
FXdouble  y,
FXdouble  z,
FXdouble  rad 
) [inline]

Set value from center and radius.

bool FX::FXSphered::operator== ( const FXSphered s  )  const [inline]

Comparison.

References center, and radius.

FXdouble FX::FXSphered::diameter (  )  const [inline]

Diameter of sphere.

bool FX::FXSphered::empty (  )  const [inline]

Test if empty.

bool FX::FXSphered::contains ( FXdouble  x,
FXdouble  y,
FXdouble  z 
) const

Test if sphere contains point x,y,z.

bool FX::FXSphered::contains ( const FXVec3d p  )  const

Test if sphere contains point p.

bool FX::FXSphered::contains ( const FXRanged box  )  const

Test if sphere contains another box.

bool FX::FXSphered::contains ( const FXSphered sphere  )  const

Test if sphere contains another sphere.

FXSphered& FX::FXSphered::include ( FXdouble  x,
FXdouble  y,
FXdouble  z 
)

Include point.

FXSphered& FX::FXSphered::include ( const FXVec3d p  ) 

Include point.

FXSphered& FX::FXSphered::includeInRadius ( FXdouble  x,
FXdouble  y,
FXdouble  z 
)

Expand radius to include point.

FXSphered& FX::FXSphered::includeInRadius ( const FXVec3d p  ) 

Expand radius to include point.

FXSphered& FX::FXSphered::include ( const FXRanged box  ) 

Include given range into this one.

FXSphered& FX::FXSphered::includeInRadius ( const FXRanged box  ) 

Expand radius to include box.

FXSphered& FX::FXSphered::include ( const FXSphered sphere  ) 

Include given sphere into this one.

FXSphered& FX::FXSphered::includeInRadius ( const FXSphered sphere  ) 

Expand radius to include sphere.

FXint FX::FXSphered::intersect ( const FXVec4d plane  )  const

Intersect sphere with normalized plane ax+by+cz+w; returns -1,0,+1.

bool FX::FXSphered::intersect ( const FXVec3d u,
const FXVec3d v 
) const

Intersect sphere with ray u-v.


Friends And Related Function Documentation

FXAPI bool overlap ( const FXRanged a,
const FXSphered b 
) [friend]

Test if box overlaps with sphere.

FXAPI bool overlap ( const FXSphered a,
const FXRanged b 
) [friend]

Test if sphere overlaps with box.

FXAPI bool overlap ( const FXSphered a,
const FXSphered b 
) [friend]

Test if spheres overlap.

FXAPI FXStream& operator<< ( FXStream store,
const FXSphered sphere 
) [friend]

Save object to a stream.

FXAPI FXStream& operator>> ( FXStream store,
FXSphered sphere 
) [friend]

Load object from a stream.


The documentation for this class was generated from the following file:

(C) 2002-2008 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Jun 13 22:16:17 2008 for TnFOX by doxygen v1.5.6