Ignore:
Timestamp:
09/25/06 18:54:21 (18 years ago)
Author:
mattausch
Message:

worked on guided visibility sampling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/AxisAlignedBox3.h

    r1415 r1486  
    3535  /** initialization to the non existing bounding box 
    3636  */ 
    37   void Initialize() { 
    38     mMin = Vector3(MAXFLOAT); 
    39     mMax = Vector3(-MAXFLOAT); 
    40   } 
     37  void Initialize(); 
    4138 
    4239  /** The center of the box 
    4340  */ 
    44   Vector3 Center() const { return 0.5 * (mMin + mMax); } 
     41  Vector3 Center() const; 
    4542   
    4643  /** The diagonal of the box 
    4744  */ 
    48   Vector3 Diagonal() const { return (mMax -mMin); } 
    49  
    50   float Center(const int axis) const { 
    51     return  0.5f * (mMin[axis] + mMax[axis]); 
    52   } 
    53  
    54   float Min(const int axis) const { 
    55     return mMin[axis]; 
    56   } 
    57  
    58   float Max(const int axis) const { 
    59     return  mMax[axis]; 
    60   } 
    61  
    62   float Size(const int axis) const { 
    63     return  Max(axis) - Min(axis); 
    64   } 
     45  Vector3 Diagonal() const; 
     46 
     47  float Center(const int axis) const; 
     48 
     49  float Min(const int axis) const; 
     50 
     51  float Max(const int axis) const; 
     52 
     53  float Size(const int axis) const; 
    6554 
    6655  // Read-only const access tomMin and max vectors using references 
    67   const Vector3& Min() const { return mMin;} 
    68   const Vector3& Max() const { return mMax;} 
    69  
    70   void Enlarge (const Vector3 &v) { 
    71     mMax += v; 
    72     mMin -= v; 
    73   } 
    74  
    75   void SetMin(const Vector3 &v) { 
    76     mMin = v; 
    77   } 
    78  
    79   void SetMax(const Vector3 &v) { 
    80     mMax = v; 
    81   } 
    82  
    83   void SetMin(int axis, const float value) { 
    84    mMin[axis] = value; 
    85   } 
    86  
    87   void SetMax(int axis, const float value) { 
    88     mMax[axis] = value; 
    89   } 
     56  const Vector3& Min() const; 
     57  const Vector3& Max() const; 
     58 
     59  void Enlarge (const Vector3 &v); 
     60 
     61  void SetMin(const Vector3 &v); 
     62 
     63  void SetMax(const Vector3 &v); 
     64 
     65  void SetMin(int axis, const float value); 
     66 
     67  void SetMax(int axis, const float value); 
    9068 
    9169  // Decrease box by given splitting plane 
    92   void Reduce(int axis, int right, float value) { 
    93     if ( (value >=mMin[axis]) && (value <= mMax[axis]) ) 
    94       if (right) 
    95                 mMin[axis] = value; 
    96       else 
    97         mMax[axis] = value; 
    98   } 
    99  
     70  void Reduce(int axis, int right, float value);  
    10071   
    10172 
    10273  // the size of the box along all the axes 
    103   Vector3 Size() const { return mMax - mMin; } 
     74  Vector3 Size() const; 
    10475 
    10576  // Return whether the box is unbounded.  Unbounded boxes appear 
Note: See TracChangeset for help on using the changeset viewer.