llbboxlocal.cpp

Go to the documentation of this file.
00001 
00032 #include "linden_common.h"
00033 
00034 #include "llbboxlocal.h"
00035 #include "m4math.h"
00036 
00037 void LLBBoxLocal::addPoint(const LLVector3& p)
00038 {
00039         mMin.mV[VX] = llmin( p.mV[VX], mMin.mV[VX] );
00040         mMin.mV[VY] = llmin( p.mV[VY], mMin.mV[VY] );
00041         mMin.mV[VZ] = llmin( p.mV[VZ], mMin.mV[VZ] );
00042         mMax.mV[VX] = llmax( p.mV[VX], mMax.mV[VX] );
00043         mMax.mV[VY] = llmax( p.mV[VY], mMax.mV[VY] );
00044         mMax.mV[VZ] = llmax( p.mV[VZ], mMax.mV[VZ] );
00045 }
00046 
00047 void LLBBoxLocal::expand( F32 delta )
00048 {
00049         mMin.mV[VX] -= delta;
00050         mMin.mV[VY] -= delta;
00051         mMin.mV[VZ] -= delta;
00052         mMax.mV[VX] += delta;
00053         mMax.mV[VY] += delta;
00054         mMax.mV[VZ] += delta;
00055 }
00056 
00057 LLBBoxLocal operator*(const LLBBoxLocal &a, const LLMatrix4 &b)
00058 {
00059         return LLBBoxLocal( a.mMin * b, a.mMax * b );
00060 }

Generated on Thu Jul 1 06:08:19 2010 for Second Life Viewer by  doxygen 1.4.7