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

FX::FXExtentf Class Reference

Extent. More...

#include <FXExtentf.h>

Public Member Functions

 FXExtentf ()
 Default constructor; value is not initialized.
 
 FXExtentf (const FXExtentf &ext)
 Copy constructor.
 
 FXExtentf (const FXVec2f &p)
 Initialize with a single point.
 
 FXExtentf (const FXVec2f &lo, const FXVec2f &hi)
 Initialize from corner points.
 
 FXExtentf (FXfloat x, FXfloat y)
 Initialize with a single point.
 
 FXExtentf (FXfloat xl, FXfloat xh, FXfloat yl, FXfloat yh)
 Initialize with explicit values.
 
FXExtentfoperator= (const FXExtentf &ext)
 Assignment.
 
FXExtentfset (const FXExtentf &ext)
 Set value from another range.
 
FXExtentfset (const FXVec2f &p)
 Set value from single point.
 
FXExtentfset (const FXVec2f &lo, const FXVec2f &hi)
 Set value from corner points.
 
FXExtentfset (FXfloat x, FXfloat y)
 Set value from single point.
 
FXExtentfset (FXfloat xl, FXfloat xh, FXfloat yl, FXfloat yh)
 Set value from explicit values.
 
FXVec2foperator[] (FXint i)
 Indexing with 0..1.
 
const FXVec2foperator[] (FXint i) const
 Indexing with 0..1.
 
FXbool operator== (const FXExtentf &ext) const
 Comparison.
 
FXbool operator!= (const FXExtentf &ext) const
 
FXfloat width () const
 Width of box.
 
FXfloat height () const
 Height of box.
 
FXfloat area () const
 Area.
 
FXfloat longest () const
 Longest side.
 
FXfloat shortest () const
 Shortest side.
 
FXfloat diameter () const
 Length of diagonal.
 
FXfloat radius () const
 Get radius of box.
 
FXVec2f diagonal () const
 Compute diagonal.
 
FXVec2f center () const
 Get center of box.
 
FXbool empty () const
 Test if empty.
 
FXbool contains (FXfloat x, FXfloat y) const
 Test if box contains point x,y.
 
FXbool contains (const FXVec2f &p) const
 Test if box contains point p.
 
FXbool contains (const FXExtentf &ext) const
 Test if box properly contains another box.
 
FXExtentfinclude (FXfloat x, FXfloat y)
 Include point.
 
FXExtentfinclude (const FXVec2f &v)
 Include point.
 
FXExtentfinclude (const FXExtentf &ext)
 Include given range into extent.
 
FXbool intersect (const FXVec2f &u, const FXVec2f &v) const
 Intersect box with ray u-v.
 
FXbool intersect (const FXVec2f &pos, const FXVec2f &dir, FXfloat hit[]) const
 Intersect box with ray pos+lambda*dir, returning true if hit.
 
FXVec2f corner (FXint c) const
 Get corner number 0..3.
 
 ~FXExtentf ()
 Destructor.
 

Public Attributes

FXVec2f lower
 
FXVec2f upper
 

Detailed Description

Extent.


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

Copyright © 1997-2022 Jeroen van der Zijp