1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +00:00

Obliterate hsBool

This commit is contained in:
2012-07-11 01:28:00 -04:00
parent 5f78b33db4
commit a709e17069
1041 changed files with 7889 additions and 8070 deletions

View File

@ -206,7 +206,7 @@ uint32_t plClosest::PointsOnLines(const hsPoint3& p0, const hsVector3& v0,
return retVal;;
}
hsBool plClosest::PointOnSphere(const hsPoint3& p0,
bool plClosest::PointOnSphere(const hsPoint3& p0,
const hsPoint3& center, float rad,
hsPoint3& cp)
{
@ -219,7 +219,7 @@ hsBool plClosest::PointOnSphere(const hsPoint3& p0,
return dist <= 1.f;
}
hsBool plClosest::PointOnBox(const hsPoint3& p0,
bool plClosest::PointOnBox(const hsPoint3& p0,
const hsPoint3& corner,
const hsVector3& axis0,
const hsVector3& axis1,
@ -237,7 +237,7 @@ hsBool plClosest::PointOnBox(const hsPoint3& p0,
return !clamps;
}
hsBool plClosest::PointOnSphere(const hsPoint3& p0, const hsVector3& v0,
bool plClosest::PointOnSphere(const hsPoint3& p0, const hsVector3& v0,
const hsPoint3& center, float rad,
hsPoint3& cp,
uint32_t clamp)
@ -321,7 +321,7 @@ hsBool plClosest::PointOnSphere(const hsPoint3& p0, const hsVector3& v0,
return false;
}
hsBool plClosest::PointOnBox(const hsPoint3& p0, const hsVector3& v0,
bool plClosest::PointOnBox(const hsPoint3& p0, const hsVector3& v0,
const hsPoint3& corner,
const hsVector3& axis0,
const hsVector3& axis1,
@ -346,7 +346,7 @@ hsBool plClosest::PointOnBox(const hsPoint3& p0, const hsVector3& v0,
return !clampRes;
}
hsBool plClosest::PointOnPlane(const hsPoint3& p0,
bool plClosest::PointOnPlane(const hsPoint3& p0,
const hsPoint3& pPln, const hsVector3& n,
hsPoint3& cp)
{
@ -362,7 +362,7 @@ hsBool plClosest::PointOnPlane(const hsPoint3& p0,
return nDotp >= 0;
}
hsBool plClosest::PointOnPlane(const hsPoint3& p0, const hsVector3& v0,
bool plClosest::PointOnPlane(const hsPoint3& p0, const hsVector3& v0,
const hsPoint3& pPln, const hsVector3& n,
hsPoint3& cp,
uint32_t clamp)
@ -377,7 +377,7 @@ hsBool plClosest::PointOnPlane(const hsPoint3& p0, const hsVector3& v0,
Then clamp appropriately, garnish, and serve with wild rice.
*/
hsBool retVal = true;
bool retVal = true;
float pDotn = n.InnerProduct(pPln - p0);
float v0Dotn = n.InnerProduct(v0);
if( (v0Dotn < -kRealSmall) || (v0Dotn > kRealSmall) )
@ -407,7 +407,7 @@ hsBool plClosest::PointOnPlane(const hsPoint3& p0, const hsVector3& v0,
return retVal;
}
hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner,
bool plClosest::PointBetweenBoxes(const hsPoint3& aCorner,
const hsVector3& aAxis0,
const hsVector3& aAxis1,
const hsVector3& aAxis2,
@ -424,7 +424,7 @@ hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner,
}
#if 0 // TRASH THIS
hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner,
bool plClosest::PointBetweenBoxes(const hsPoint3& aCorner,
const hsVector3* aAxes[3],
const hsPoint3& bCorner,
const hsVector3* bAxes[3],
@ -436,7 +436,7 @@ hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner,
hsPoint3 bStartPt[3];
bStartPt[0] = bStartPt[1] = bStartPt[2] = bCorner;
hsBool retVal = true;
bool retVal = true;
int i, j;
for( i = 0; i < 3; i++ )
{
@ -481,7 +481,7 @@ hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner,
}
#elif 0 // TRASH THIS
hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner,
bool plClosest::PointBetweenBoxes(const hsPoint3& aCorner,
const hsVector3* aAxes[3],
const hsPoint3& bCorner,
const hsVector3* bAxes[3],
@ -503,7 +503,7 @@ hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner,
hsPoint3 aBestPt, bBestPt;
float minDistSq = 1.e33f;
hsBool retVal = false;
bool retVal = false;
int i;
for( i = 0; i < 6; i++ )
@ -567,7 +567,7 @@ hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner,
#else // TRASH THIS
hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner,
bool plClosest::PointBetweenBoxes(const hsPoint3& aCorner,
const hsVector3* aAxes[3],
const hsPoint3& bCorner,
const hsVector3* bAxes[3],
@ -649,7 +649,7 @@ hsBool plClosest::PointBetweenBoxes(const hsPoint3& aCorner,
hsPoint3 aBestPt, bBestPt;
float minDistSq = 1.e33f;
hsBool retVal = false;
bool retVal = false;
int i;
for( i = 0; i < 36; i++ )

View File

@ -78,12 +78,12 @@ enum plClosestClampFlags
uint32_t clamp); // Clamp on ends
// Return true if p0 is inside or on sphere.
static hsBool PointOnSphere(const hsPoint3& p0, // Point
static bool PointOnSphere(const hsPoint3& p0, // Point
const hsPoint3& center, float rad, // Sphere
hsPoint3& cp); // Output closest on sphere to p0
// Return true if p0 is inside box.
static hsBool PointOnBox(const hsPoint3& p0, // Point
static bool PointOnBox(const hsPoint3& p0, // Point
const hsPoint3& corner, // Box defined by corner point and 3 (presumably but
const hsVector3& axis0, // not required) ortho axes.
const hsVector3& axis1,
@ -91,13 +91,13 @@ enum plClosestClampFlags
hsPoint3& cp);
// Return true if line intersects or is inside sphere.
static hsBool PointOnSphere(const hsPoint3& p0, const hsVector3& v0, // Line
static bool PointOnSphere(const hsPoint3& p0, const hsVector3& v0, // Line
const hsPoint3& center, float rad, // Sphere
hsPoint3& cp, // Output closest on sphere to p0, or entry point if line hits sphere
uint32_t clamp);
// Return true if line intersects or is inside box.
static hsBool PointOnBox(const hsPoint3& p0, const hsVector3& v0, // Line
static bool PointOnBox(const hsPoint3& p0, const hsVector3& v0, // Line
const hsPoint3& corner, // Box defined by corner point and 3 (presumably but
const hsVector3& axis0, // not required) ortho axes.
const hsVector3& axis1,
@ -106,19 +106,19 @@ enum plClosestClampFlags
uint32_t clamp);
// Return true if point inside (negative side) of plane
static hsBool PointOnPlane(const hsPoint3& p0,
static bool PointOnPlane(const hsPoint3& p0,
const hsPoint3& pPln, const hsVector3& n,
hsPoint3& cp);
// Return true if line passes through plane.
static hsBool PointOnPlane(const hsPoint3& p0, const hsVector3& v0,
static bool PointOnPlane(const hsPoint3& p0, const hsVector3& v0,
const hsPoint3& pPln, const hsVector3& n,
hsPoint3& cp,
uint32_t clamp);
// Two identical functions, just different wrapping. First version repacks
// parameters and calls second.
static hsBool PointBetweenBoxes(const hsPoint3& aCorner,
static bool PointBetweenBoxes(const hsPoint3& aCorner,
const hsVector3& aAxis0,
const hsVector3& aAxis1,
const hsVector3& aAxis2,
@ -128,7 +128,7 @@ enum plClosestClampFlags
const hsVector3& bAxis2,
hsPoint3& cp0, hsPoint3& cp1);
static hsBool PointBetweenBoxes(const hsPoint3& aCorner,
static bool PointBetweenBoxes(const hsPoint3& aCorner,
const hsVector3* aAxes[3],
const hsPoint3& bCorner,
const hsVector3* bAxes[3],

View File

@ -84,7 +84,7 @@ void plHardRegion::Write(hsStream* s, hsResMgr* mgr)
plRegionBase::Write(s, mgr);
}
hsBool plHardRegion::CameraInside() const
bool plHardRegion::CameraInside() const
{
if( fState & kDirty )
{
@ -97,7 +97,7 @@ hsBool plHardRegion::CameraInside() const
return 0 != (fState & kCamInside);
}
hsBool plHardRegion::MsgReceive(plMessage* msg)
bool plHardRegion::MsgReceive(plMessage* msg)
{
plRenderMsg* rend = plRenderMsg::ConvertNoRef(msg);
if( rend )

View File

@ -76,21 +76,21 @@ public:
CLASSNAME_REGISTER( plHardRegion );
GETINTERFACE_ANY( plHardRegion, plRegionBase );
virtual hsBool IsInside(const hsPoint3& pos) const { return IIsInside(pos); }
virtual hsBool CameraInside() const;
virtual bool IsInside(const hsPoint3& pos) const { return IIsInside(pos); }
virtual bool CameraInside() const;
virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l) = 0;
virtual int32_t GetNumProperties() const { return 1; } // This is stupid.
virtual hsBool MsgReceive(plMessage* msg);
virtual bool MsgReceive(plMessage* msg);
virtual void Read(hsStream* stream, hsResMgr* mgr);
virtual void Write(hsStream* stream, hsResMgr* mgr);
virtual hsBool IIsInside(const hsPoint3& pos) const = 0;
virtual hsBool ICameraInside() const = 0;
virtual bool IIsInside(const hsPoint3& pos) const = 0;
virtual bool ICameraInside() const = 0;
};
#endif // plHardRegion_inc

View File

@ -57,7 +57,7 @@ plHardRegionPlanes::~plHardRegionPlanes()
{
}
hsBool plHardRegionPlanes::IIsInside(const hsPoint3& pos) const
bool plHardRegionPlanes::IIsInside(const hsPoint3& pos) const
{
int i;
for( i = 0; i < fPlanes.GetCount(); i++ )
@ -68,7 +68,7 @@ hsBool plHardRegionPlanes::IIsInside(const hsPoint3& pos) const
return true;
}
hsBool plHardRegionPlanes::ICameraInside() const
bool plHardRegionPlanes::ICameraInside() const
{
return IIsInside(fCamPos);
}

View File

@ -79,8 +79,8 @@ public:
void GetPlane(int i, hsVector3& n, hsPoint3& p) const { n = fPlanes[i].fNorm; p = fPlanes[i].fPos; }
void GetWorldPlane(int i, hsVector3& n, hsPoint3& p) const { n = fPlanes[i].fWorldNorm; p = fPlanes[i].fWorldPos; }
virtual hsBool IIsInside(const hsPoint3& pos) const;
virtual hsBool ICameraInside() const;
virtual bool IIsInside(const hsPoint3& pos) const;
virtual bool ICameraInside() const;
};

View File

@ -78,7 +78,7 @@ void plHardRegionComplex::Write(hsStream* s, hsResMgr* mgr)
mgr->WriteKey(s, fSubRegions[i]);
}
hsBool plHardRegionComplex::MsgReceive(plMessage* msg)
bool plHardRegionComplex::MsgReceive(plMessage* msg)
{
plGenRefMsg* refMsg = plGenRefMsg::ConvertNoRef(msg);
if( refMsg )
@ -116,7 +116,7 @@ plHardRegionUnion::~plHardRegionUnion()
{
}
hsBool plHardRegionUnion::IIsInside(const hsPoint3& pos) const
bool plHardRegionUnion::IIsInside(const hsPoint3& pos) const
{
int i;
for( i = 0; i < fSubRegions.GetCount(); i++ )
@ -127,7 +127,7 @@ hsBool plHardRegionUnion::IIsInside(const hsPoint3& pos) const
return false;
}
hsBool plHardRegionUnion::ICameraInside() const
bool plHardRegionUnion::ICameraInside() const
{
if( fState & kDirty )
{
@ -155,7 +155,7 @@ plHardRegionIntersect::~plHardRegionIntersect()
{
}
hsBool plHardRegionIntersect::IIsInside(const hsPoint3& pos) const
bool plHardRegionIntersect::IIsInside(const hsPoint3& pos) const
{
int i;
for( i = 0; i < fSubRegions.GetCount(); i++ )
@ -166,7 +166,7 @@ hsBool plHardRegionIntersect::IIsInside(const hsPoint3& pos) const
return true;
}
hsBool plHardRegionIntersect::ICameraInside() const
bool plHardRegionIntersect::ICameraInside() const
{
if( fState & kDirty )
{
@ -197,13 +197,13 @@ plHardRegionInvert::~plHardRegionInvert()
{
}
hsBool plHardRegionInvert::IIsInside(const hsPoint3& pos) const
bool plHardRegionInvert::IIsInside(const hsPoint3& pos) const
{
hsAssert(fSubRegions.GetCount() <= 1, "Too many subRegions on inverter");
return !fSubRegions[0]->IIsInside(pos);
}
hsBool plHardRegionInvert::ICameraInside() const
bool plHardRegionInvert::ICameraInside() const
{
hsAssert(fSubRegions.GetCount() <= 1, "Too many subRegions on inverter");
return !fSubRegions[0]->ICameraInside();

View File

@ -65,7 +65,7 @@ public:
virtual void Write(hsStream* stream, hsResMgr* mgr);
// Now Complex specifics
virtual hsBool MsgReceive(plMessage* msg);
virtual bool MsgReceive(plMessage* msg);
uint16_t GetNumSubs() const { return fSubRegions.GetCount(); }
const plHardRegion* GetSub(int i) const { return fSubRegions[i]; }
@ -81,8 +81,8 @@ public:
CLASSNAME_REGISTER( plHardRegionUnion );
GETINTERFACE_ANY( plHardRegionUnion, plHardRegionComplex );
virtual hsBool IIsInside(const hsPoint3& pos) const;
virtual hsBool ICameraInside() const;
virtual bool IIsInside(const hsPoint3& pos) const;
virtual bool ICameraInside() const;
};
@ -96,8 +96,8 @@ public:
CLASSNAME_REGISTER( plHardRegionIntersect );
GETINTERFACE_ANY( plHardRegionIntersect, plHardRegionComplex );
virtual hsBool IIsInside(const hsPoint3& pos) const;
virtual hsBool ICameraInside() const;
virtual bool IIsInside(const hsPoint3& pos) const;
virtual bool ICameraInside() const;
};
@ -111,8 +111,8 @@ public:
CLASSNAME_REGISTER( plHardRegionInvert );
GETINTERFACE_ANY( plHardRegionInvert, plHardRegionComplex );
virtual hsBool IIsInside(const hsPoint3& pos) const;
virtual hsBool ICameraInside() const;
virtual bool IIsInside(const hsPoint3& pos) const;
virtual bool ICameraInside() const;
};

View File

@ -56,7 +56,7 @@ public:
CLASSNAME_REGISTER( plRegionBase );
GETINTERFACE_ANY( plRegionBase, plObjInterface );
virtual hsBool IsInside(const hsPoint3& pos) const = 0;
virtual bool IsInside(const hsPoint3& pos) const = 0;
};
#endif // plRegionBase_inc

View File

@ -109,7 +109,7 @@ void plSoftVolume::UpdateListenerPosition(const hsPoint3& pos)
fListenState |= kListenDirty | kListenPosSet;
}
void plSoftVolume::SetCheckListener(hsBool on)
void plSoftVolume::SetCheckListener(bool on)
{
if( on )
{
@ -123,7 +123,7 @@ void plSoftVolume::SetCheckListener(hsBool on)
}
}
hsBool plSoftVolume::MsgReceive(plMessage* msg)
bool plSoftVolume::MsgReceive(plMessage* msg)
{
plListenerMsg* list = plListenerMsg::ConvertNoRef(msg);
if( list )

View File

@ -89,7 +89,7 @@ public:
GETINTERFACE_ANY( plSoftVolume, plRegionBase );
virtual float GetStrength(const hsPoint3& pos) const;
virtual hsBool IsInside(const hsPoint3& pos) const { return GetStrength(pos) >= 1.f; }
virtual bool IsInside(const hsPoint3& pos) const { return GetStrength(pos) >= 1.f; }
virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l) = 0;
@ -97,10 +97,10 @@ public:
virtual float GetListenerStrength() const;
virtual void UpdateListenerPosition(const hsPoint3& p);
virtual void SetCheckListener(hsBool on=true);
virtual hsBool GetCheckListener() const { return 0 != (fListenState & kListenCheck); }
virtual void SetCheckListener(bool on=true);
virtual bool GetCheckListener() const { return 0 != (fListenState & kListenCheck); }
virtual hsBool MsgReceive(plMessage* msg);
virtual bool MsgReceive(plMessage* msg);
virtual void Read(hsStream* stream, hsResMgr* mgr);
virtual void Write(hsStream* stream, hsResMgr* mgr);

View File

@ -142,7 +142,7 @@ void plSoftVolumeComplex::Write(hsStream* s, hsResMgr* mgr)
mgr->WriteKey(s, fSubVolumes[i]);
}
hsBool plSoftVolumeComplex::MsgReceive(plMessage* msg)
bool plSoftVolumeComplex::MsgReceive(plMessage* msg)
{
plGenRefMsg* refMsg = plGenRefMsg::ConvertNoRef(msg);
if( refMsg )

View File

@ -99,7 +99,7 @@ public:
virtual void UpdateListenerPosition(const hsPoint3& p);
// Now Complex specifics
virtual hsBool MsgReceive(plMessage* msg);
virtual bool MsgReceive(plMessage* msg);
uint16_t GetNumSubs() const { return fSubVolumes.GetCount(); }
const plSoftVolume* GetSub(int i) const { return fSubVolumes[i]; }

View File

@ -106,7 +106,7 @@ public:
class plConeIsect : public plVolumeIsect
{
protected:
hsBool fCapped;
bool fCapped;
float fRadAngle;
float fLength;