summaryrefslogtreecommitdiff
path: root/indra/llmath/xform.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath/xform.h')
-rw-r--r--indra/llmath/xform.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/indra/llmath/xform.h b/indra/llmath/xform.h
index 06ca526f4f..7434301670 100644
--- a/indra/llmath/xform.h
+++ b/indra/llmath/xform.h
@@ -30,12 +30,12 @@
#include "m4math.h"
#include "llquaternion.h"
-const F32 MAX_OBJECT_Z = 4096.f; // should match REGION_HEIGHT_METERS, Pre-havok4: 768.f
-const F32 MIN_OBJECT_Z = -256.f;
-const F32 DEFAULT_MAX_PRIM_SCALE = 64.f;
-const F32 DEFAULT_MAX_PRIM_SCALE_NO_MESH = 10.f;
-const F32 MIN_PRIM_SCALE = 0.01f;
-const F32 MAX_PRIM_SCALE = 65536.f; // something very high but not near FLT_MAX
+constexpr F32 MAX_OBJECT_Z = 4096.f; // should match REGION_HEIGHT_METERS, Pre-havok4: 768.f
+constexpr F32 MIN_OBJECT_Z = -256.f;
+constexpr F32 DEFAULT_MAX_PRIM_SCALE = 64.f;
+constexpr F32 DEFAULT_MAX_PRIM_SCALE_NO_MESH = 10.f;
+constexpr F32 MIN_PRIM_SCALE = 0.01f;
+constexpr F32 MAX_PRIM_SCALE = 65536.f; // something very high but not near FLT_MAX
class LLXform
{
@@ -52,7 +52,7 @@ protected:
LLXform* mParent;
U32 mChanged;
- BOOL mScaleChildOffset;
+ bool mScaleChildOffset;
public:
typedef enum e_changed_flags
@@ -78,7 +78,7 @@ public:
mScale. setVec(1,1,1);
mWorldPosition.clearVec();
mWorldRotation.loadIdentity();
- mScaleChildOffset = FALSE;
+ mScaleChildOffset = false;
}
LLXform();
@@ -86,7 +86,7 @@ public:
void getLocalMat4(LLMatrix4 &mat) const { mat.initAll(mScale, mRotation, mPosition); }
- inline BOOL setParent(LLXform *parent);
+ inline bool setParent(LLXform *parent);
inline void setPosition(const LLVector3& pos);
inline void setPosition(const F32 x, const F32 y, const F32 z);
@@ -109,18 +109,18 @@ public:
void warn(const char* const msg);
void setChanged(const U32 bits) { mChanged |= bits; }
- BOOL isChanged() const { return mChanged; }
- BOOL isChanged(const U32 bits) const { return mChanged & bits; }
+ bool isChanged() const { return mChanged; }
+ bool isChanged(const U32 bits) const { return mChanged & bits; }
void clearChanged() { mChanged = 0; }
void clearChanged(U32 bits) { mChanged &= ~bits; }
- void setScaleChildOffset(BOOL scale) { mScaleChildOffset = scale; }
- BOOL getScaleChildOffset() { return mScaleChildOffset; }
+ void setScaleChildOffset(bool scale) { mScaleChildOffset = scale; }
+ bool getScaleChildOffset() { return mScaleChildOffset; }
LLXform* getParent() const { return mParent; }
LLXform* getRoot() const;
- virtual BOOL isRoot() const;
- virtual BOOL isRootEdit() const;
+ virtual bool isRoot() const;
+ virtual bool isRootEdit() const;
const LLVector3& getPosition() const { return mPosition; }
const LLVector3& getScale() const { return mScale; }
@@ -149,7 +149,7 @@ public:
}
void update();
- void updateMatrix(BOOL update_bounds = TRUE);
+ void updateMatrix(bool update_bounds = true);
void getMinMax(LLVector3& min,LLVector3& max) const;
protected:
@@ -159,12 +159,12 @@ protected:
};
-BOOL LLXform::setParent(LLXform* parent)
+bool LLXform::setParent(LLXform* parent)
{
// Validate and make sure we're not creating a loop
if (parent == mParent)
{
- return TRUE;
+ return true;
}
if (parent)
{
@@ -174,13 +174,13 @@ BOOL LLXform::setParent(LLXform* parent)
if (cur_par == this)
{
//warn("LLXform::setParent Creating loop when setting parent!");
- return FALSE;
+ return false;
}
cur_par = cur_par->mParent;
}
}
mParent = parent;
- return TRUE;
+ return true;
}
void LLXform::setPosition(const LLVector3& pos)