Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXSpheref Class Reference

Spherical bounds. More...

#include <FXSpheref.h>

List of all members.

Public Member Functions

 FXSpheref ()
 FXSpheref (const FXSpheref &sphere)
 FXSpheref (const FXVec3f &cen, FXfloat rad=0.0f)
 FXSpheref (FXfloat x, FXfloat y, FXfloat z, FXfloat rad=0.0f)
 FXSpheref (const FXRangef &bounds)
FXSpherefoperator= (const FXSpheref &sphere)
FXSpherefset (const FXSpheref &sphere)
FXSpherefset (const FXVec3f &cen, FXfloat rad=0.0f)
FXSpherefset (FXfloat x, FXfloat y, FXfloat z, FXfloat rad=0.0f)
FXbool operator== (const FXSpheref &s) const
FXbool operator!= (const FXSpheref &s) const
FXfloat diameter () const
FXbool empty () const
FXbool contains (FXfloat x, FXfloat y, FXfloat z) const
FXbool contains (const FXVec3f &p) const
FXbool contains (const FXRangef &box) const
FXbool contains (const FXSpheref &sphere) const
FXSpherefinclude (FXfloat x, FXfloat y, FXfloat z)
FXSpherefinclude (const FXVec3f &p)
FXSpherefincludeInRadius (FXfloat x, FXfloat y, FXfloat z)
FXSpherefincludeInRadius (const FXVec3f &p)
FXSpherefinclude (const FXRangef &box)
FXSpherefincludeInRadius (const FXRangef &box)
FXSpherefinclude (const FXSpheref &sphere)
FXSpherefincludeInRadius (const FXSpheref &sphere)
FXint intersect (const FXVec4f &plane) const
FXbool intersect (const FXVec3f &u, const FXVec3f &v) const
FXSpheref transform (const FXMat4f &mat) const

Public Attributes

FXVec3f center
FXfloat radius

Friends

FXbool overlap (const FXRangef &a, const FXSpheref &b)
FXbool overlap (const FXSpheref &a, const FXRangef &b)
FXbool overlap (const FXSpheref &a, const FXSpheref &b)
FXStreamoperator<< (FXStream &store, const FXSpheref &sphere)
FXStreamoperator>> (FXStream &store, FXSpheref &sphere)


Detailed Description

Spherical bounds.

Constructor & Destructor Documentation

FX::FXSpheref::FXSpheref (  )  [inline]

Default constructor; value is not initialized.

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

Copy constructor.

FX::FXSpheref::FXSpheref ( const FXVec3f cen,
FXfloat  rad = 0.0f 
) [inline]

Initialize from center and radius.

FX::FXSpheref::FXSpheref ( FXfloat  x,
FXfloat  y,
FXfloat  z,
FXfloat  rad = 0.0f 
) [inline]

Initialize from center and radius.

FX::FXSpheref::FXSpheref ( const FXRangef bounds  ) 

Initialize sphere to fully contain the given bounding box.


Member Function Documentation

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

Assignment.

References center, and radius.

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

Set value from another sphere.

FXSpheref& FX::FXSpheref::set ( const FXVec3f cen,
FXfloat  rad = 0.0f 
) [inline]

Set value from center and radius.

FXSpheref& FX::FXSpheref::set ( FXfloat  x,
FXfloat  y,
FXfloat  z,
FXfloat  rad = 0.0f 
) [inline]

Set value from center and radius.

FXbool FX::FXSpheref::operator== ( const FXSpheref s  )  const [inline]

Comparison.

References center, and radius.

FXbool FX::FXSpheref::operator!= ( const FXSpheref s  )  const [inline]

References center, and radius.

FXfloat FX::FXSpheref::diameter (  )  const [inline]

Diameter of sphere.

FXbool FX::FXSpheref::empty (  )  const [inline]

Test if empty.

FXbool FX::FXSpheref::contains ( FXfloat  x,
FXfloat  y,
FXfloat  z 
) const

Test if sphere contains point x,y,z.

FXbool FX::FXSpheref::contains ( const FXVec3f p  )  const

Test if sphere contains point p.

FXbool FX::FXSpheref::contains ( const FXRangef box  )  const

Test if sphere properly contains another box.

FXbool FX::FXSpheref::contains ( const FXSpheref sphere  )  const

Test if sphere properly contains another sphere.

FXSpheref& FX::FXSpheref::include ( FXfloat  x,
FXfloat  y,
FXfloat  z 
)

Include point.

FXSpheref& FX::FXSpheref::include ( const FXVec3f p  ) 

Include point.

FXSpheref& FX::FXSpheref::includeInRadius ( FXfloat  x,
FXfloat  y,
FXfloat  z 
)

Expand radius to include point.

FXSpheref& FX::FXSpheref::includeInRadius ( const FXVec3f p  ) 

Expand radius to include point.

FXSpheref& FX::FXSpheref::include ( const FXRangef box  ) 

Include given range into this one.

FXSpheref& FX::FXSpheref::includeInRadius ( const FXRangef box  ) 

Expand radius to include box.

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

Include given sphere into this one.

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

Expand radius to include sphere.

FXint FX::FXSpheref::intersect ( const FXVec4f plane  )  const

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

FXbool FX::FXSpheref::intersect ( const FXVec3f u,
const FXVec3f v 
) const

Intersect sphere with ray u-v.

FXSpheref FX::FXSpheref::transform ( const FXMat4f mat  )  const

Transform sphere by 4x4 matrix.


Friends And Related Function Documentation

FXbool overlap ( const FXRangef a,
const FXSpheref b 
) [friend]

Test if box overlaps with sphere.

FXbool overlap ( const FXSpheref a,
const FXRangef b 
) [friend]

Test if sphere overlaps with box.

FXbool overlap ( const FXSpheref a,
const FXSpheref b 
) [friend]

Test if spheres overlap.

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

Save object to a stream.

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

Load object from a stream.


Member Data Documentation

Copyright © 1997-2009 Jeroen van der Zijp