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

FX::FXRangef Class Reference

Bounds. More...

#include <FXRangef.h>

List of all members.

Public Member Functions

 FXRangef ()
 FXRangef (const FXRangef &bounds)
 FXRangef (const FXVec3f &p)
 FXRangef (const FXVec3f &l, const FXVec3f &h)
 FXRangef (FXfloat x, FXfloat y, FXfloat z)
 FXRangef (FXfloat xl, FXfloat xh, FXfloat yl, FXfloat yh, FXfloat zl, FXfloat zh)
 FXRangef (const FXSpheref &sphere)
FXRangefoperator= (const FXRangef &bounds)
FXRangefset (const FXRangef &bounds)
FXRangefset (const FXVec3f &p)
FXRangefset (const FXVec3f &l, const FXVec3f &h)
FXRangefset (FXfloat x, FXfloat y, FXfloat z)
FXRangefset (FXfloat xl, FXfloat xh, FXfloat yl, FXfloat yh, FXfloat zl, FXfloat zh)
FXVec3foperator[] (FXint i)
const FXVec3foperator[] (FXint i) const
FXbool operator== (const FXRangef &r) const
FXbool operator!= (const FXRangef &r) const
FXfloat width () const
FXfloat height () const
FXfloat depth () const
FXfloat longest () const
FXfloat shortest () const
FXfloat diameter () const
FXfloat radius () const
FXVec3f diagonal () const
FXVec3f center () const
FXbool empty () const
FXbool contains (FXfloat x, FXfloat y, FXfloat z) const
FXbool contains (const FXVec3f &p) const
FXbool contains (const FXRangef &bounds) const
FXbool contains (const FXSpheref &sphere) const
FXRangefinclude (FXfloat x, FXfloat y, FXfloat z)
FXRangefinclude (const FXVec3f &v)
FXRangefinclude (const FXRangef &box)
FXRangefinclude (const FXSpheref &sphere)
FXint intersect (const FXVec4f &plane) const
FXbool intersect (const FXVec3f &u, const FXVec3f &v)
FXVec3f corner (FXint c) const
FXRangef transform (const FXMat4f &mat) const

Public Attributes

FXVec3f lower
FXVec3f upper

Friends

FXbool overlap (const FXRangef &a, const FXRangef &b)
FXRangef unite (const FXRangef &a, const FXRangef &b)
FXRangef intersect (const FXRangef &a, const FXRangef &b)
FXStreamoperator<< (FXStream &store, const FXRangef &bounds)
FXStreamoperator>> (FXStream &store, FXRangef &bounds)


Detailed Description

Bounds.

Constructor & Destructor Documentation

FX::FXRangef::FXRangef (  )  [inline]

Default constructor; value is not initialized.

FX::FXRangef::FXRangef ( const FXRangef bounds  )  [inline]

Initialize with another range.

FX::FXRangef::FXRangef ( const FXVec3f p  )  [inline]

Initialize with a single point.

FX::FXRangef::FXRangef ( const FXVec3f l,
const FXVec3f h 
) [inline]

Initialize with corner points.

FX::FXRangef::FXRangef ( FXfloat  x,
FXfloat  y,
FXfloat  z 
) [inline]

Initialize with a single point.

FX::FXRangef::FXRangef ( FXfloat  xl,
FXfloat  xh,
FXfloat  yl,
FXfloat  yh,
FXfloat  zl,
FXfloat  zh 
) [inline]

Initialize with explicit values.

FX::FXRangef::FXRangef ( const FXSpheref sphere  ) 

Initialize box to fully contain the given bounding sphere.


Member Function Documentation

FXRangef& FX::FXRangef::operator= ( const FXRangef bounds  )  [inline]

Assignment.

References lower, and upper.

FXRangef& FX::FXRangef::set ( const FXRangef bounds  )  [inline]

Set value from another range.

FXRangef& FX::FXRangef::set ( const FXVec3f p  )  [inline]

Set value from single point.

FXRangef& FX::FXRangef::set ( const FXVec3f l,
const FXVec3f h 
) [inline]

Set value from corner points.

FXRangef& FX::FXRangef::set ( FXfloat  x,
FXfloat  y,
FXfloat  z 
) [inline]

Set value from single point.

References FX::FXVec3f::x.

FXRangef& FX::FXRangef::set ( FXfloat  xl,
FXfloat  xh,
FXfloat  yl,
FXfloat  yh,
FXfloat  zl,
FXfloat  zh 
) [inline]

Set value from explicit values.

FXVec3f& FX::FXRangef::operator[] ( FXint  i  )  [inline]

Indexing with 0..1.

const FXVec3f& FX::FXRangef::operator[] ( FXint  i  )  const [inline]

Indexing with 0..1.

FXbool FX::FXRangef::operator== ( const FXRangef r  )  const [inline]

Comparison.

References lower, and upper.

FXbool FX::FXRangef::operator!= ( const FXRangef r  )  const [inline]

References lower, and upper.

FXfloat FX::FXRangef::width (  )  const [inline]

Width of box.

FXfloat FX::FXRangef::height (  )  const [inline]

Height of box.

FXfloat FX::FXRangef::depth (  )  const [inline]

Depth of box.

FXfloat FX::FXRangef::longest (  )  const

Longest side.

FXfloat FX::FXRangef::shortest (  )  const

shortest side

FXfloat FX::FXRangef::diameter (  )  const

Length of diagonal.

FXfloat FX::FXRangef::radius (  )  const

Get radius of box.

FXVec3f FX::FXRangef::diagonal (  )  const

Compute diagonal.

FXVec3f FX::FXRangef::center (  )  const

Get center of box.

FXbool FX::FXRangef::empty (  )  const

Test if empty.

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

Test if box contains point x,y,z.

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

Test if box contains point p.

FXbool FX::FXRangef::contains ( const FXRangef bounds  )  const

Test if box properly contains another box.

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

Test if box properly contains sphere.

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

Include point.

FXRangef& FX::FXRangef::include ( const FXVec3f v  ) 

Include point.

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

Include given range into box.

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

Include given sphere into this box.

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

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

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

Intersect box with ray u-v.

FXVec3f FX::FXRangef::corner ( FXint  c  )  const [inline]

Get corner number 0..7.

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

Transform range by 4x4 matrix.


Friends And Related Function Documentation

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

Test if boxes a and b overlap.

FXRangef unite ( const FXRangef a,
const FXRangef b 
) [friend]

Union of two boxes.

FXRangef intersect ( const FXRangef a,
const FXRangef b 
) [friend]

Intersection of two boxes.

FXStream& operator<< ( FXStream store,
const FXRangef bounds 
) [friend]

Save object to a stream.

FXStream& operator>> ( FXStream store,
FXRangef bounds 
) [friend]

Load object from a stream.


Member Data Documentation

Copyright © 1997-2009 Jeroen van der Zijp