Merge branch 'DRTVWR-600-maint-A' of https://github.com/secondlife/viewer

# Conflicts:
#	indra/llappearance/lltexlayer.cpp
#	indra/llappearance/lltexlayer.h
#	indra/llappearance/lltexlayerparams.cpp
#	indra/llappearance/llwearabletype.cpp
#	indra/llcharacter/llbvhloader.cpp
#	indra/llcharacter/llbvhloader.h
#	indra/llcharacter/llcharacter.cpp
#	indra/llcharacter/llcharacter.h
#	indra/llcharacter/lljoint.h
#	indra/llcharacter/llvisualparam.cpp
#	indra/llfilesystem/lldir_win32.cpp
#	indra/llfilesystem/lldir_win32.h
#	indra/llinventory/llparcel.cpp
#	indra/llmath/llmath.h
#	indra/llmath/llvolume.cpp
#	indra/llmessage/lldatapacker.h
#	indra/llxml/llxmltree.h
#	indra/newview/CMakeLists.txt
#	indra/newview/llagentwearables.cpp
#	indra/newview/llagentwearables.h
#	indra/newview/lldirpicker.cpp
#	indra/newview/llphysicsmotion.cpp
#	indra/newview/llviewergesture.cpp
#	indra/newview/llviewerjointattachment.cpp
#	indra/newview/llviewermessage.cpp
#	indra/newview/llviewertexlayer.cpp
#	indra/newview/llviewertexlayer.h
#	indra/newview/llvoavatarself.cpp
#	indra/newview/llvoavatarself.h
master
Ansariel 2024-02-18 00:09:57 +01:00
commit 9dc3651d0c
189 changed files with 2452 additions and 2666 deletions

View File

@ -78,7 +78,7 @@ class LLAvatarBoneInfo
friend class LLAvatarAppearance;
friend class LLAvatarSkeletonInfo;
public:
LLAvatarBoneInfo() : mIsJoint(FALSE) {}
LLAvatarBoneInfo() : mIsJoint(false) {}
~LLAvatarBoneInfo()
{
std::for_each(mChildren.begin(), mChildren.end(), DeletePointer());
@ -178,7 +178,7 @@ LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary* LLAvatarAppearance::sAv
LLAvatarAppearance::LLAvatarAppearance(LLWearableData* wearable_data) :
LLCharacter(),
mIsDummy(FALSE),
mIsDummy(false),
mTexSkinColor( NULL ),
mTexHairColor( NULL ),
mTexEyeColor( NULL ),
@ -189,7 +189,7 @@ LLAvatarAppearance::LLAvatarAppearance(LLWearableData* wearable_data) :
mNumBones(0),
mNumCollisionVolumes(0),
mCollisionVolumes(NULL),
mIsBuilt(FALSE),
mIsBuilt(false),
mInitFlags(0)
{
llassert_always(mWearableData);
@ -236,14 +236,14 @@ void LLAvatarAppearance::initInstance()
mesh->setName(mesh_name);
mesh->setMeshID(mesh_index);
mesh->setPickName(mesh_dict->mPickName);
mesh->setIsTransparent(FALSE);
mesh->setIsTransparent(false);
switch((S32)mesh_index)
{
case MESH_ID_HAIR:
mesh->setIsTransparent(TRUE);
mesh->setIsTransparent(true);
break;
case MESH_ID_SKIRT:
mesh->setIsTransparent(TRUE);
mesh->setIsTransparent(true);
break;
case MESH_ID_EYEBALL_LEFT:
case MESH_ID_EYEBALL_RIGHT:
@ -347,7 +347,7 @@ void LLAvatarAppearance::initClass(const std::string& avatar_file_name_arg, cons
avatar_file_name = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,AVATAR_DEFAULT_CHAR + "_lad.xml");
}
LLXmlTree xml_tree;
bool success = xml_tree.parseFile( avatar_file_name, FALSE );
bool success = xml_tree.parseFile( avatar_file_name, false );
if (!success)
{
LL_ERRS() << "Problem reading avatar configuration file:" << avatar_file_name << LL_ENDL;
@ -593,7 +593,7 @@ bool LLAvatarAppearance::parseSkeletonFile(const std::string& filename, LLXmlTre
//-------------------------------------------------------------------------
// parse the file
//-------------------------------------------------------------------------
bool parsesuccess = skeleton_xml_tree.parseFile( filename, FALSE );
bool parsesuccess = skeleton_xml_tree.parseFile( filename, false );
if (!parsesuccess)
{
@ -818,7 +818,7 @@ void LLAvatarAppearance::buildCharacter()
//-------------------------------------------------------------------------
mRoot->removeAllChildren();
mJointMap.clear();
mIsBuilt = FALSE;
mIsBuilt = false;
//-------------------------------------------------------------------------
// clear mesh data
@ -839,7 +839,7 @@ void LLAvatarAppearance::buildCharacter()
bool status = loadAvatar();
stop_glerror();
// gPrintMessagesThisFrame = TRUE;
// gPrintMessagesThisFrame = true;
LL_DEBUGS() << "Avatar load took " << timer.getElapsedTimeF32() << " seconds." << LL_ENDL;
if (!status)
@ -909,7 +909,7 @@ void LLAvatarAppearance::buildCharacter()
// SL-315
mPelvisp->setPosition( LLVector3(0.0f, 0.0f, 0.0f) );
mIsBuilt = TRUE;
mIsBuilt = true;
stop_glerror();
}
@ -1055,7 +1055,7 @@ bool LLAvatarAppearance::loadSkeletonNode ()
// make meshes children before calling parent version of the function
for (LLAvatarJoint* joint : mMeshLOD)
{
joint->mUpdateXform = FALSE;
joint->mUpdateXform = false;
joint->setMeshesToChildren();
}
@ -1118,7 +1118,7 @@ bool LLAvatarAppearance::loadMeshNodes()
LLAvatarJointMesh* mesh = NULL;
U8 mesh_id = 0;
bool found_mesh_id = FALSE;
bool found_mesh_id = false;
/* if (type == "hairMesh")
switch(lod)
@ -1131,7 +1131,7 @@ bool LLAvatarAppearance::loadMeshNodes()
if (type.compare(mesh_dict->mName) == 0)
{
mesh_id = mesh_index;
found_mesh_id = TRUE;
found_mesh_id = true;
break;
}
}
@ -1271,12 +1271,12 @@ bool LLAvatarAppearance::loadLayersets()
LLTexLayerInterface* layer = layer_set->findLayerByName(morph->mLayer);
if (layer)
{
layer->setHasMorph(TRUE);
layer->setHasMorph(true);
}
else
{
LL_WARNS() << "Could not find layer named " << morph->mLayer << " to set morph flag" << LL_ENDL;
success = FALSE;
success = false;
}
}
}
@ -1484,7 +1484,7 @@ bool LLAvatarAppearance::teToColorParams( ETextureIndex te, U32 *param_name )
// <FS:Ansariel> [Legacy Bake]
//void LLAvatarAppearance::setClothesColor( ETextureIndex te, const LLColor4& new_color)
void LLAvatarAppearance::setClothesColor( ETextureIndex te, const LLColor4& new_color, BOOL upload_bake)
void LLAvatarAppearance::setClothesColor( ETextureIndex te, const LLColor4& new_color, bool upload_bake)
// </FS:Ansariel> [Legacy Bake]
{
U32 param_name[3];
@ -1586,7 +1586,7 @@ bool LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
{
if (node->hasName("bone"))
{
mIsJoint = TRUE;
mIsJoint = true;
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!node->getFastAttributeString(name_string, mName))
{
@ -1599,7 +1599,7 @@ bool LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
}
else if (node->hasName("collision_volume"))
{
mIsJoint = FALSE;
mIsJoint = false;
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!node->getFastAttributeString(name_string, mName))
{
@ -1832,13 +1832,13 @@ bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
static LLStdStringHandle position_string = LLXmlTree::addAttributeString("position");
if (child->getFastAttributeVector3(position_string, info->mPosition))
{
info->mHasPosition = TRUE;
info->mHasPosition = true;
}
static LLStdStringHandle rotation_string = LLXmlTree::addAttributeString("rotation");
if (child->getFastAttributeVector3(rotation_string, info->mRotationEuler))
{
info->mHasRotation = TRUE;
info->mHasRotation = true;
}
static LLStdStringHandle group_string = LLXmlTree::addAttributeString("group");
if (child->getFastAttributeS32(group_string, info->mGroup))
@ -1948,7 +1948,7 @@ bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
delete info;
return false;
}
BOOL shared = false;
bool shared = false;
static LLStdStringHandle shared_string = LLXmlTree::addAttributeString("shared");
child->getFastAttributeBOOL(shared_string, shared);
@ -2129,7 +2129,7 @@ bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root
}
//virtual
LLAvatarAppearance::LLMaskedMorph::LLMaskedMorph(LLVisualParam *morph_target, BOOL invert, std::string layer) :
LLAvatarAppearance::LLMaskedMorph::LLMaskedMorph(LLVisualParam *morph_target, bool invert, std::string layer) :
mMorphTarget(morph_target),
mInvert(invert),
mLayer(layer)

View File

@ -115,7 +115,7 @@ public:
bool isBuilt() const { return mIsBuilt; }
// <FS:Ansariel> [Legacy Bake]
virtual BOOL isUsingServerBakes() const = 0;
virtual bool isUsingServerBakes() const = 0;
/** State
** **
@ -259,7 +259,7 @@ public:
public:
// <FS:Ansariel> [Legacy Bake]
//virtual void invalidateComposite(LLTexLayerSet* layerset) = 0;
virtual void invalidateComposite(LLTexLayerSet* layerset, BOOL upload_result) = 0;
virtual void invalidateComposite(LLTexLayerSet* layerset, bool upload_result) = 0;
/********************************************************************************
** **
@ -296,7 +296,7 @@ protected:
public:
// <FS:Ansariel> [Legacy Bake]
//void setClothesColor(LLAvatarAppearanceDefines::ETextureIndex te, const LLColor4& new_color);
void setClothesColor(LLAvatarAppearanceDefines::ETextureIndex te, const LLColor4& new_color, BOOL upload_bake);
void setClothesColor(LLAvatarAppearanceDefines::ETextureIndex te, const LLColor4& new_color, bool upload_bake);
// </FS:Ansariel> [Legacy Bake]
LLColor4 getClothesColor(LLAvatarAppearanceDefines::ETextureIndex te);
static bool teToColorParams(LLAvatarAppearanceDefines::ETextureIndex te, U32 *param_name);
@ -308,7 +308,7 @@ public:
LLColor4 getGlobalColor(const std::string& color_name ) const;
// <FS:Ansariel> [Legacy Bake]
//virtual void onGlobalColorChanged(const LLTexGlobalColor* global_color) = 0;
virtual void onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL upload_bake) = 0;
virtual void onGlobalColorChanged(const LLTexGlobalColor* global_color, bool upload_bake) = 0;
// </FS:Ansariel> [Legacy Bake]
protected:
LLTexGlobalColor* mTexSkinColor;
@ -404,7 +404,7 @@ protected:
struct LLAvatarMeshInfo
{
typedef std::pair<LLViewerVisualParamInfo*,BOOL> morph_info_pair_t; // LLPolyMorphTargetInfo stored here
typedef std::pair<LLViewerVisualParamInfo*,bool> morph_info_pair_t; // LLPolyMorphTargetInfo stored here
typedef std::vector<morph_info_pair_t> morph_info_list_t;
LLAvatarMeshInfo() : mLOD(0), mMinPixelArea(.1f) {}
@ -433,8 +433,8 @@ protected:
struct LLAvatarAttachmentInfo
{
LLAvatarAttachmentInfo()
: mGroup(-1), mAttachmentID(-1), mPieMenuSlice(-1), mVisibleFirstPerson(FALSE),
mIsHUDAttachment(FALSE), mHasPosition(FALSE), mHasRotation(FALSE) {}
: mGroup(-1), mAttachmentID(-1), mPieMenuSlice(-1), mVisibleFirstPerson(false),
mIsHUDAttachment(false), mHasPosition(false), mHasRotation(false) {}
std::string mName;
std::string mJointName;
LLVector3 mPosition;
@ -442,8 +442,8 @@ protected:
S32 mGroup;
S32 mAttachmentID;
S32 mPieMenuSlice;
BOOL mVisibleFirstPerson;
BOOL mIsHUDAttachment;
bool mVisibleFirstPerson;
bool mIsHUDAttachment;
bool mHasPosition;
bool mHasRotation;
};
@ -463,11 +463,11 @@ protected:
struct LLAvatarMorphInfo
{
LLAvatarMorphInfo()
: mInvert(FALSE) {}
: mInvert(false) {}
std::string mName;
std::string mRegion;
std::string mLayer;
BOOL mInvert;
bool mInvert;
};
typedef std::vector<LLAvatarMorphInfo*> morph_info_list_t;
@ -478,7 +478,7 @@ protected:
class LLMaskedMorph
{
public:
LLMaskedMorph(LLVisualParam *morph_target, BOOL invert, std::string layer);
LLMaskedMorph(LLVisualParam *morph_target, bool invert, std::string layer);
LLVisualParam *mMorphTarget;
bool mInvert;

View File

@ -39,56 +39,56 @@ using namespace LLAvatarAppearanceDefines;
LLAvatarAppearanceDictionary::Textures::Textures()
{
addEntry(TEX_HEAD_BODYPAINT, new TextureEntry("head_bodypaint", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN));
addEntry(TEX_UPPER_SHIRT, new TextureEntry("upper_shirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultShirtUUID", LLWearableType::WT_SHIRT));
addEntry(TEX_LOWER_PANTS, new TextureEntry("lower_pants", TRUE, BAKED_NUM_INDICES, "UIImgDefaultPantsUUID", LLWearableType::WT_PANTS));
addEntry(TEX_EYES_IRIS, new TextureEntry("eyes_iris", TRUE, BAKED_NUM_INDICES, "UIImgDefaultEyesUUID", LLWearableType::WT_EYES));
addEntry(TEX_HAIR, new TextureEntry("hair_grain", TRUE, BAKED_NUM_INDICES, "UIImgDefaultHairUUID", LLWearableType::WT_HAIR));
addEntry(TEX_UPPER_BODYPAINT, new TextureEntry("upper_bodypaint", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN));
addEntry(TEX_LOWER_BODYPAINT, new TextureEntry("lower_bodypaint", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN));
addEntry(TEX_LOWER_SHOES, new TextureEntry("lower_shoes", TRUE, BAKED_NUM_INDICES, "UIImgDefaultShoesUUID", LLWearableType::WT_SHOES));
addEntry(TEX_LOWER_SOCKS, new TextureEntry("lower_socks", TRUE, BAKED_NUM_INDICES, "UIImgDefaultSocksUUID", LLWearableType::WT_SOCKS));
addEntry(TEX_UPPER_JACKET, new TextureEntry("upper_jacket", TRUE, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET));
addEntry(TEX_LOWER_JACKET, new TextureEntry("lower_jacket", TRUE, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET));
addEntry(TEX_UPPER_GLOVES, new TextureEntry("upper_gloves", TRUE, BAKED_NUM_INDICES, "UIImgDefaultGlovesUUID", LLWearableType::WT_GLOVES));
addEntry(TEX_UPPER_UNDERSHIRT, new TextureEntry("upper_undershirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERSHIRT));
addEntry(TEX_LOWER_UNDERPANTS, new TextureEntry("lower_underpants", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERPANTS));
addEntry(TEX_SKIRT, new TextureEntry("skirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultSkirtUUID", LLWearableType::WT_SKIRT));
addEntry(TEX_HEAD_BODYPAINT, new TextureEntry("head_bodypaint", true, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN));
addEntry(TEX_UPPER_SHIRT, new TextureEntry("upper_shirt", true, BAKED_NUM_INDICES, "UIImgDefaultShirtUUID", LLWearableType::WT_SHIRT));
addEntry(TEX_LOWER_PANTS, new TextureEntry("lower_pants", true, BAKED_NUM_INDICES, "UIImgDefaultPantsUUID", LLWearableType::WT_PANTS));
addEntry(TEX_EYES_IRIS, new TextureEntry("eyes_iris", true, BAKED_NUM_INDICES, "UIImgDefaultEyesUUID", LLWearableType::WT_EYES));
addEntry(TEX_HAIR, new TextureEntry("hair_grain", true, BAKED_NUM_INDICES, "UIImgDefaultHairUUID", LLWearableType::WT_HAIR));
addEntry(TEX_UPPER_BODYPAINT, new TextureEntry("upper_bodypaint", true, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN));
addEntry(TEX_LOWER_BODYPAINT, new TextureEntry("lower_bodypaint", true, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN));
addEntry(TEX_LOWER_SHOES, new TextureEntry("lower_shoes", true, BAKED_NUM_INDICES, "UIImgDefaultShoesUUID", LLWearableType::WT_SHOES));
addEntry(TEX_LOWER_SOCKS, new TextureEntry("lower_socks", true, BAKED_NUM_INDICES, "UIImgDefaultSocksUUID", LLWearableType::WT_SOCKS));
addEntry(TEX_UPPER_JACKET, new TextureEntry("upper_jacket", true, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET));
addEntry(TEX_LOWER_JACKET, new TextureEntry("lower_jacket", true, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET));
addEntry(TEX_UPPER_GLOVES, new TextureEntry("upper_gloves", true, BAKED_NUM_INDICES, "UIImgDefaultGlovesUUID", LLWearableType::WT_GLOVES));
addEntry(TEX_UPPER_UNDERSHIRT, new TextureEntry("upper_undershirt", true, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERSHIRT));
addEntry(TEX_LOWER_UNDERPANTS, new TextureEntry("lower_underpants", true, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERPANTS));
addEntry(TEX_SKIRT, new TextureEntry("skirt", true, BAKED_NUM_INDICES, "UIImgDefaultSkirtUUID", LLWearableType::WT_SKIRT));
addEntry(TEX_LOWER_ALPHA, new TextureEntry("lower_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
addEntry(TEX_UPPER_ALPHA, new TextureEntry("upper_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
addEntry(TEX_HEAD_ALPHA, new TextureEntry("head_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
addEntry(TEX_EYES_ALPHA, new TextureEntry("eyes_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
addEntry(TEX_HAIR_ALPHA, new TextureEntry("hair_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
addEntry(TEX_LOWER_ALPHA, new TextureEntry("lower_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
addEntry(TEX_UPPER_ALPHA, new TextureEntry("upper_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
addEntry(TEX_HEAD_ALPHA, new TextureEntry("head_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
addEntry(TEX_EYES_ALPHA, new TextureEntry("eyes_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
addEntry(TEX_HAIR_ALPHA, new TextureEntry("hair_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
addEntry(TEX_HEAD_TATTOO, new TextureEntry("head_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
addEntry(TEX_UPPER_TATTOO, new TextureEntry("upper_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
addEntry(TEX_LOWER_TATTOO, new TextureEntry("lower_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
addEntry(TEX_HEAD_TATTOO, new TextureEntry("head_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
addEntry(TEX_UPPER_TATTOO, new TextureEntry("upper_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
addEntry(TEX_LOWER_TATTOO, new TextureEntry("lower_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
addEntry(TEX_HEAD_UNIVERSAL_TATTOO, new TextureEntry("head_universal_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_UPPER_UNIVERSAL_TATTOO, new TextureEntry("upper_universal_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_LOWER_UNIVERSAL_TATTOO, new TextureEntry("lower_universal_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_SKIRT_TATTOO, new TextureEntry("skirt_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_HAIR_TATTOO, new TextureEntry("hair_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_EYES_TATTOO, new TextureEntry("eyes_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_LEFT_ARM_TATTOO, new TextureEntry("leftarm_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_LEFT_LEG_TATTOO, new TextureEntry("leftleg_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_AUX1_TATTOO, new TextureEntry("aux1_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_AUX2_TATTOO, new TextureEntry("aux2_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_AUX3_TATTOO, new TextureEntry("aux3_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_HEAD_UNIVERSAL_TATTOO, new TextureEntry("head_universal_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_UPPER_UNIVERSAL_TATTOO, new TextureEntry("upper_universal_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_LOWER_UNIVERSAL_TATTOO, new TextureEntry("lower_universal_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_SKIRT_TATTOO, new TextureEntry("skirt_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_HAIR_TATTOO, new TextureEntry("hair_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_EYES_TATTOO, new TextureEntry("eyes_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_LEFT_ARM_TATTOO, new TextureEntry("leftarm_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_LEFT_LEG_TATTOO, new TextureEntry("leftleg_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_AUX1_TATTOO, new TextureEntry("aux1_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_AUX2_TATTOO, new TextureEntry("aux2_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_AUX3_TATTOO, new TextureEntry("aux3_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_HEAD_BAKED, new TextureEntry("head-baked", FALSE, BAKED_HEAD, "head"));
addEntry(TEX_UPPER_BAKED, new TextureEntry("upper-baked", FALSE, BAKED_UPPER, "upper"));
addEntry(TEX_LOWER_BAKED, new TextureEntry("lower-baked", FALSE, BAKED_LOWER, "lower"));
addEntry(TEX_EYES_BAKED, new TextureEntry("eyes-baked", FALSE, BAKED_EYES, "eyes"));
addEntry(TEX_HAIR_BAKED, new TextureEntry("hair-baked", FALSE, BAKED_HAIR, "hair"));
addEntry(TEX_SKIRT_BAKED, new TextureEntry("skirt-baked", FALSE, BAKED_SKIRT, "skirt"));
addEntry(TEX_LEFT_ARM_BAKED, new TextureEntry("leftarm-baked", FALSE, BAKED_LEFT_ARM, "leftarm"));
addEntry(TEX_LEFT_LEG_BAKED, new TextureEntry("leftleg-baked", FALSE, BAKED_LEFT_LEG, "leftleg"));
addEntry(TEX_AUX1_BAKED, new TextureEntry("aux1-baked", FALSE, BAKED_AUX1, "aux1"));
addEntry(TEX_AUX2_BAKED, new TextureEntry("aux2-baked", FALSE, BAKED_AUX2, "aux2"));
addEntry(TEX_AUX3_BAKED, new TextureEntry("aux3-baked", FALSE, BAKED_AUX3, "aux3"));
addEntry(TEX_HEAD_BAKED, new TextureEntry("head-baked", false, BAKED_HEAD, "head"));
addEntry(TEX_UPPER_BAKED, new TextureEntry("upper-baked", false, BAKED_UPPER, "upper"));
addEntry(TEX_LOWER_BAKED, new TextureEntry("lower-baked", false, BAKED_LOWER, "lower"));
addEntry(TEX_EYES_BAKED, new TextureEntry("eyes-baked", false, BAKED_EYES, "eyes"));
addEntry(TEX_HAIR_BAKED, new TextureEntry("hair-baked", false, BAKED_HAIR, "hair"));
addEntry(TEX_SKIRT_BAKED, new TextureEntry("skirt-baked", false, BAKED_SKIRT, "skirt"));
addEntry(TEX_LEFT_ARM_BAKED, new TextureEntry("leftarm-baked", false, BAKED_LEFT_ARM, "leftarm"));
addEntry(TEX_LEFT_LEG_BAKED, new TextureEntry("leftleg-baked", false, BAKED_LEFT_LEG, "leftleg"));
addEntry(TEX_AUX1_BAKED, new TextureEntry("aux1-baked", false, BAKED_AUX1, "aux1"));
addEntry(TEX_AUX2_BAKED, new TextureEntry("aux2-baked", false, BAKED_AUX2, "aux2"));
addEntry(TEX_AUX3_BAKED, new TextureEntry("aux3-baked", false, BAKED_AUX3, "aux3"));
}
LLAvatarAppearanceDictionary::BakedTextures::BakedTextures()

View File

@ -40,7 +40,7 @@ namespace LLAvatarAppearanceDefines
extern const S32 SCRATCH_TEX_WIDTH;
extern const S32 SCRATCH_TEX_HEIGHT;
static const U32 AVATAR_HOVER = 11001;
static constexpr U32 AVATAR_HOVER = 11001;
//--------------------------------------------------------------------
// Enums
@ -167,10 +167,10 @@ public:
const std::string mDefaultImageName;
const LLWearableType::EType mWearableType;
// It's either a local texture xor baked
BOOL mIsLocalTexture;
BOOL mIsBakedTexture;
bool mIsLocalTexture;
bool mIsBakedTexture;
// If it's a local texture, it may be used by a baked texture
BOOL mIsUsedByBakedTexture;
bool mIsUsedByBakedTexture;
EBakedTextureIndex mBakedTextureIndex;
};

View File

@ -40,7 +40,7 @@ const F32 DEFAULT_AVATAR_JOINT_LOD = 0.0f;
//-----------------------------------------------------------------------------
// Static Data
//-----------------------------------------------------------------------------
BOOL LLAvatarJoint::sDisableLOD = FALSE;
bool LLAvatarJoint::sDisableLOD = false;
//-----------------------------------------------------------------------------
// LLAvatarJoint()
@ -66,13 +66,13 @@ LLAvatarJoint::LLAvatarJoint(const std::string &name, LLJoint *parent) :
void LLAvatarJoint::init()
{
mValid = FALSE;
mValid = false;
mComponents = SC_JOINT | SC_BONE | SC_AXES;
mMinPixelArea = DEFAULT_AVATAR_JOINT_LOD;
mPickName = PN_DEFAULT;
mVisible = TRUE;
mVisible = true;
mMeshID = 0;
mIsTransparent = FALSE;
mIsTransparent = false;
}
@ -88,7 +88,7 @@ LLAvatarJoint::~LLAvatarJoint()
//--------------------------------------------------------------------
// setValid()
//--------------------------------------------------------------------
void LLAvatarJoint::setValid( BOOL valid, BOOL recursive )
void LLAvatarJoint::setValid( bool valid, bool recursive )
{
//----------------------------------------------------------------
// set visibility for this joint
@ -103,7 +103,7 @@ void LLAvatarJoint::setValid( BOOL valid, BOOL recursive )
for (LLJoint* child : mChildren)
{
LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(child);
joint->setValid(valid, TRUE);
joint->setValid(valid, true);
}
}
@ -112,7 +112,7 @@ void LLAvatarJoint::setValid( BOOL valid, BOOL recursive )
//--------------------------------------------------------------------
// setSkeletonComponents()
//--------------------------------------------------------------------
void LLAvatarJoint::setSkeletonComponents( U32 comp, BOOL recursive )
void LLAvatarJoint::setSkeletonComponents( U32 comp, bool recursive )
{
mComponents = comp;
if (recursive)
@ -125,7 +125,7 @@ void LLAvatarJoint::setSkeletonComponents( U32 comp, BOOL recursive )
}
}
void LLAvatarJoint::setVisible(BOOL visible, BOOL recursive)
void LLAvatarJoint::setVisible(bool visible, bool recursive)
{
mVisible = visible;
@ -148,7 +148,7 @@ void LLAvatarJoint::updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pix
}
}
void LLAvatarJoint::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind, bool terse_update)
void LLAvatarJoint::updateFaceData(LLFace *face, F32 pixel_area, bool damp_wind, bool terse_update)
{
for (LLJoint* child : mChildren)
{
@ -180,18 +180,18 @@ bool LLAvatarJoint::updateLOD(F32 pixel_area, bool activate)
if (found_lod || jointLOD == DEFAULT_AVATAR_JOINT_LOD)
{
// we've already found a joint to enable, so enable the rest as alternatives
lod_changed |= joint->updateLOD(pixel_area, TRUE);
lod_changed |= joint->updateLOD(pixel_area, true);
}
else
{
if (pixel_area >= jointLOD || sDisableLOD)
{
lod_changed |= joint->updateLOD(pixel_area, TRUE);
lod_changed |= joint->updateLOD(pixel_area, true);
found_lod = true;
}
else
{
lod_changed |= joint->updateLOD(pixel_area, FALSE);
lod_changed |= joint->updateLOD(pixel_area, false);
}
}
}
@ -222,11 +222,11 @@ void LLAvatarJoint::setMeshesToChildren()
LLAvatarJointCollisionVolume::LLAvatarJointCollisionVolume()
{
mUpdateXform = FALSE;
mUpdateXform = false;
}
/*virtual*/
U32 LLAvatarJointCollisionVolume::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
U32 LLAvatarJointCollisionVolume::render( F32 pixelArea, bool first_pass, bool is_dummy )
{
LL_ERRS() << "Cannot call render() on LLAvatarJointCollisionVolume" << LL_ENDL;
return 0;
@ -234,7 +234,7 @@ U32 LLAvatarJointCollisionVolume::render( F32 pixelArea, BOOL first_pass, BOOL i
LLVector3 LLAvatarJointCollisionVolume::getVolumePos(LLVector3 &offset)
{
mUpdateXform = TRUE;
mUpdateXform = true;
LLVector3 result = offset;
result.scaleVec(getScale());

View File

@ -52,14 +52,14 @@ public:
virtual ~LLAvatarJoint();
// Gets the validity of this joint
BOOL getValid() { return mValid; }
bool getValid() { return mValid; }
// Sets the validity of this joint
virtual void setValid( BOOL valid, BOOL recursive=FALSE );
virtual void setValid( bool valid, bool recursive=false );
// Returns true if this object is transparent.
// This is used to determine in which order to draw objects.
virtual BOOL isTransparent() { return mIsTransparent; }
virtual bool isTransparent() { return mIsTransparent; }
// Returns true if this object should inherit scale modifiers from its immediate parent
virtual bool inheritScale() { return false; }
@ -72,7 +72,7 @@ public:
};
// Selects which skeleton components to draw
void setSkeletonComponents( U32 comp, BOOL recursive = TRUE );
void setSkeletonComponents( U32 comp, bool recursive = true );
// Returns which skeleton components are enables for drawing
U32 getSkeletonComponents() { return mComponents; }
@ -90,34 +90,34 @@ public:
void setPickName(LLJointPickName name) { mPickName = name; }
LLJointPickName getPickName() { return mPickName; }
void setVisible( BOOL visible, BOOL recursive );
void setVisible( bool visible, bool recursive );
// Takes meshes in mMeshParts and sets each one as a child joint
void setMeshesToChildren();
// LLViewerJoint interface
virtual U32 render( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE ) = 0;
virtual U32 render( F32 pixelArea, bool first_pass = true, bool is_dummy = false ) = 0;
virtual void updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area);
virtual void updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind = FALSE, bool terse_update = false);
virtual void updateFaceData(LLFace *face, F32 pixel_area, bool damp_wind = false, bool terse_update = false);
virtual bool updateLOD(F32 pixel_area, bool activate);
virtual void updateJointGeometry();
virtual void dump();
public:
static BOOL sDisableLOD;
static bool sDisableLOD;
avatar_joint_mesh_list_t mMeshParts; //LLViewerJointMesh*
void setMeshID( S32 id ) {mMeshID = id;}
protected:
void init();
BOOL mValid;
BOOL mIsTransparent;
bool mValid;
bool mIsTransparent;
U32 mComponents;
F32 mMinPixelArea;
LLJointPickName mPickName;
BOOL mVisible;
bool mVisible;
S32 mMeshID;
};
@ -128,7 +128,7 @@ public:
virtual ~LLAvatarJointCollisionVolume() {};
/*virtual*/ bool inheritScale() { return true; }
/*virtual*/ U32 render( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE );
/*virtual*/ U32 render( F32 pixelArea, bool first_pass = true, bool is_dummy = false );
void renderCollision();

View File

@ -247,7 +247,7 @@ void LLAvatarJointMesh::setTexture( LLGLTexture *texture )
{
mLayerSet = NULL;
//texture->bindTexture(0);
//texture->setClamp(TRUE, TRUE);
//texture->setClamp(true, true);
}
}

View File

@ -69,7 +69,7 @@ protected:
LLTexLayerSet* mLayerSet; // ptr to a layer set owned by the avatar
U32 mTestImageName; // handle to a temporary texture for previewing uploads
LLPolyMesh* mMesh; // ptr to a global polymesh
BOOL mCullBackFaces; // true by default
bool mCullBackFaces; // true by default
LLFace* mFace; // ptr to a face w/ AGP copy of mesh
U32 mFaceIndexCount;
@ -122,16 +122,13 @@ public:
// Sets up joint matrix data for rendering
void setupJoint(LLAvatarJoint* current_joint);
// Render time method to upload batches of joint matrices
void uploadJointMatrices();
// Sets ID for picking
void setMeshID( S32 id ) {mMeshID = id;}
// Gets ID for picking
S32 getMeshID() { return mMeshID; }
void setIsTransparent(BOOL is_transparent) { mIsTransparent = is_transparent; }
void setIsTransparent(bool is_transparent) { mIsTransparent = is_transparent; }
private:
// Allocate skin data

View File

@ -198,7 +198,7 @@ bool LLDriverParam::setInfo(LLDriverParamInfo *info)
// <FS:Ansariel> [Legacy Bake]
//setWeight(getDefaultWeight());
setWeight(getDefaultWeight(), FALSE );
setWeight(getDefaultWeight(), false );
return true;
}
@ -211,7 +211,7 @@ bool LLDriverParam::setInfo(LLDriverParamInfo *info)
// <FS:Ansariel> [Legacy Bake]
//void LLDriverParam::setWeight(F32 weight)
void LLDriverParam::setWeight(F32 weight, BOOL upload_bake)
void LLDriverParam::setWeight(F32 weight, bool upload_bake)
// </FS:Ansariel> [Legacy Bake]
{
F32 min_weight = getMinWeight();
@ -454,7 +454,7 @@ const LLViewerVisualParam* LLDriverParam::getDrivenParam(S32 index) const
//void LLDriverParam::setAnimationTarget( F32 target_value)
//{
// LLVisualParam::setAnimationTarget(target_value);
void LLDriverParam::setAnimationTarget( F32 target_value, BOOL upload_bake )
void LLDriverParam::setAnimationTarget( F32 target_value, bool upload_bake )
{
LLVisualParam::setAnimationTarget(target_value, upload_bake);
// </FS:Ansariel> [Legacy Bake]
@ -480,21 +480,21 @@ void LLDriverParam::setAnimationTarget( F32 target_value, BOOL upload_bake )
//void LLDriverParam::stopAnimating()
//{
// LLVisualParam::stopAnimating();
void LLDriverParam::stopAnimating(BOOL upload_bake)
void LLDriverParam::stopAnimating(bool upload_bake)
{
LLVisualParam::stopAnimating(upload_bake);
// </FS:Ansariel> [Legacy Bake]
for(LLDrivenEntry& driven : mDriven)
{
driven.mParam->setAnimating(FALSE);
driven.mParam->setAnimating(false);
}
}
/*virtual*/
bool LLDriverParam::linkDrivenParams(visual_param_mapper mapper, bool only_cross_params)
{
BOOL success = true;
bool success = true;
for (LLDrivenEntryInfo& driven_info : getInfo()->mDrivenInfoList)
{
S32 driven_id = driven_info.mDrivenID;

View File

@ -105,9 +105,9 @@ public:
///*virtual*/ void setWeight(F32 weight);
///*virtual*/ void setAnimationTarget(F32 target_value);
///*virtual*/ void stopAnimating();
/*virtual*/ void setWeight(F32 weight, BOOL upload_bake);
/*virtual*/ void setAnimationTarget(F32 target_value, BOOL upload_bake);
/*virtual*/ void stopAnimating(BOOL upload_bake);
/*virtual*/ void setWeight(F32 weight, bool upload_bake);
/*virtual*/ void setAnimationTarget(F32 target_value, bool upload_bake);
/*virtual*/ void stopAnimating(bool upload_bake);
// </FS:Ansariel> [Legacy Bake]
/*virtual*/ bool linkDrivenParams(visual_param_mapper mapper, bool only_cross_params);
/*virtual*/ void resetDrivenParams();

View File

@ -36,14 +36,14 @@
LLLocalTextureObject::LLLocalTextureObject() :
mIsBakedReady(FALSE),
mIsBakedReady(false),
mDiscard(MAX_DISCARD_LEVEL+1)
{
mImage = NULL;
}
LLLocalTextureObject::LLLocalTextureObject(LLGLTexture* image, const LLUUID& id) :
mIsBakedReady(FALSE),
mIsBakedReady(false),
mDiscard(MAX_DISCARD_LEVEL+1)
{
mImage = image;
@ -206,7 +206,7 @@ void LLLocalTextureObject::setDiscard(S32 new_discard)
mDiscard = new_discard;
}
void LLLocalTextureObject::setBakedReady(BOOL ready)
void LLLocalTextureObject::setBakedReady(bool ready)
{
mIsBakedReady = ready;
}

View File

@ -63,7 +63,7 @@ public:
void setID(LLUUID new_id);
void setDiscard(S32 new_discard);
void setBakedReady(BOOL ready);
void setBakedReady(bool ready);
protected:
@ -78,7 +78,7 @@ private:
LLUUID mID;
BOOL mIsBakedReady;
bool mIsBakedReady;
S32 mDiscard;
};

View File

@ -72,8 +72,8 @@ LLPolyMeshSharedData::LLPolyMeshSharedData()
mTexCoords = NULL;
mDetailTexCoords = NULL;
mWeights = NULL;
mHasWeights = FALSE;
mHasDetailTexCoords = FALSE;
mHasWeights = false;
mHasDetailTexCoords = false;
mNumFaces = 0;
mFaces = NULL;
@ -615,7 +615,7 @@ bool LLPolyMeshSharedData::loadMesh( const std::string& fileName )
std::string morph_name(morphName);
LLPolyMorphData* morph_data = new LLPolyMorphData(morph_name);
BOOL result = morph_data->loadBinary(fp, this);
bool result = morph_data->loadBinary(fp, this);
if (!result)
{
@ -705,12 +705,12 @@ bool LLPolyMeshSharedData::loadMesh( const std::string& fileName )
}
}
status = TRUE;
status = true;
}
else
{
LL_ERRS() << "invalid mesh file header: " << fileName << LL_ENDL;
status = FALSE;
status = false;
}
if (0 == mNumJointNames)

View File

@ -79,8 +79,8 @@ private:
LLVector2 *mDetailTexCoords;
F32 *mWeights;
BOOL mHasWeights;
BOOL mHasDetailTexCoords;
bool mHasWeights;
bool mHasDetailTexCoords;
// face data
S32 mNumFaces;
@ -138,7 +138,7 @@ public:
const S32 *getSharedVert(S32 vert);
BOOL isLOD() { return (mReferenceData != NULL); }
bool isLOD() { return (mReferenceData != NULL); }
};
@ -204,13 +204,13 @@ public:
}
// Returns whether or not the mesh has detail texture coords
BOOL hasDetailTexCoords() {
bool hasDetailTexCoords() {
llassert (mSharedData);
return mSharedData->mHasDetailTexCoords;
}
// Returns whether or not the mesh has vertex weights
BOOL hasWeights() const{
bool hasWeights() const{
llassert (mSharedData);
return mSharedData->mHasWeights;
}
@ -316,7 +316,7 @@ public:
// Get indices
U32* getIndices() { return mSharedData ? mSharedData->mTriangleIndices : NULL; }
BOOL isLOD() { return mSharedData && mSharedData->isLOD(); }
bool isLOD() { return mSharedData && mSharedData->isLOD(); }
void setAvatar(LLAvatarAppearance* avatarp) { mAvatarp = avatarp; }
LLAvatarAppearance* getAvatar() { return mAvatarp; }

View File

@ -256,7 +256,7 @@ void LLPolyMorphData::freeData()
// LLPolyMorphTargetInfo()
//-----------------------------------------------------------------------------
LLPolyMorphTargetInfo::LLPolyMorphTargetInfo()
: mIsClothingMorph(FALSE)
: mIsClothingMorph(false)
{
}
@ -362,7 +362,7 @@ bool LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info)
mID = info->mID;
// <FS:Ansariel> [Legacy Bake]
//setWeight(getDefaultWeight());
setWeight(getDefaultWeight(), FALSE);
setWeight(getDefaultWeight(), false);
LLAvatarAppearance* avatarp = mMesh->getAvatar();
for (LLPolyVolumeMorphInfo& volume_info : getInfo()->mVolumeInfoList)
@ -661,7 +661,7 @@ void LLPolyMorphTarget::apply( ESex avatar_sex )
//-----------------------------------------------------------------------------
// applyMask()
//-----------------------------------------------------------------------------
void LLPolyMorphTarget::applyMask(const U8 *maskTextureData, S32 width, S32 height, S32 num_components, BOOL invert)
void LLPolyMorphTarget::applyMask(const U8 *maskTextureData, S32 width, S32 height, S32 num_components, bool invert)
{
LLVector4a *clothing_weights = getInfo()->mIsClothingMorph ? mMesh->getWritableClothingWeights() : NULL;
@ -751,7 +751,7 @@ void LLPolyMorphTarget::applyVolumeChanges(F32 delta_weight)
LLPolyVertexMask::LLPolyVertexMask(LLPolyMorphData* morph_data)
: mWeights(new F32[morph_data->mNumIndices]),
mMorphData(morph_data),
mWeightsGenerated(FALSE)
mWeightsGenerated(false)
{
llassert(mMorphData != NULL);
llassert(mMorphData->mNumIndices > 0);
@ -782,10 +782,10 @@ LLPolyVertexMask::~LLPolyVertexMask()
//-----------------------------------------------------------------------------
// generateMask()
//-----------------------------------------------------------------------------
void LLPolyVertexMask::generateMask(const U8 *maskTextureData, S32 width, S32 height, S32 num_components, BOOL invert, LLVector4a *clothing_weights)
void LLPolyVertexMask::generateMask(const U8 *maskTextureData, S32 width, S32 height, S32 num_components, bool invert, LLVector4a *clothing_weights)
{
// RN debug output that uses Image Debugger (http://www.cs.unc.edu/~baxter/projects/imdebug/)
// BOOL debugImg = FALSE;
// bool debugImg = false;
// if (debugImg)
// {
// if (invert)
@ -829,7 +829,7 @@ void LLPolyVertexMask::generateMask(const U8 *maskTextureData, S32 width, S32 he
clothing_weights[vertIndex].getF32ptr()[VW] = mWeights[index];
}
}
mWeightsGenerated = TRUE;
mWeightsGenerated = true;
}
//-----------------------------------------------------------------------------

View File

@ -84,14 +84,14 @@ public:
LLPolyVertexMask(const LLPolyVertexMask& pOther);
~LLPolyVertexMask();
void generateMask(const U8 *maskData, S32 width, S32 height, S32 num_components, BOOL invert, LLVector4a *clothing_weights);
void generateMask(const U8 *maskData, S32 width, S32 height, S32 num_components, bool invert, LLVector4a *clothing_weights);
F32* getMorphMaskWeights();
protected:
F32* mWeights;
LLPolyMorphData *mMorphData;
BOOL mWeightsGenerated;
bool mWeightsGenerated;
};
@ -133,7 +133,7 @@ public:
protected:
std::string mMorphName;
BOOL mIsClothingMorph;
bool mIsClothingMorph;
typedef std::vector<LLPolyVolumeMorphInfo> volume_info_list_t;
volume_info_list_t mVolumeInfoList;
};
@ -159,7 +159,7 @@ public:
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const;
// LLVisualParam Virtual functions
///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
///*virtual*/ bool parseData(LLXmlTreeNode* node);
/*virtual*/ void apply( ESex sex );
// LLViewerVisualParam Virtual functions
@ -170,7 +170,7 @@ public:
/*virtual*/ const LLVector4a* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh);
/*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh);
void applyMask(const U8 *maskData, S32 width, S32 height, S32 num_components, BOOL invert);
void applyMask(const U8 *maskData, S32 width, S32 height, S32 num_components, bool invert);
void addPendingMorphMask() { mNumMorphMasksPending++; }
void applyVolumeChanges(F32 delta_weight); // SL-315 - for resetSkeleton()
@ -183,7 +183,7 @@ protected:
LLPolyVertexMask * mVertMask;
ESex mLastSex;
// number of morph masks that haven't been generated, must be 0 before this morph is applied
BOOL mNumMorphMasksPending;
S32 mNumMorphMasksPending;
typedef std::vector<LLPolyVolumeMorph> volume_list_t;
volume_list_t mVolumeMorphs;

View File

@ -68,7 +68,7 @@ bool LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node)
std::string name;
LLVector3 scale;
LLVector3 pos;
BOOL haspos = false;
bool haspos = false;
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!bone->getFastAttributeString(name_string, name))
@ -143,7 +143,7 @@ bool LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
mID = info->mID;
// <FS:Ansariel> [Legacy Bake]
//setWeight(getDefaultWeight());
setWeight(getDefaultWeight(), FALSE);
setWeight(getDefaultWeight(), false);
for (LLPolySkeletalBoneInfo& bone_info : getInfo()->mBoneInfoList)
{

View File

@ -51,7 +51,7 @@ class LLAvatarAppearance;
//-----------------------------------------------------------------------------
struct LLPolySkeletalBoneInfo
{
LLPolySkeletalBoneInfo(std::string &name, LLVector3 &scale, LLVector3 &pos, BOOL haspos)
LLPolySkeletalBoneInfo(std::string &name, LLVector3 &scale, LLVector3 &pos, bool haspos)
: mBoneName(name),
mScaleDeformation(scale),
mPositionDeformation(pos),
@ -59,7 +59,7 @@ struct LLPolySkeletalBoneInfo
std::string mBoneName;
LLVector3 mScaleDeformation;
LLVector3 mPositionDeformation;
BOOL mHasPositionDeformation;
bool mHasPositionDeformation;
};
class alignas(16) LLPolySkeletalDistortionInfo : public LLViewerVisualParamInfo
@ -97,7 +97,7 @@ public:
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const;
// LLVisualParam Virtual functions
///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
///*virtual*/ bool parseData(LLXmlTreeNode* node);
/*virtual*/ void apply( ESex sex );
// LLViewerVisualParam Virtual functions

View File

@ -58,7 +58,7 @@ bool LLTexGlobalColor::setInfo(LLTexGlobalColorInfo *info)
for (LLTexLayerParamColorInfo* color_info : mInfo->mParamColorInfoList)
{
LLTexParamGlobalColor* param_color = new LLTexParamGlobalColor(this);
if (!param_color->setInfo(color_info, TRUE))
if (!param_color->setInfo(color_info, true))
{
mInfo = NULL;
return false;

View File

@ -60,16 +60,16 @@ public:
~LLTexLayerInfo();
bool parseXml(LLXmlTreeNode* node);
BOOL createVisualParams(LLAvatarAppearance *appearance);
BOOL isUserSettable() { return mLocalTexture != -1; }
bool createVisualParams(LLAvatarAppearance *appearance);
bool isUserSettable() { return mLocalTexture != -1; }
S32 getLocalTexture() const { return mLocalTexture; }
BOOL getOnlyAlpha() const { return mUseLocalTextureAlphaOnly; }
bool getOnlyAlpha() const { return mUseLocalTextureAlphaOnly; }
std::string getName() const { return mName; }
private:
std::string mName;
BOOL mWriteAllChannels; // Don't use masking. Just write RGBA into buffer,
bool mWriteAllChannels; // Don't use masking. Just write RGBA into buffer,
LLTexLayerInterface::ERenderPass mRenderPass;
std::string mGlobalColor;
@ -77,11 +77,11 @@ private:
S32 mLocalTexture;
std::string mStaticImageFileName;
BOOL mStaticImageIsMask;
BOOL mUseLocalTextureAlphaOnly; // Ignore RGB channels from the input texture. Use alpha as a mask
BOOL mIsVisibilityMask;
bool mStaticImageIsMask;
bool mUseLocalTextureAlphaOnly; // Ignore RGB channels from the input texture. Use alpha as a mask
bool mIsVisibilityMask;
typedef std::vector< std::pair< std::string,BOOL > > morph_name_list_t;
typedef std::vector< std::pair< std::string,bool > > morph_name_list_t;
morph_name_list_t mMorphNameList;
param_color_info_list_t mParamColorInfoList;
param_alpha_info_list_t mParamAlphaInfoList;
@ -130,17 +130,17 @@ void LLTexLayerSetBuffer::preRenderTexLayerSet()
}
// virtual
void LLTexLayerSetBuffer::postRenderTexLayerSet(BOOL success)
void LLTexLayerSetBuffer::postRenderTexLayerSet(bool success)
{
popProjection();
}
BOOL LLTexLayerSetBuffer::renderTexLayerSet(LLRenderTarget* bound_target)
bool LLTexLayerSetBuffer::renderTexLayerSet(LLRenderTarget* bound_target)
{
// Default color mask for tex layer render
gGL.setColorMask(true, true);
BOOL success = TRUE;
bool success = true;
gAlphaMaskProgram.bind();
gAlphaMaskProgram.setMinimumAlpha(0.004f);
@ -182,7 +182,7 @@ LLTexLayerSetInfo::LLTexLayerSetInfo() :
mWidth( 1024 ),
mHeight( 1024 ),
// </FS:Beq>
mClearAlpha( TRUE )
mClearAlpha( true )
{
}
@ -259,11 +259,11 @@ void LLTexLayerSetInfo::createVisualParams(LLAvatarAppearance *appearance)
// An ordered set of texture layers that get composited into a single texture.
//-----------------------------------------------------------------------------
BOOL LLTexLayerSet::sHasCaches = FALSE;
bool LLTexLayerSet::sHasCaches = false;
LLTexLayerSet::LLTexLayerSet(LLAvatarAppearance* const appearance) :
mAvatarAppearance( appearance ),
mIsVisible( TRUE ),
mIsVisible( true ),
mBakedTexIndex(LLAvatarAppearanceDefines::BAKED_HEAD),
mInfo( NULL )
{
@ -284,7 +284,7 @@ LLTexLayerSet::~LLTexLayerSet()
// setInfo
//-----------------------------------------------------------------------------
BOOL LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info)
bool LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info)
{
llassert(mInfo == NULL);
mInfo = info;
@ -330,7 +330,7 @@ BOOL LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info)
// parseData
//-----------------------------------------------------------------------------
BOOL LLTexLayerSet::parseData(LLXmlTreeNode* node)
bool LLTexLayerSet::parseData(LLXmlTreeNode* node)
{
LLTexLayerSetInfo *info = new LLTexLayerSetInfo;
@ -361,10 +361,10 @@ void LLTexLayerSet::deleteCaches()
}
BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target )
bool LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target )
{
BOOL success = TRUE;
mIsVisible = TRUE;
bool success = true;
mIsVisible = true;
if (mMaskLayerList.size() > 0)
{
@ -372,7 +372,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget*
{
if (layer->isInvisibleAlphaMask())
{
mIsVisible = FALSE;
mIsVisible = false;
}
}
}
@ -432,8 +432,8 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget*
}
BOOL LLTexLayerSet::isBodyRegion(const std::string& region) const
{
bool LLTexLayerSet::isBodyRegion(const std::string& region) const
{
return mInfo->mBodyRegion == region;
}
@ -491,7 +491,7 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height,
{
gGL.flush();
{
LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(info->mStaticAlphaFileName, TRUE);
LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(info->mStaticAlphaFileName, true);
if( tex )
{
LLGLSUIDefault gls_ui;
@ -540,7 +540,7 @@ void LLTexLayerSet::applyMorphMask(const U8* tex_data, S32 width, S32 height, S3
mAvatarAppearance->applyMorphMask(tex_data, width, height, num_components, mBakedTexIndex);
}
BOOL LLTexLayerSet::isMorphValid() const
bool LLTexLayerSet::isMorphValid() const
{
for(const LLTexLayerInterface* layer : mLayerList)
{
@ -568,13 +568,13 @@ void LLTexLayerSet::invalidateMorphMasks()
// LLTexLayerInfo
//-----------------------------------------------------------------------------
LLTexLayerInfo::LLTexLayerInfo() :
mWriteAllChannels( FALSE ),
mWriteAllChannels( false ),
mRenderPass(LLTexLayer::RP_COLOR),
mFixedColor( 0.f, 0.f, 0.f, 0.f ),
mLocalTexture( -1 ),
mStaticImageIsMask( FALSE ),
mUseLocalTextureAlphaOnly(FALSE),
mIsVisibilityMask(FALSE)
mStaticImageIsMask( false ),
mUseLocalTextureAlphaOnly(false),
mIsVisibilityMask(false)
{
}
@ -616,7 +616,7 @@ bool LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
node->getFastAttributeString( global_color_string, mGlobalColor );
// Visibility mask (optional)
BOOL is_visibility;
bool is_visibility;
static LLStdStringHandle visibility_mask_string = LLXmlTree::addAttributeString("visibility_mask");
if (node->getFastAttributeBOOL(visibility_mask_string, is_visibility))
{
@ -682,10 +682,10 @@ bool LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle morph_name_string = LLXmlTree::addAttributeString("morph_name");
if (maskNode->getFastAttributeString(morph_name_string, morph_name))
{
BOOL invert = FALSE;
bool invert = false;
static LLStdStringHandle invert_string = LLXmlTree::addAttributeString("invert");
maskNode->getFastAttributeBOOL(invert_string, invert);
mMorphNameList.push_back(std::pair<std::string,BOOL>(morph_name,invert));
mMorphNameList.push_back(std::pair<std::string,bool>(morph_name,invert));
}
}
@ -721,28 +721,28 @@ bool LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
return true;
}
BOOL LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance)
bool LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance)
{
BOOL success = true;
bool success = true;
for (LLTexLayerParamColorInfo* color_info : mParamColorInfoList)
{
LLTexLayerParamColor* param_color = new LLTexLayerParamColor(appearance);
if (!param_color->setInfo(color_info, TRUE))
if (!param_color->setInfo(color_info, true))
{
LL_WARNS() << "NULL TexLayer Color Param could not be added to visual param list. Deleting." << LL_ENDL;
delete param_color;
success = FALSE;
success = false;
}
}
for (LLTexLayerParamAlphaInfo* alpha_info : mParamAlphaInfoList)
{
LLTexLayerParamAlpha* param_alpha = new LLTexLayerParamAlpha(appearance);
if (!param_alpha->setInfo(alpha_info, TRUE))
if (!param_alpha->setInfo(alpha_info, true))
{
LL_WARNS() << "NULL TexLayer Alpha Param could not be added to visual param list. Deleting." << LL_ENDL;
delete param_alpha;
success = FALSE;
success = false;
}
}
@ -751,9 +751,9 @@ BOOL LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance)
LLTexLayerInterface::LLTexLayerInterface(LLTexLayerSet* const layer_set):
mTexLayerSet( layer_set ),
mMorphMasksValid( FALSE ),
mMorphMasksValid( false ),
mInfo(NULL),
mHasMorph(FALSE)
mHasMorph(false)
{
}
@ -767,7 +767,7 @@ LLTexLayerInterface::LLTexLayerInterface(const LLTexLayerInterface &layer, LLWea
mHasMorph = layer.mHasMorph;
}
BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearable ) // This sets mInfo and calls initialization functions
bool LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearable ) // This sets mInfo and calls initialization functions
{
// setInfo should only be called once. Code is not robust enough to handle redefinition of a texlayer.
// Not a critical warning, but could be useful for debugging later issues. -Nyx
@ -785,7 +785,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab
if (!wearable)
{
param_color = new LLTexLayerParamColor(this);
if (!param_color->setInfo(color_info, TRUE))
if (!param_color->setInfo(color_info, true))
{
mInfo = NULL;
return false;
@ -810,7 +810,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab
if (!wearable)
{
param_alpha = new LLTexLayerParamAlpha( this );
if (!param_alpha->setInfo(alpha_info, TRUE))
if (!param_alpha->setInfo(alpha_info, true))
{
mInfo = NULL;
return false;
@ -900,14 +900,14 @@ const std::string& LLTexLayerInterface::getGlobalColor() const
return mInfo->mGlobalColor;
}
BOOL LLTexLayerInterface::isVisibilityMask() const
bool LLTexLayerInterface::isVisibilityMask() const
{
return mInfo->mIsVisibilityMask;
}
void LLTexLayerInterface::invalidateMorphMasks()
{
mMorphMasksValid = FALSE;
mMorphMasksValid = false;
}
LLViewerVisualParam* LLTexLayerInterface::getVisualParamPtr(S32 index) const
@ -987,7 +987,7 @@ void LLTexLayer::asLLSD(LLSD& sd) const
// setInfo
//-----------------------------------------------------------------------------
BOOL LLTexLayer::setInfo(const LLTexLayerInfo* info, LLWearable* wearable )
bool LLTexLayer::setInfo(const LLTexLayerInfo* info, LLWearable* wearable )
{
return LLTexLayerInterface::setInfo(info, wearable);
}
@ -1027,14 +1027,14 @@ void LLTexLayer::calculateTexLayerColor(const param_color_list_t &param_list, LL
}
}
BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target)
bool LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target)
{
// *TODO: Is this correct?
//gPipeline.disableLights();
stop_glerror();
LLColor4 net_color;
BOOL color_specified = findNetColor(&net_color);
bool color_specified = findNetColor(&net_color);
if (mTexLayerSet->getAvatarAppearance()->mIsDummy)
{
@ -1042,7 +1042,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
net_color = LLAvatarAppearance::getDummyColor();
}
BOOL success = TRUE;
bool success = true;
// If you can't see the layer, don't render it.
if( is_approx_zero( net_color.mV[VW] ) )
@ -1050,7 +1050,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
return success;
}
BOOL alpha_mask_specified = FALSE;
bool alpha_mask_specified = false;
param_alpha_list_t::const_iterator iter = mParamAlphaList.begin();
if( iter != mParamAlphaList.end() )
{
@ -1058,7 +1058,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
// However, we can't do this optimization if we have morph masks that need updating.
/* if (!mHasMorph)
{
BOOL skip_layer = TRUE;
bool skip_layer = true;
while( iter != mParamAlphaList.end() )
{
@ -1066,7 +1066,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
if( !param->getSkip() )
{
skip_layer = FALSE;
skip_layer = false;
break;
}
@ -1081,7 +1081,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
const bool force_render = true;
renderMorphMasks(x, y, width, height, net_color, bound_target, force_render);
alpha_mask_specified = TRUE;
alpha_mask_specified = true;
gGL.flush();
gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_ONE_MINUS_DEST_ALPHA);
}
@ -1122,7 +1122,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
LLTexUnit::eTextureAddressMode old_mode = tex->getAddressMode();
gGL.getTexUnit(0)->bind(tex, TRUE);
gGL.getTexUnit(0)->bind(tex, true);
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
gl_rect_2d_simple_tex( width, height );
@ -1137,7 +1137,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
}
// else
// {
// success = FALSE;
// success = false;
// }
}
}
@ -1148,13 +1148,13 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask);
if( tex )
{
gGL.getTexUnit(0)->bind(tex, TRUE);
gGL.getTexUnit(0)->bind(tex, true);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
}
else
{
success = FALSE;
success = false;
}
}
}
@ -1206,7 +1206,7 @@ const U8* LLTexLayer::getAlphaData() const
return (iter2 == mAlphaCache.end()) ? 0 : iter2->second;
}
BOOL LLTexLayer::findNetColor(LLColor4* net_color) const
bool LLTexLayer::findNetColor(LLColor4* net_color) const
{
// Color is either:
// * one or more color parameters (weighted colors) (which may make use of a global color or fixed color)
@ -1250,9 +1250,9 @@ BOOL LLTexLayer::findNetColor(LLColor4* net_color) const
return false; // No need to draw a separate colored polygon
}
BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
bool LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
{
BOOL success = true;
bool success = true;
gGL.flush();
@ -1262,14 +1262,14 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
if( tex )
{
gAlphaMaskProgram.setMinimumAlpha(0.f);
gGL.getTexUnit(0)->bind(tex, TRUE);
gGL.getTexUnit(0)->bind(tex, true);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
else
{
success = FALSE;
success = false;
}
}
else
@ -1304,7 +1304,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
return;
}
LL_PROFILE_ZONE_SCOPED;
BOOL success = TRUE;
bool success = true;
llassert( !mParamAlphaList.empty() );
@ -1349,7 +1349,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
{
LLTexUnit::eTextureAddressMode old_mode = tex->getAddressMode();
gGL.getTexUnit(0)->bind(tex, TRUE);
gGL.getTexUnit(0)->bind(tex, true);
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
gl_rect_2d_simple_tex( width, height );
@ -1366,7 +1366,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
{
if( (tex->getComponents() == 4) || (tex->getComponents() == 1) )
{
gGL.getTexUnit(0)->bind(tex, TRUE);
gGL.getTexUnit(0)->bind(tex, true);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
}
@ -1547,7 +1547,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
getTexLayerSet()->getAvatarAppearance()->dirtyMesh();
mMorphMasksValid = TRUE;
mMorphMasksValid = true;
getTexLayerSet()->applyMorphMask(alpha_data, width, height, 1);
}
}
@ -1580,7 +1580,7 @@ void LLTexLayer::addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32
}
}
/*virtual*/ BOOL LLTexLayer::isInvisibleAlphaMask() const
/*virtual*/ bool LLTexLayer::isInvisibleAlphaMask() const
{
if (mLocalTextureObject)
{
@ -1649,7 +1649,7 @@ LLTexLayerTemplate::~LLTexLayerTemplate()
// setInfo
//-----------------------------------------------------------------------------
/*virtual*/ BOOL LLTexLayerTemplate::setInfo(const LLTexLayerInfo* info, LLWearable* wearable )
/*virtual*/ bool LLTexLayerTemplate::setInfo(const LLTexLayerInfo* info, LLWearable* wearable )
{
return LLTexLayerInterface::setInfo(info, wearable);
}
@ -1698,14 +1698,14 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const
return layer;
}
/*virtual*/ BOOL LLTexLayerTemplate::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target)
/*virtual*/ bool LLTexLayerTemplate::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target)
{
if(!mInfo)
{
return FALSE ;
return false ;
}
BOOL success = TRUE;
bool success = true;
updateWearableCache();
for (LLWearable* wearable : mWearableCache)
{
@ -1730,9 +1730,9 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const
return success;
}
/*virtual*/ BOOL LLTexLayerTemplate::blendAlphaTexture( S32 x, S32 y, S32 width, S32 height) // Multiplies a single alpha texture against the frame buffer
/*virtual*/ bool LLTexLayerTemplate::blendAlphaTexture( S32 x, S32 y, S32 width, S32 height) // Multiplies a single alpha texture against the frame buffer
{
BOOL success = TRUE;
bool success = true;
U32 num_wearables = updateWearableCache();
for (U32 i = 0; i < num_wearables; i++)
{
@ -1756,8 +1756,8 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const
}
}
/*virtual*/ void LLTexLayerTemplate::setHasMorph(BOOL newval)
{
/*virtual*/ void LLTexLayerTemplate::setHasMorph(bool newval)
{
mHasMorph = newval;
U32 num_wearables = updateWearableCache();
for (U32 i = 0; i < num_wearables; i++)
@ -1783,7 +1783,7 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const
}
}
/*virtual*/ BOOL LLTexLayerTemplate::isInvisibleAlphaMask() const
/*virtual*/ bool LLTexLayerTemplate::isInvisibleAlphaMask() const
{
U32 num_wearables = updateWearableCache();
for (U32 i = 0; i < num_wearables; i++)
@ -1920,7 +1920,7 @@ LLImageTGA* LLTexLayerStaticImageList::getImageTGA(const std::string& file_name)
// Returns a GL Image (without a backing ImageRaw) that contains the decoded data from a tga file named file_name.
// Caches the result to speed identical subsequent requests.
LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name, BOOL is_mask)
LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name, bool is_mask)
{
LL_PROFILE_ZONE_SCOPED;
LLPointer<LLGLTexture> tex;
@ -1934,7 +1934,7 @@ LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name,
else
{
llassert(gTextureManagerBridgep);
tex = gTextureManagerBridgep->getLocalTexture( FALSE );
tex = gTextureManagerBridgep->getLocalTexture( false );
LLPointer<LLImageRaw> image_raw = new LLImageRaw;
if( loadImageRaw( file_name, image_raw ) )
{
@ -1950,7 +1950,7 @@ LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name,
image_raw->copyUnscaledAlphaMask(alpha_image_raw, LLColor4U::black);
}
tex->createGLTexture(0, image_raw, 0, TRUE, LLGLTexture::LOCAL);
tex->createGLTexture(0, image_raw, 0, true, LLGLTexture::LOCAL);
gGL.getTexUnit(0)->bind(tex);
tex->setAddressMode(LLTexUnit::TAM_CLAMP);
@ -1968,11 +1968,11 @@ LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name,
}
// Reads a .tga file, decodes it, and puts the decoded data in image_raw.
// Returns TRUE if successful.
BOOL LLTexLayerStaticImageList::loadImageRaw(const std::string& file_name, LLImageRaw* image_raw)
// Returns true if successful.
bool LLTexLayerStaticImageList::loadImageRaw(const std::string& file_name, LLImageRaw* image_raw)
{
LL_PROFILE_ZONE_SCOPED;
BOOL success = FALSE;
bool success = false;
std::string path;
path = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,file_name);
LLPointer<LLImageTGA> image_tga = new LLImageTGA( path );

View File

@ -65,13 +65,13 @@ public:
LLTexLayerInterface(const LLTexLayerInterface &layer, LLWearable *wearable);
virtual ~LLTexLayerInterface() {}
virtual BOOL render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target) = 0;
virtual bool render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target) = 0;
virtual void deleteCaches() = 0;
virtual BOOL blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) = 0;
virtual BOOL isInvisibleAlphaMask() const = 0;
virtual bool blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) = 0;
virtual bool isInvisibleAlphaMask() const = 0;
const LLTexLayerInfo* getInfo() const { return mInfo; }
virtual BOOL setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // sets mInfo, calls initialization functions
virtual bool setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // sets mInfo, calls initialization functions
LLWearableType::EType getWearableType() const;
LLAvatarAppearanceDefines::ETextureIndex getLocalTextureIndex() const;
@ -80,16 +80,16 @@ public:
LLTexLayerSet* const getTexLayerSet() { return mTexLayerSet; }
void invalidateMorphMasks();
virtual void setHasMorph(BOOL newval) { mHasMorph = newval; }
BOOL hasMorph() const { return mHasMorph; }
BOOL isMorphValid() const { return mMorphMasksValid; }
virtual void setHasMorph(bool newval) { mHasMorph = newval; }
bool hasMorph() const { return mHasMorph; }
bool isMorphValid() const { return mMorphMasksValid; }
void requestUpdate();
virtual void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height, LLRenderTarget* bound_target) = 0;
BOOL hasAlphaParams() const { return !mParamAlphaList.empty(); }
bool hasAlphaParams() const { return !mParamAlphaList.empty(); }
ERenderPass getRenderPass() const;
BOOL isVisibilityMask() const;
bool isVisibilityMask() const;
virtual void asLLSD(LLSD& sd) const {}
@ -100,8 +100,8 @@ protected:
protected:
LLTexLayerSet* const mTexLayerSet;
const LLTexLayerInfo* mInfo;
BOOL mMorphMasksValid;
BOOL mHasMorph;
bool mMorphMasksValid;
bool mHasMorph;
// Layers can have either mParamColorList, mGlobalColor, or mFixedColor. They are looked for in that order.
param_color_list_t mParamColorList;
@ -121,13 +121,13 @@ public:
LLTexLayerTemplate(LLTexLayerSet* const layer_set, LLAvatarAppearance* const appearance);
LLTexLayerTemplate(const LLTexLayerTemplate &layer);
/*virtual*/ ~LLTexLayerTemplate();
/*virtual*/ BOOL render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target);
/*virtual*/ BOOL setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // This sets mInfo and calls initialization functions
/*virtual*/ BOOL blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer
/*virtual*/ bool render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target);
/*virtual*/ bool setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // This sets mInfo and calls initialization functions
/*virtual*/ bool blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer
/*virtual*/ void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height, LLRenderTarget* bound_target);
/*virtual*/ void setHasMorph(BOOL newval);
/*virtual*/ void setHasMorph(bool newval);
/*virtual*/ void deleteCaches();
/*virtual*/ BOOL isInvisibleAlphaMask() const;
/*virtual*/ bool isInvisibleAlphaMask() const;
protected:
U32 updateWearableCache() const;
LLTexLayer* getLayer(U32 i) const;
@ -151,18 +151,18 @@ public:
LLTexLayer(const LLTexLayerTemplate &layer_template, LLLocalTextureObject *lto, LLWearable *wearable);
/*virtual*/ ~LLTexLayer();
/*virtual*/ BOOL setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // This sets mInfo and calls initialization functions
/*virtual*/ BOOL render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target);
/*virtual*/ bool setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // This sets mInfo and calls initialization functions
/*virtual*/ bool render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target);
/*virtual*/ void deleteCaches();
const U8* getAlphaData() const;
BOOL findNetColor(LLColor4* color) const;
/*virtual*/ BOOL blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer
bool findNetColor(LLColor4* color) const;
/*virtual*/ bool blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer
/*virtual*/ void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height, LLRenderTarget* bound_target);
void renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color, LLRenderTarget* bound_target, bool force_render);
void addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32 height, LLRenderTarget* bound_target);
/*virtual*/ BOOL isInvisibleAlphaMask() const;
/*virtual*/ bool isInvisibleAlphaMask() const;
void setLTO(LLLocalTextureObject *lto) { mLocalTextureObject = lto; }
LLLocalTextureObject* getLTO() { return mLocalTextureObject; }
@ -197,14 +197,14 @@ public:
void gatherMorphMaskAlpha(U8 *data, S32 origin_x, S32 origin_y, S32 width, S32 height, LLRenderTarget* bound_target);
const LLTexLayerSetInfo* getInfo() const { return mInfo; }
BOOL setInfo(const LLTexLayerSetInfo *info); // This sets mInfo and calls initialization functions
bool setInfo(const LLTexLayerSetInfo *info); // This sets mInfo and calls initialization functions
BOOL render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target = nullptr);
bool render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target = nullptr);
void renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target = nullptr, bool forceClear = false);
BOOL isBodyRegion(const std::string& region) const;
bool isBodyRegion(const std::string& region) const;
void applyMorphMask(const U8* tex_data, S32 width, S32 height, S32 num_components);
BOOL isMorphValid() const;
bool isMorphValid() const;
virtual void requestUpdate() = 0;
void invalidateMorphMasks();
void deleteCaches();
@ -213,12 +213,12 @@ public:
LLAvatarAppearance* getAvatarAppearance() const { return mAvatarAppearance; }
const std::string getBodyRegionName() const;
BOOL hasComposite() const { return (mComposite.notNull()); }
bool hasComposite() const { return (mComposite.notNull()); }
LLAvatarAppearanceDefines::EBakedTextureIndex getBakedTexIndex() const { return mBakedTexIndex; }
void setBakedTexIndex(LLAvatarAppearanceDefines::EBakedTextureIndex index) { mBakedTexIndex = index; }
BOOL isVisible() const { return mIsVisible; }
bool isVisible() const { return mIsVisible; }
static BOOL sHasCaches;
static bool sHasCaches;
protected:
typedef std::vector<LLTexLayerInterface *> layer_list_t;
@ -226,7 +226,7 @@ protected:
layer_list_t mMaskLayerList;
LLPointer<LLTexLayerSetBuffer> mComposite;
LLAvatarAppearance* const mAvatarAppearance; // note: backlink only; don't make this an LLPointer.
BOOL mIsVisible;
bool mIsVisible;
LLAvatarAppearanceDefines::EBakedTextureIndex mBakedTexIndex;
const LLTexLayerSetInfo* mInfo;
@ -252,7 +252,7 @@ protected:
S32 mWidth;
S32 mHeight;
std::string mStaticAlphaFileName;
BOOL mClearAlpha; // Set alpha to 1 for this layerset (if there is no mStaticAlphaFileName)
bool mClearAlpha; // Set alpha to 1 for this layerset (if there is no mStaticAlphaFileName)
typedef std::vector<LLTexLayerInfo*> layer_info_list_t;
layer_info_list_t mLayerInfoList;
};
@ -275,15 +275,15 @@ protected:
void popProjection() const;
virtual void preRenderTexLayerSet();
// <FS:Ansariel> [Legacy Bake]
//virtual void midRenderTexLayerSet(BOOL success) {}
virtual void midRenderTexLayerSet(BOOL success, LLRenderTarget* bound_target) {}
//virtual void midRenderTexLayerSet(bool success) {}
virtual void midRenderTexLayerSet(bool success, LLRenderTarget* bound_target) {}
// </FS:Ansariel> [Legacy Bake]
virtual void postRenderTexLayerSet(BOOL success);
virtual void postRenderTexLayerSet(bool success);
virtual S32 getCompositeOriginX() const = 0;
virtual S32 getCompositeOriginY() const = 0;
virtual S32 getCompositeWidth() const = 0;
virtual S32 getCompositeHeight() const = 0;
BOOL renderTexLayerSet(LLRenderTarget* bound_target);
bool renderTexLayerSet(LLRenderTarget* bound_target);
LLTexLayerSet* const mTexLayerSet;
};
@ -297,12 +297,12 @@ class LLTexLayerStaticImageList : public LLSingleton<LLTexLayerStaticImageList>
LLSINGLETON(LLTexLayerStaticImageList);
~LLTexLayerStaticImageList();
public:
LLGLTexture* getTexture(const std::string& file_name, BOOL is_mask);
LLGLTexture* getTexture(const std::string& file_name, bool is_mask);
LLImageTGA* getImageTGA(const std::string& file_name);
void deleteCachedImages();
void dumpByteCount() const;
protected:
BOOL loadImageRaw(const std::string& file_name, LLImageRaw* image_raw);
bool loadImageRaw(const std::string& file_name, LLImageRaw* image_raw);
private:
LLStringTable mImageNames;
typedef std::map<const char*, LLPointer<LLGLTexture> > texture_map_t;

View File

@ -69,7 +69,7 @@ LLTexLayerParam::LLTexLayerParam(const LLTexLayerParam& pOther)
{
}
BOOL LLTexLayerParam::setInfo(LLViewerVisualParamInfo *info, BOOL add_to_appearance)
bool LLTexLayerParam::setInfo(LLViewerVisualParamInfo *info, bool add_to_appearance)
{
LLViewerVisualParam::setInfo(info);
@ -123,8 +123,8 @@ LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLTexLayerInterface* layer)
mCachedProcessedTexture(NULL),
mStaticImageTGA(),
mStaticImageRaw(),
mNeedsCreateTexture(FALSE),
mStaticImageInvalid(FALSE),
mNeedsCreateTexture(false),
mStaticImageInvalid(false),
mAvgDistortionVec(1.f, 1.f, 1.f),
mCachedEffectiveWeight(0.f)
{
@ -136,8 +136,8 @@ LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLAvatarAppearance* appearance)
mCachedProcessedTexture(NULL),
mStaticImageTGA(),
mStaticImageRaw(),
mNeedsCreateTexture(FALSE),
mStaticImageInvalid(FALSE),
mNeedsCreateTexture(false),
mStaticImageInvalid(false),
mAvgDistortionVec(1.f, 1.f, 1.f),
mCachedEffectiveWeight(0.f)
{
@ -173,17 +173,17 @@ void LLTexLayerParamAlpha::deleteCaches()
mStaticImageTGA = NULL; // deletes image
mCachedProcessedTexture = NULL;
mStaticImageRaw = NULL;
mNeedsCreateTexture = FALSE;
mNeedsCreateTexture = false;
}
BOOL LLTexLayerParamAlpha::getMultiplyBlend() const
bool LLTexLayerParamAlpha::getMultiplyBlend() const
{
return ((LLTexLayerParamAlphaInfo *)getInfo())->mMultiplyBlend;
}
// <FS:Ansariel> [Legacy Bake]
//void LLTexLayerParamAlpha::setWeight(F32 weight)
void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL upload_bake)
void LLTexLayerParamAlpha::setWeight(F32 weight, bool upload_bake)
// </FS:Ansariel> [Legacy Bake]
{
if (mIsAnimating || mTexLayer == NULL)
@ -213,7 +213,7 @@ void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL upload_bake)
// <FS:Ansariel> [Legacy Bake]
//void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value)
void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value, BOOL upload_bake)
void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value, bool upload_bake)
{
// do not animate dummy parameters
if (mIsDummy)
@ -228,7 +228,7 @@ void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value, BOOL upload_bake
// <FS:Ansariel> [Legacy Bake]
//setWeight(target_value);
setWeight(target_value, upload_bake);
mIsAnimating = TRUE;
mIsAnimating = true;
if (mNext)
{
// <FS:Ansariel> [Legacy Bake]
@ -239,7 +239,7 @@ void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value, BOOL upload_bake
// <FS:Ansariel> [Legacy Bake]
//void LLTexLayerParamAlpha::animate(F32 delta)
void LLTexLayerParamAlpha::animate(F32 delta, BOOL upload_bake)
void LLTexLayerParamAlpha::animate(F32 delta, bool upload_bake)
{
if (mNext)
{
@ -249,7 +249,7 @@ void LLTexLayerParamAlpha::animate(F32 delta, BOOL upload_bake)
}
}
BOOL LLTexLayerParamAlpha::getSkip() const
bool LLTexLayerParamAlpha::getSkip() const
{
if (!mTexLayer)
{
@ -277,10 +277,10 @@ BOOL LLTexLayerParamAlpha::getSkip() const
}
BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
bool LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
{
LL_PROFILE_ZONE_SCOPED;
BOOL success = true;
bool success = true;
if (!mTexLayer)
{
@ -288,7 +288,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
}
F32 effective_weight = (mTexLayer->getTexLayerSet()->getAvatarAppearance()->getSex() & getSex()) ? mCurWeight : getDefaultWeight();
BOOL weight_changed = effective_weight != mCachedEffectiveWeight;
bool weight_changed = effective_weight != mCachedEffectiveWeight;
if (getSkip())
{
return success;
@ -312,12 +312,12 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
// Don't load the image file until we actually need it the first time. Like now.
mStaticImageTGA = LLTexLayerStaticImageList::getInstance()->getImageTGA(info->mStaticImageFileName);
// We now have something in one of our caches
LLTexLayerSet::sHasCaches |= mStaticImageTGA.notNull() ? TRUE : FALSE;
LLTexLayerSet::sHasCaches |= mStaticImageTGA.notNull() ? true : false;
if (mStaticImageTGA.isNull())
{
LL_WARNS() << "Unable to load static file: " << info->mStaticImageFileName << LL_ENDL;
mStaticImageInvalid = TRUE; // don't try again.
mStaticImageInvalid = true; // don't try again.
return false;
}
}
@ -334,10 +334,10 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
if (!mCachedProcessedTexture)
{
llassert(gTextureManagerBridgep);
mCachedProcessedTexture = gTextureManagerBridgep->getLocalTexture(image_tga_width, image_tga_height, 1, FALSE);
mCachedProcessedTexture = gTextureManagerBridgep->getLocalTexture(image_tga_width, image_tga_height, 1, false);
// We now have something in one of our caches
LLTexLayerSet::sHasCaches |= mCachedProcessedTexture ? TRUE : FALSE;
LLTexLayerSet::sHasCaches |= mCachedProcessedTexture ? true : false;
mCachedProcessedTexture->setExplicitFormat(GL_ALPHA8, GL_ALPHA);
}
@ -346,7 +346,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
mStaticImageRaw = NULL;
mStaticImageRaw = new LLImageRaw;
mStaticImageTGA->decodeAndProcess(mStaticImageRaw, info->mDomain, effective_weight);
mNeedsCreateTexture = TRUE;
mNeedsCreateTexture = true;
LL_DEBUGS() << "Built Cached Alpha: " << info->mStaticImageFileName << ": (" << mStaticImageRaw->getWidth() << ", " << mStaticImageRaw->getHeight() << ") " << "Domain: " << info->mDomain << " Weight: " << effective_weight << LL_ENDL;
}
@ -357,7 +357,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
if (mNeedsCreateTexture)
{
mCachedProcessedTexture->createGLTexture(0, mStaticImageRaw);
mNeedsCreateTexture = FALSE;
mNeedsCreateTexture = false;
gGL.getTexUnit(0)->bind(mCachedProcessedTexture);
mCachedProcessedTexture->setAddressMode(LLTexUnit::TAM_CLAMP);
}
@ -390,8 +390,8 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
// LLTexLayerParamAlphaInfo
//-----------------------------------------------------------------------------
LLTexLayerParamAlphaInfo::LLTexLayerParamAlphaInfo() :
mMultiplyBlend(FALSE),
mSkipIfZeroWeight(FALSE),
mMultiplyBlend(false),
mSkipIfZeroWeight(false),
mDomain(0.f)
{
}
@ -492,7 +492,7 @@ LLColor4 LLTexLayerParamColor::getNetColor() const
// <FS:Ansariel> [Legacy Bake]
//void LLTexLayerParamColor::setWeight(F32 weight)
void LLTexLayerParamColor::setWeight(F32 weight, BOOL upload_bake)
void LLTexLayerParamColor::setWeight(F32 weight, bool upload_bake)
{
if (mIsAnimating)
{
@ -535,14 +535,14 @@ void LLTexLayerParamColor::setWeight(F32 weight, BOOL upload_bake)
// <FS:Ansariel> [Legacy Bake]
//void LLTexLayerParamColor::setAnimationTarget(F32 target_value)
void LLTexLayerParamColor::setAnimationTarget(F32 target_value, BOOL upload_bake)
void LLTexLayerParamColor::setAnimationTarget(F32 target_value, bool upload_bake)
{
// set value first then set interpolating flag to ignore further updates
mTargetWeight = target_value;
// <FS:Ansariel> [Legacy Bake]
//setWeight(target_value);
setWeight(target_value, upload_bake);
mIsAnimating = TRUE;
mIsAnimating = true;
if (mNext)
{
// <FS:Ansariel> [Legacy Bake]
@ -553,7 +553,7 @@ void LLTexLayerParamColor::setAnimationTarget(F32 target_value, BOOL upload_bake
// <FS:Ansariel> [Legacy Bake]
//void LLTexLayerParamColor::animate(F32 delta)
void LLTexLayerParamColor::animate(F32 delta, BOOL upload_bake)
void LLTexLayerParamColor::animate(F32 delta, bool upload_bake)
{
if (mNext)
{

View File

@ -48,7 +48,7 @@ class LLTexLayerParam : public LLViewerVisualParam
public:
LLTexLayerParam(LLTexLayerInterface *layer);
LLTexLayerParam(LLAvatarAppearance *appearance);
/*virtual*/ BOOL setInfo(LLViewerVisualParamInfo *info, BOOL add_to_appearance);
/*virtual*/ bool setInfo(LLViewerVisualParamInfo *info, bool add_to_appearance);
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const = 0;
protected:
@ -74,15 +74,15 @@ public:
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
// LLVisualParam Virtual functions
///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
///*virtual*/ bool parseData(LLXmlTreeNode* node);
/*virtual*/ void apply( ESex avatar_sex ) {}
// <FS:Ansariel> [Legacy Bake]
///*virtual*/ void setWeight(F32 weight);
///*virtual*/ void setAnimationTarget(F32 target_value);
///*virtual*/ void animate(F32 delta);
/*virtual*/ void setWeight(F32 weight, BOOL upload_bake);
/*virtual*/ void setAnimationTarget(F32 target_value, BOOL upload_bake);
/*virtual*/ void animate(F32 delta, BOOL upload_bake);
/*virtual*/ void setWeight(F32 weight, bool upload_bake);
/*virtual*/ void setAnimationTarget(F32 target_value, bool upload_bake);
/*virtual*/ void animate(F32 delta, bool upload_bake);
// </FS:Ansariel> [Legacy Bake]
// LLViewerVisualParam Virtual functions
@ -100,10 +100,10 @@ public:
// </FS:ND>
// New functions
BOOL render( S32 x, S32 y, S32 width, S32 height );
BOOL getSkip() const;
bool render( S32 x, S32 y, S32 width, S32 height );
bool getSkip() const;
void deleteCaches();
BOOL getMultiplyBlend() const;
bool getMultiplyBlend() const;
private:
LLTexLayerParamAlpha(const LLTexLayerParamAlpha& pOther);
@ -111,8 +111,8 @@ private:
LLPointer<LLGLTexture> mCachedProcessedTexture;
LLPointer<LLImageTGA> mStaticImageTGA;
LLPointer<LLImageRaw> mStaticImageRaw;
std::atomic<BOOL> mNeedsCreateTexture;
BOOL mStaticImageInvalid;
std::atomic<bool> mNeedsCreateTexture;
bool mStaticImageInvalid;
LL_ALIGN_16(LLVector4a mAvgDistortionVec);
F32 mCachedEffectiveWeight;
@ -135,8 +135,8 @@ public:
private:
std::string mStaticImageFileName;
BOOL mMultiplyBlend;
BOOL mSkipIfZeroWeight;
bool mMultiplyBlend;
bool mSkipIfZeroWeight;
F32 mDomain;
};
//
@ -168,15 +168,15 @@ public:
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
// LLVisualParam Virtual functions
///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
///*virtual*/ bool parseData(LLXmlTreeNode* node);
/*virtual*/ void apply( ESex avatar_sex ) {}
// <FS:Ansariel> [Legacy Bake]
///*virtual*/ void setWeight(F32 weight);
///*virtual*/ void setAnimationTarget(F32 target_value);
///*virtual*/ void animate(F32 delta);
/*virtual*/ void setWeight(F32 weight, BOOL upload_bake);
/*virtual*/ void setAnimationTarget(F32 target_value, BOOL upload_bake);
/*virtual*/ void animate(F32 delta, BOOL upload_bake);
/*virtual*/ void setWeight(F32 weight, bool upload_bake);
/*virtual*/ void setAnimationTarget(F32 target_value, bool upload_bake);
/*virtual*/ void animate(F32 delta, bool upload_bake);
// </FS:Ansariel> [Legacy Bake]

View File

@ -39,12 +39,12 @@
LLViewerVisualParamInfo::LLViewerVisualParamInfo()
:
mWearableType( LLWearableType::WT_INVALID ),
mCrossWearable(FALSE),
mCrossWearable(false),
mCamDist( 0.5f ),
mCamAngle( 0.f ),
mCamElevation( 0.f ),
mEditGroupDisplayOrder( 0 ),
mShowSimple(FALSE),
mShowSimple(false),
mSimpleMin(0.f),
mSimpleMax(100.f)
{
@ -82,7 +82,7 @@ bool LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node)
static LLStdStringHandle cross_wearable_string = LLXmlTree::addAttributeString("cross_wearable");
if (!node->getFastAttributeBOOL(cross_wearable_string, mCrossWearable))
{
mCrossWearable = FALSE;
mCrossWearable = false;
}
// Optional camera offsets from the current joint center. Used for generating "hints" (thumbnails).
@ -146,7 +146,7 @@ LLViewerVisualParam::~LLViewerVisualParam()
// setInfo()
//-----------------------------------------------------------------------------
BOOL LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info)
bool LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info)
{
llassert(mInfo == NULL);
if (info->mID < 0)
@ -155,7 +155,7 @@ BOOL LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info)
mID = info->mID;
// <FS:Ansariel> [Legacy Bake]
//setWeight(getDefaultWeight());
setWeight(getDefaultWeight(), FALSE);
setWeight(getDefaultWeight(), false);
return true;
}

View File

@ -49,13 +49,13 @@ public:
protected:
S32 mWearableType;
BOOL mCrossWearable;
bool mCrossWearable;
std::string mEditGroup;
F32 mCamDist;
F32 mCamAngle; // degrees
F32 mCamElevation;
F32 mEditGroupDisplayOrder;
BOOL mShowSimple; // show edit controls when in "simple ui" mode?
bool mShowSimple; // show edit controls when in "simple ui" mode?
F32 mSimpleMin; // when in simple UI, apply this minimum, range 0.f to 100.f
F32 mSimpleMax; // when in simple UI, apply this maximum, range 0.f to 100.f
};
@ -75,12 +75,12 @@ public:
// Special: These functions are overridden by child classes
LLViewerVisualParamInfo *getInfo() const { return (LLViewerVisualParamInfo*)mInfo; };
// This sets mInfo and calls initialization functions
BOOL setInfo(LLViewerVisualParamInfo *info);
bool setInfo(LLViewerVisualParamInfo *info);
virtual LLViewerVisualParam* cloneParam(LLWearable* wearable) const = 0;
// LLVisualParam Virtual functions
///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
///*virtual*/ bool parseData(LLXmlTreeNode* node);
// New Virtual functions
virtual F32 getTotalDistortion() = 0;
@ -99,11 +99,11 @@ public:
F32 getCameraAngle() const { return getInfo()->mCamAngle; } // degrees
F32 getCameraElevation() const { return getInfo()->mCamElevation; }
BOOL getShowSimple() const { return getInfo()->mShowSimple; }
bool getShowSimple() const { return getInfo()->mShowSimple; }
F32 getSimpleMin() const { return getInfo()->mSimpleMin; }
F32 getSimpleMax() const { return getInfo()->mSimpleMax; }
BOOL getCrossWearable() const { return getInfo()->mCrossWearable; }
bool getCrossWearable() const { return getInfo()->mCrossWearable; }
protected:
LLViewerVisualParam(const LLViewerVisualParam& pOther);

View File

@ -89,14 +89,14 @@ LLAssetType::EType LLWearable::getAssetType() const
return LLWearableType::getInstance()->getAssetType(mType);
}
BOOL LLWearable::exportFile(const std::string& filename) const
bool LLWearable::exportFile(const std::string& filename) const
{
llofstream ofs(filename.c_str(), std::ios_base::out | std::ios_base::trunc | std::ios_base::binary);
return ofs.is_open() && exportStream(ofs);
}
// virtual
BOOL LLWearable::exportStream( std::ostream& output_stream ) const
bool LLWearable::exportStream( std::ostream& output_stream ) const
{
if (!output_stream.good()) return false;
@ -472,7 +472,7 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
return LLWearable::SUCCESS;
}
BOOL LLWearable::getNextPopulatedLine(std::istream& input_stream, char* buffer, U32 buffer_size)
bool LLWearable::getNextPopulatedLine(std::istream& input_stream, char* buffer, U32 buffer_size)
{
if (!input_stream.good())
{
@ -555,7 +555,7 @@ void LLWearable::revertValues()
F32 value = vp_pair.second;
// <FS:Ansariel> [Legacy Bake]
//setVisualParamWeight(id, value);
setVisualParamWeight(id, value, TRUE);
setVisualParamWeight(id, value, true);
mSavedVisualParamMap[id] = param->getWeight();
}
}
@ -641,7 +641,7 @@ void LLWearable::addVisualParam(LLVisualParam *param)
{
delete mVisualParamIndexMap[param->getID()];
}
param->setIsDummy(FALSE);
param->setIsDummy(false);
param->setParamLocation(LOC_WEARABLE);
mVisualParamIndexMap[param->getID()] = param;
mSavedVisualParamMap[param->getID()] = param->getDefaultWeight();
@ -650,7 +650,7 @@ void LLWearable::addVisualParam(LLVisualParam *param)
// <FS:Ansariel> [Legacy Bake]
//void LLWearable::setVisualParamWeight(S32 param_index, F32 value)
void LLWearable::setVisualParamWeight(S32 param_index, F32 value, BOOL upload_bake)
void LLWearable::setVisualParamWeight(S32 param_index, F32 value, bool upload_bake)
{
if( is_in_map(mVisualParamIndexMap, param_index ) )
{
@ -697,7 +697,7 @@ void LLWearable::getVisualParams(visual_param_vec_t &list)
// <FS:Ansariel> [Legacy Bake]
//void LLWearable::animateParams(F32 delta)
void LLWearable::animateParams(F32 delta, BOOL upload_bake)
void LLWearable::animateParams(F32 delta, bool upload_bake)
{
for(visual_param_index_map_t::value_type& vp_pair : mVisualParamIndexMap)
{
@ -724,7 +724,7 @@ LLColor4 LLWearable::getClothesColor(S32 te) const
// <FS:Ansariel> [Legacy Bake]
//void LLWearable::setClothesColor( S32 te, const LLColor4& new_color)
void LLWearable::setClothesColor( S32 te, const LLColor4& new_color, BOOL upload_bake)
void LLWearable::setClothesColor( S32 te, const LLColor4& new_color, bool upload_bake)
{
U32 param_name[3];
if( LLAvatarAppearance::teToColorParams( (LLAvatarAppearanceDefines::ETextureIndex)te, param_name ) )
@ -754,7 +754,7 @@ void LLWearable::writeToAvatar(LLAvatarAppearance* avatarp)
// <FS:Ansariel> [Legacy Bake]
//avatarp->setVisualParamWeight( param_id, weight);
avatarp->setVisualParamWeight( param_id, weight, FALSE);
avatarp->setVisualParamWeight( param_id, weight, false);
}
}
}

View File

@ -96,9 +96,9 @@ public:
SUCCESS,
BAD_HEADER
};
BOOL exportFile(const std::string& filename) const;
bool exportFile(const std::string& filename) const;
EImportResult importFile(const std::string& filename, LLAvatarAppearance* avatarp );
virtual BOOL exportStream( std::ostream& output_stream ) const;
virtual bool exportStream( std::ostream& output_stream ) const;
virtual EImportResult importStream( std::istream& input_stream, LLAvatarAppearance* avatarp );
static void setCurrentDefinitionVersion( S32 version ) { LLWearable::sCurrentDefinitionVersion = version; }
@ -112,18 +112,18 @@ public:
void addVisualParam(LLVisualParam *param);
// <FS:Ansariel> [Legacy Bake]
//void setVisualParamWeight(S32 index, F32 value);
void setVisualParamWeight(S32 index, F32 value, BOOL upload_bake);
void setVisualParamWeight(S32 index, F32 value, bool upload_bake);
F32 getVisualParamWeight(S32 index) const;
LLVisualParam* getVisualParam(S32 index) const;
void getVisualParams(visual_param_vec_t &list);
// <FS:Ansariel> [Legacy Bake]
//void animateParams(F32 delta);
void animateParams(F32 delta, BOOL upload_bake);
void animateParams(F32 delta, bool upload_bake);
LLColor4 getClothesColor(S32 te) const;
// <FS:Ansariel> [Legacy Bake]
//void setClothesColor( S32 te, const LLColor4& new_color);
void setClothesColor( S32 te, const LLColor4& new_color, BOOL upload_bake);
void setClothesColor( S32 te, const LLColor4& new_color, bool upload_bake);
virtual void revertValues();
virtual void saveValues();
@ -144,7 +144,7 @@ protected:
void destroyTextures();
void createVisualParams(LLAvatarAppearance *avatarp);
void createLayers(S32 te, LLAvatarAppearance *avatarp);
BOOL getNextPopulatedLine(std::istream& input_stream, char* buffer, U32 buffer_size);
bool getNextPopulatedLine(std::istream& input_stream, char* buffer, U32 buffer_size);
static S32 sCurrentDefinitionVersion; // Depends on the current state of the avatar_lad.xml.
S32 mDefinitionVersion; // Depends on the state of the avatar_lad.xml when this asset was created.

View File

@ -87,7 +87,7 @@ void LLWearableData::setWearable(const LLWearableType::EType type, U32 index, LL
{
wearable_vec[index] = wearable;
old_wearable->setUpdated();
const BOOL removed = FALSE;
const bool removed = false;
wearableUpdated(wearable, removed);
}
}
@ -116,14 +116,14 @@ void LLWearableData::pushWearable(const LLWearableType::EType type,
// mWearableDatas[type].push_back(wearable); mWearableDatas[type].push_back(wearable);
if (trigger_updated)
{
const BOOL removed = FALSE;
const bool removed = false;
wearableUpdated(wearable, removed);
}
}
}
// virtual
void LLWearableData::wearableUpdated(LLWearable *wearable, BOOL removed)
void LLWearableData::wearableUpdated(LLWearable *wearable, bool removed)
{
wearable->setUpdated();
if (!removed)
@ -155,7 +155,7 @@ void LLWearableData::eraseWearable(const LLWearableType::EType type, U32 index)
if (wearable)
{
mWearableDatas[type].erase(mWearableDatas[type].begin() + index);
const BOOL removed = TRUE;
const bool removed = true;
wearableUpdated(wearable, removed);
}
}
@ -211,7 +211,7 @@ void LLWearableData::pullCrossWearableValues(const LLWearableType::EType type)
}
BOOL LLWearableData::getWearableIndex(const LLWearable *wearable, U32& index_found) const
bool LLWearableData::getWearableIndex(const LLWearable *wearable, U32& index_found) const
{
if (wearable == NULL)
{
@ -253,7 +253,7 @@ U32 LLWearableData::getClothingLayerCount() const
return count;
}
BOOL LLWearableData::canAddWearable(const LLWearableType::EType type) const
bool LLWearableData::canAddWearable(const LLWearableType::EType type) const
{
LLAssetType::EType a_type = LLWearableType::getInstance()->getAssetType(type);
if (a_type==LLAssetType::AT_CLOTHING)
@ -271,7 +271,7 @@ BOOL LLWearableData::canAddWearable(const LLWearableType::EType type) const
}
}
BOOL LLWearableData::isOnTop(LLWearable* wearable) const
bool LLWearableData::isOnTop(LLWearable* wearable) const
{
if (!wearable) return false;
const LLWearableType::EType type = wearable->getType();
@ -357,7 +357,7 @@ U32 LLWearableData::getWearableCount(const U32 tex_index) const
// <FS:Ansariel> [Legacy Bake]
LLUUID LLWearableData::computeBakedTextureHash(LLAvatarAppearanceDefines::EBakedTextureIndex baked_index,
BOOL generate_valid_hash) // Set to false if you want to upload the baked texture w/o putting it in the cache
bool generate_valid_hash) // Set to false if you want to upload the baked texture w/o putting it in the cache
{
LLUUID hash_id;
bool hash_computed = false;

View File

@ -60,11 +60,11 @@ public:
const LLWearable* getBottomWearable(const LLWearableType::EType type) const;
U32 getWearableCount(const LLWearableType::EType type) const;
U32 getWearableCount(const U32 tex_index) const;
BOOL getWearableIndex(const LLWearable *wearable, U32& index) const;
bool getWearableIndex(const LLWearable *wearable, U32& index) const;
U32 getClothingLayerCount() const;
BOOL canAddWearable(const LLWearableType::EType type) const;
bool canAddWearable(const LLWearableType::EType type) const;
BOOL isOnTop(LLWearable* wearable) const;
bool isOnTop(LLWearable* wearable) const;
static const U32 MAX_CLOTHING_LAYERS = 60;
@ -76,7 +76,7 @@ protected:
void setWearable(const LLWearableType::EType type, U32 index, LLWearable *wearable);
void pushWearable(const LLWearableType::EType type, LLWearable *wearable,
bool trigger_updated = true);
virtual void wearableUpdated(LLWearable *wearable, BOOL removed);
virtual void wearableUpdated(LLWearable *wearable, bool removed);
void eraseWearable(LLWearable *wearable);
void eraseWearable(const LLWearableType::EType type, U32 index);
// void clearWearableType(const LLWearableType::EType type);
@ -91,7 +91,7 @@ private:
//--------------------------------------------------------------------
public:
LLUUID computeBakedTextureHash(LLAvatarAppearanceDefines::EBakedTextureIndex baked_index,
BOOL generate_valid_hash = TRUE);
bool generate_valid_hash = true);
protected:
virtual void invalidateBakedTextureHash(LLMD5& hash) const {}
// </FS:Ansariel> [Legacy Bake]

View File

@ -32,30 +32,30 @@
LLWearableType::LLWearableDictionary::LLWearableDictionary(LLTranslationBridge::ptr_t& trans)
{
addEntry(LLWearableType::WT_SHAPE, new WearableEntry(trans, "shape", "New Shape", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SHAPE, FALSE, FALSE));
addEntry(LLWearableType::WT_SKIN, new WearableEntry(trans, "skin", "New Skin", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SKIN, FALSE, FALSE));
addEntry(LLWearableType::WT_HAIR, new WearableEntry(trans, "hair", "New Hair", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_HAIR, FALSE, FALSE));
addEntry(LLWearableType::WT_EYES, new WearableEntry(trans, "eyes", "New Eyes", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_EYES, FALSE, FALSE));
addEntry(LLWearableType::WT_SHIRT, new WearableEntry(trans, "shirt", "New Shirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHIRT, FALSE, TRUE));
addEntry(LLWearableType::WT_PANTS, new WearableEntry(trans, "pants", "New Pants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PANTS, FALSE, TRUE));
addEntry(LLWearableType::WT_SHOES, new WearableEntry(trans, "shoes", "New Shoes", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHOES, FALSE, TRUE));
addEntry(LLWearableType::WT_SOCKS, new WearableEntry(trans, "socks", "New Socks", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SOCKS, FALSE, TRUE));
addEntry(LLWearableType::WT_JACKET, new WearableEntry(trans, "jacket", "New Jacket", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_JACKET, FALSE, TRUE));
addEntry(LLWearableType::WT_GLOVES, new WearableEntry(trans, "gloves", "New Gloves", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_GLOVES, FALSE, TRUE));
addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry(trans, "undershirt", "New Undershirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERSHIRT, FALSE, TRUE));
addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry(trans, "underpants", "New Underpants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERPANTS, FALSE, TRUE));
addEntry(LLWearableType::WT_SKIRT, new WearableEntry(trans, "skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SKIRT, FALSE, TRUE));
addEntry(LLWearableType::WT_ALPHA, new WearableEntry(trans, "alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE));
addEntry(LLWearableType::WT_TATTOO, new WearableEntry(trans, "tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE));
addEntry(LLWearableType::WT_UNIVERSAL, new WearableEntry(trans, "universal", "New Universal", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNIVERSAL, FALSE, TRUE));
addEntry(LLWearableType::WT_SHAPE, new WearableEntry(trans, "shape", "New Shape", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SHAPE, false, false));
addEntry(LLWearableType::WT_SKIN, new WearableEntry(trans, "skin", "New Skin", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SKIN, false, false));
addEntry(LLWearableType::WT_HAIR, new WearableEntry(trans, "hair", "New Hair", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_HAIR, false, false));
addEntry(LLWearableType::WT_EYES, new WearableEntry(trans, "eyes", "New Eyes", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_EYES, false, false));
addEntry(LLWearableType::WT_SHIRT, new WearableEntry(trans, "shirt", "New Shirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHIRT, false, true));
addEntry(LLWearableType::WT_PANTS, new WearableEntry(trans, "pants", "New Pants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PANTS, false, true));
addEntry(LLWearableType::WT_SHOES, new WearableEntry(trans, "shoes", "New Shoes", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHOES, false, true));
addEntry(LLWearableType::WT_SOCKS, new WearableEntry(trans, "socks", "New Socks", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SOCKS, false, true));
addEntry(LLWearableType::WT_JACKET, new WearableEntry(trans, "jacket", "New Jacket", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_JACKET, false, true));
addEntry(LLWearableType::WT_GLOVES, new WearableEntry(trans, "gloves", "New Gloves", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_GLOVES, false, true));
addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry(trans, "undershirt", "New Undershirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERSHIRT, false, true));
addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry(trans, "underpants", "New Underpants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERPANTS, false, true));
addEntry(LLWearableType::WT_SKIRT, new WearableEntry(trans, "skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SKIRT, false, true));
addEntry(LLWearableType::WT_ALPHA, new WearableEntry(trans, "alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, false, true));
addEntry(LLWearableType::WT_TATTOO, new WearableEntry(trans, "tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, false, true));
addEntry(LLWearableType::WT_UNIVERSAL, new WearableEntry(trans, "universal", "New Universal", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNIVERSAL, false, true));
// [SL:KB] - Patch: Appearance-Misc | Checked: 2011-05-29 (Catznip-2.6)
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(trans, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, FALSE));
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(trans, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, true, false));
// [/SL:KB]
// addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(trans, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE));
// addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(trans, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, true, true));
addEntry(LLWearableType::WT_INVALID, new WearableEntry(trans, "invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_UNKNOWN, FALSE, FALSE));
addEntry(LLWearableType::WT_NONE, new WearableEntry(trans, "none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, FALSE, FALSE));
addEntry(LLWearableType::WT_INVALID, new WearableEntry(trans, "invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_UNKNOWN, false, false));
addEntry(LLWearableType::WT_NONE, new WearableEntry(trans, "none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, false, false));
}
@ -115,14 +115,14 @@ LLInventoryType::EIconName LLWearableType::getIconName(LLWearableType::EType typ
return entry->mIconName;
}
BOOL LLWearableType::getDisableCameraSwitch(LLWearableType::EType type)
bool LLWearableType::getDisableCameraSwitch(LLWearableType::EType type)
{
const WearableEntry *entry = mDictionary.lookup(type);
if (!entry) return false;
return entry->mDisableCameraSwitch;
}
BOOL LLWearableType::getAllowMultiwear(LLWearableType::EType type)
bool LLWearableType::getAllowMultiwear(LLWearableType::EType type)
{
const WearableEntry *entry = mDictionary.lookup(type);
if (!entry) return false;

View File

@ -72,8 +72,8 @@ public:
LLAssetType::EType getAssetType(EType type);
EType typeNameToType(const std::string& type_name);
LLInventoryType::EIconName getIconName(EType type);
BOOL getDisableCameraSwitch(EType type);
BOOL getAllowMultiwear(EType type);
bool getDisableCameraSwitch(EType type);
bool getAllowMultiwear(EType type);
static EType inventoryFlagsToWearableType(U32 flags);
@ -85,8 +85,8 @@ private:
const std::string& default_new_name,
LLAssetType::EType assetType,
LLInventoryType::EIconName iconName,
BOOL disable_camera_switch = FALSE,
BOOL allow_multiwear = TRUE) :
bool disable_camera_switch = false,
bool allow_multiwear = true) :
LLDictionaryEntry(name),
mAssetType(assetType),
mDefaultNewName(default_new_name),
@ -101,8 +101,8 @@ private:
const std::string mLabel;
const std::string mDefaultNewName;
LLInventoryType::EIconName mIconName;
BOOL mDisableCameraSwitch;
BOOL mAllowMultiwear;
bool mDisableCameraSwitch;
bool mAllowMultiwear;
};
class LLWearableDictionary : public LLDictionary<LLWearableType::EType, WearableEntry>

View File

@ -369,7 +369,7 @@ const char *LLAnimationLibrary::animStateToString( const LLUUID& state )
//-----------------------------------------------------------------------------
// Return the animation state for a given name
//-----------------------------------------------------------------------------
LLUUID LLAnimationLibrary::stringToAnimState( const std::string& name, BOOL allow_ids )
LLUUID LLAnimationLibrary::stringToAnimState( const std::string& name, bool allow_ids )
{
std::string lower_case_name(name);
LLStringUtil::toLower(lower_case_name);
@ -393,7 +393,7 @@ LLUUID LLAnimationLibrary::stringToAnimState( const std::string& name, BOOL allo
else if (allow_ids)
{
// try to convert string to LLUUID
id.set(name, FALSE);
id.set(name, false);
}
return id;

View File

@ -223,7 +223,7 @@ public:
// Return the animation state for the given name.
// Retun NULL if the name is invalid.
//-----------------------------------------------------------------------------
LLUUID stringToAnimState( const std::string& name, BOOL allow_ids = TRUE );
LLUUID stringToAnimState( const std::string& name, bool allow_ids = true );
//-----------------------------------------------------------------------------
// Associate an anim state with a name

View File

@ -184,7 +184,7 @@ LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &error
LL_DEBUGS("BVH") << "After translations and optimize" << LL_ENDL;
dumpBVHInfo();
mInitialized = TRUE;
mInitialized = true;
}
@ -232,7 +232,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName)
//--------------------------------------------------------------------
// load data one line at a time
//--------------------------------------------------------------------
BOOL loadingGlobals = FALSE;
bool loadingGlobals = false;
while ( getLine(fp) )
{
//----------------------------------------------------------------
@ -256,7 +256,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName)
if (strcmp(name, "GLOBALS")==0)
{
loadingGlobals = TRUE;
loadingGlobals = true;
continue;
}
}
@ -303,7 +303,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName)
if ( sscanf(mLine, " %*s = %f %f", &loop_in, &loop_out) == 2 )
{
mLoop = TRUE;
mLoop = true;
}
else if ( sscanf(mLine, " %*s = %127s", trueFalse) == 1 ) /* Flawfinder: ignore */
{
@ -501,8 +501,8 @@ void LLBVHLoader::makeTranslation(std::string alias_name, std::string joint_name
if (joint_name == "mPelvis")
{
newTrans.mRelativePositionKey = TRUE;
newTrans.mRelativeRotationKey = TRUE;
newTrans.mRelativePositionKey = true;
newTrans.mRelativeRotationKey = true;
}
}
@ -614,7 +614,7 @@ ELoadStatus LLBVHLoader::loadBVHFile(const char *buffer, char* error_text, S32 &
//--------------------------------------------------------------------
// consume joints
//--------------------------------------------------------------------
while (TRUE)
while (true)
{
//----------------------------------------------------------------
// get next line
@ -974,7 +974,7 @@ void LLBVHLoader::applyTranslations()
if ( trans.mIgnore )
{
//LL_INFOS() << "NOTE: Ignoring " << joint->mName.c_str() << LL_ENDL;
joint->mIgnore = TRUE;
joint->mIgnore = true;
continue;
}
@ -988,10 +988,10 @@ void LLBVHLoader::applyTranslations()
}
//Allow joint position changes as of SL-318
joint->mIgnorePositions = FALSE;
joint->mIgnorePositions = false;
if (joint->mNumChannels == 3)
{
joint->mIgnorePositions = TRUE;
joint->mIgnorePositions = true;
}
//----------------------------------------------------------------
@ -1000,13 +1000,13 @@ void LLBVHLoader::applyTranslations()
if ( trans.mRelativePositionKey )
{
// LL_INFOS() << "NOTE: Removing 1st position offset from all keys for " << joint->mOutName.c_str() << LL_ENDL;
joint->mRelativePositionKey = TRUE;
joint->mRelativePositionKey = true;
}
if ( trans.mRelativeRotationKey )
{
// LL_INFOS() << "NOTE: Removing 1st rotation from all keys for " << joint->mOutName.c_str() << LL_ENDL;
joint->mRelativeRotationKey = TRUE;
joint->mRelativeRotationKey = true;
}
if ( trans.mRelativePosition.magVec() > 0.0f )
@ -1070,8 +1070,8 @@ void LLBVHLoader::optimize()
for (Joint* joint : mJoints)
{
BOOL pos_changed = FALSE;
BOOL rot_changed = FALSE;
bool pos_changed = false;
bool rot_changed = false;
if ( ! joint->mIgnore )
{
@ -1084,7 +1084,7 @@ void LLBVHLoader::optimize()
// no keys?
if (first_key == joint->mKeys.end())
{
joint->mIgnore = TRUE;
joint->mIgnore = true;
continue;
}
@ -1097,13 +1097,13 @@ void LLBVHLoader::optimize()
{
// *FIX: use single frame to move pelvis
// if only one keyframe force output for this joint
rot_changed = TRUE;
rot_changed = true;
}
else
{
// if more than one keyframe, use first frame as reference and skip to second
first_key->mIgnorePos = TRUE;
first_key->mIgnoreRot = TRUE;
first_key->mIgnorePos = true;
first_key->mIgnoreRot = true;
++ki;
}
@ -1124,7 +1124,7 @@ void LLBVHLoader::optimize()
joint->mNumPosKeys++;
if (dist_vec_squared(LLVector3(ki_prev->mPos), first_frame_pos) > POSITION_MOTION_THRESHOLD_SQUARED)
{
pos_changed = TRUE;
pos_changed = true;
}
}
else
@ -1137,12 +1137,12 @@ void LLBVHLoader::optimize()
if (dist_vec_squared(current_pos, first_frame_pos) > POSITION_MOTION_THRESHOLD_SQUARED)
{
pos_changed = TRUE;
pos_changed = true;
}
if (dist_vec_squared(interp_pos, test_pos) < POSITION_KEYFRAME_THRESHOLD_SQUARED)
{
ki_prev->mIgnorePos = TRUE;
ki_prev->mIgnorePos = true;
numPosFramesConsidered++;
}
else
@ -1163,7 +1163,7 @@ void LLBVHLoader::optimize()
if (rot_test > ROTATION_MOTION_THRESHOLD)
{
rot_changed = TRUE;
rot_changed = true;
}
}
else
@ -1185,7 +1185,7 @@ void LLBVHLoader::optimize()
rot_test = x_delta + y_delta;
if (rot_test > ROTATION_MOTION_THRESHOLD)
{
rot_changed = TRUE;
rot_changed = true;
}
x_delta = dist_vec(LLVector3::x_axis * interp_rot, LLVector3::x_axis * test_rot);
y_delta = dist_vec(LLVector3::y_axis * interp_rot, LLVector3::y_axis * test_rot);
@ -1207,9 +1207,9 @@ void LLBVHLoader::optimize()
// because it's significantly faster.
if (diff_max > 0)
{
if (ki_max->mIgnoreRot == TRUE)
if (ki_max->mIgnoreRot == true)
{
ki_max->mIgnoreRot = FALSE;
ki_max->mIgnoreRot = false;
joint->mNumRotKeys++;
}
diff_max = 0;
@ -1218,7 +1218,7 @@ void LLBVHLoader::optimize()
else
{
// This keyframe isn't significant enough, throw it away.
ki_prev->mIgnoreRot = TRUE;
ki_prev->mIgnoreRot = true;
numRotFramesConsidered++;
// Store away the keyframe that has the largest deviation from the interpolated line, for insertion later.
if (rot_test > diff_max)
@ -1237,7 +1237,7 @@ void LLBVHLoader::optimize()
if (!(pos_changed || rot_changed))
{
//LL_INFOS() << "Ignoring joint " << joint->mName << LL_ENDL;
joint->mIgnore = TRUE;
joint->mIgnore = true;
}
}
}
@ -1250,13 +1250,13 @@ void LLBVHLoader::reset()
mDuration = 0.0f;
mPriority = 2;
mLoop = FALSE;
mLoop = false;
mLoopInPoint = 0.f;
mLoopOutPoint = 0.f;
mEaseIn = 0.3f;
mEaseOut = 0.3f;
mHand = 1;
mInitialized = FALSE;
mInitialized = false;
mEmoteName = "";
mLineNumber = 0;
@ -1269,8 +1269,8 @@ void LLBVHLoader::reset()
//------------------------------------------------------------------------
// <FS:ND> Remove LLVolatileAPRPool/apr_file_t and use FILE* instead
//BOOL LLBVHLoader::getLine(apr_file_t* fp)
BOOL LLBVHLoader::getLine(LLAPRFile::tFiletype* fp)
//bool LLBVHLoader::getLine(apr_file_t* fp)
bool LLBVHLoader::getLine(LLAPRFile::tFiletype* fp)
// </FS:ND>
{
if (apr_file_eof(fp) == APR_EOF)
@ -1296,7 +1296,7 @@ U32 LLBVHLoader::getOutputSize()
}
// writes contents to datapacker
BOOL LLBVHLoader::serialize(LLDataPacker& dp)
bool LLBVHLoader::serialize(LLDataPacker& dp)
{
F32 time;

View File

@ -71,8 +71,8 @@ struct Key
F32 mPos[3];
F32 mRot[3];
BOOL mIgnorePos;
BOOL mIgnoreRot;
bool mIgnorePos;
bool mIgnoreRot;
};
@ -89,10 +89,10 @@ struct Joint
Joint(const char *name)
{
mName = name;
mIgnore = FALSE;
mIgnorePositions = FALSE;
mRelativePositionKey = FALSE;
mRelativeRotationKey = FALSE;
mIgnore = false;
mIgnorePositions = false;
mRelativePositionKey = false;
mRelativeRotationKey = false;
mOutName = name;
mOrder[0] = 'X';
mOrder[1] = 'Y';
@ -111,10 +111,10 @@ struct Joint
LLVector3 mRelativePosition;
//
std::string mName;
BOOL mIgnore;
BOOL mIgnorePositions;
BOOL mRelativePositionKey;
BOOL mRelativeRotationKey;
bool mIgnore;
bool mIgnorePositions;
bool mRelativePositionKey;
bool mRelativeRotationKey;
std::string mOutName;
std::string mMergeParentName;
std::string mMergeChildName;
@ -161,18 +161,18 @@ class Translation
public:
Translation()
{
mIgnore = FALSE;
mIgnorePositions = FALSE;
mRelativePositionKey = FALSE;
mRelativeRotationKey = FALSE;
mIgnore = false;
mIgnorePositions = false;
mRelativePositionKey = false;
mRelativeRotationKey = false;
mPriorityModifier = 0;
}
std::string mOutName;
BOOL mIgnore;
BOOL mIgnorePositions;
BOOL mRelativePositionKey;
BOOL mRelativeRotationKey;
bool mIgnore;
bool mIgnorePositions;
bool mRelativePositionKey;
bool mRelativeRotationKey;
LLMatrix3 mFrameMatrix;
LLMatrix3 mOffsetMatrix;
LLVector3 mRelativePosition;
@ -293,7 +293,7 @@ public:
U32 getOutputSize();
// writes contents to datapacker
BOOL serialize(LLDataPacker& dp);
bool serialize(LLDataPacker& dp);
// flags redundant keyframe data
void optimize();
@ -302,7 +302,7 @@ public:
F32 getDuration() { return mDuration; }
BOOL isInitialized() { return mInitialized; }
bool isInitialized() { return mInitialized; }
ELoadStatus getStatus() { return mStatus; }
@ -312,10 +312,9 @@ public:
protected:
// Consumes one line of input from file.
// <FS:ND> Remove LLVolatileAPRPool/apr_file_t and use FILE* instead
// BOOL getLine(apr_file_t *fp);
BOOL getLine(LLAPRFile::tFiletype *fp);
// bool getLine(apr_file_t *fp);
bool getLine(LLAPRFile::tFiletype *fp);
// </FS:ND>
// parser state
@ -330,7 +329,7 @@ protected:
TranslationMap mTranslations;
S32 mPriority;
BOOL mLoop;
bool mLoop;
F32 mLoopInPoint;
F32 mLoopOutPoint;
F32 mEaseIn;
@ -338,7 +337,7 @@ protected:
S32 mHand;
std::string mEmoteName;
BOOL mInitialized;
bool mInitialized;
ELoadStatus mStatus;
// computed values

View File

@ -39,7 +39,7 @@
LLStringTable LLCharacter::sVisualParamNames(1024);
std::vector< LLCharacter* > LLCharacter::sInstances;
BOOL LLCharacter::sAllowInstancesChange = TRUE ;
bool LLCharacter::sAllowInstancesChange = true ;
//-----------------------------------------------------------------------------
// LLCharacter()
@ -122,7 +122,7 @@ LLJoint *LLCharacter::getJoint( const JointKey &name )
//-----------------------------------------------------------------------------
// registerMotion()
//-----------------------------------------------------------------------------
BOOL LLCharacter::registerMotion( const LLUUID& id, LLMotionConstructor create )
bool LLCharacter::registerMotion( const LLUUID& id, LLMotionConstructor create )
{
return mMotionController.registerMotion(id, create);
}
@ -155,7 +155,7 @@ LLMotion* LLCharacter::createMotion( const LLUUID &id )
//-----------------------------------------------------------------------------
// startMotion()
//-----------------------------------------------------------------------------
BOOL LLCharacter::startMotion(const LLUUID &id, F32 start_offset)
bool LLCharacter::startMotion(const LLUUID &id, F32 start_offset)
{
return mMotionController.startMotion(id, start_offset);
}
@ -164,7 +164,7 @@ BOOL LLCharacter::startMotion(const LLUUID &id, F32 start_offset)
//-----------------------------------------------------------------------------
// stopMotion()
//-----------------------------------------------------------------------------
BOOL LLCharacter::stopMotion(const LLUUID& id, BOOL stop_immediate)
bool LLCharacter::stopMotion(const LLUUID& id, bool stop_immediate)
{
return mMotionController.stopMotionLocally(id, stop_immediate);
}
@ -172,7 +172,7 @@ BOOL LLCharacter::stopMotion(const LLUUID& id, BOOL stop_immediate)
//-----------------------------------------------------------------------------
// isMotionActive()
//-----------------------------------------------------------------------------
BOOL LLCharacter::isMotionActive(const LLUUID& id)
bool LLCharacter::isMotionActive(const LLUUID& id)
{
LLMotion *motionp = mMotionController.findMotion(id);
if (motionp)
@ -288,8 +288,8 @@ void LLCharacter::removeAnimationData(std::string name)
// setVisualParamWeight()
//-----------------------------------------------------------------------------
// <FS:Ansariel> [Legacy Bake]
//BOOL LLCharacter::setVisualParamWeight(const LLVisualParam* which_param, F32 weight)
BOOL LLCharacter::setVisualParamWeight(const LLVisualParam* which_param, F32 weight, BOOL upload_bake)
//bool LLCharacter::setVisualParamWeight(const LLVisualParam* which_param, F32 weight)
bool LLCharacter::setVisualParamWeight(const LLVisualParam* which_param, F32 weight, bool upload_bake)
{
S32 index = which_param->getID();
visual_param_index_map_t::iterator index_iter = mVisualParamIndexMap.find(index);
@ -307,8 +307,8 @@ BOOL LLCharacter::setVisualParamWeight(const LLVisualParam* which_param, F32 wei
// setVisualParamWeight()
//-----------------------------------------------------------------------------
// <FS:Ansariel> [Legacy Bake]
//BOOL LLCharacter::setVisualParamWeight(const char* param_name, F32 weight)
BOOL LLCharacter::setVisualParamWeight(const char* param_name, F32 weight, BOOL upload_bake)
//bool LLCharacter::setVisualParamWeight(const char* param_name, F32 weight)
bool LLCharacter::setVisualParamWeight(const char* param_name, F32 weight, bool upload_bake)
{
std::string tname(param_name);
LLStringUtil::toLower(tname);
@ -329,8 +329,8 @@ BOOL LLCharacter::setVisualParamWeight(const char* param_name, F32 weight, BOOL
// setVisualParamWeight()
//-----------------------------------------------------------------------------
// <FS:Ansariel> [Legacy Bake]
//BOOL LLCharacter::setVisualParamWeight(S32 index, F32 weight)
BOOL LLCharacter::setVisualParamWeight(S32 index, F32 weight, BOOL upload_bake)
//bool LLCharacter::setVisualParamWeight(S32 index, F32 weight)
bool LLCharacter::setVisualParamWeight(S32 index, F32 weight, bool upload_bake)
{
visual_param_index_map_t::iterator index_iter = mVisualParamIndexMap.find(index);
if (index_iter != mVisualParamIndexMap.end())
@ -409,7 +409,7 @@ void LLCharacter::clearVisualParamWeights()
{
// <FS:Ansariel> [Legacy Bake]
//param->setWeight( param->getDefaultWeight());
param->setWeight( param->getDefaultWeight(), FALSE);
param->setWeight( param->getDefaultWeight(), false);
}
}
}

View File

@ -131,7 +131,7 @@ public:
//-------------------------------------------------------------------------
// registers a motion with the character
// returns true if successfull
BOOL registerMotion( const LLUUID& id, LLMotionConstructor create );
bool registerMotion( const LLUUID& id, LLMotionConstructor create );
void removeMotion( const LLUUID& id );
@ -143,13 +143,13 @@ public:
// start a motion
// returns true if successful, false if an error occurred
virtual BOOL startMotion( const LLUUID& id, F32 start_offset = 0.f);
virtual bool startMotion( const LLUUID& id, F32 start_offset = 0.f);
// stop a motion
virtual BOOL stopMotion( const LLUUID& id, BOOL stop_immediate = FALSE );
virtual bool stopMotion( const LLUUID& id, bool stop_immediate = false );
// is this motion active?
BOOL isMotionActive( const LLUUID& id );
bool isMotionActive( const LLUUID& id );
// Event handler for motion deactivation.
// Called when a motion has completely stopped and has been deactivated.
@ -162,7 +162,7 @@ public:
void updateMotions(e_update_t update_type);
LLAnimPauseRequest requestPause();
BOOL areAnimationsPaused() const { return mMotionController.isPaused(); }
bool areAnimationsPaused() const { return mMotionController.isPaused(); }
void setAnimTimeFactor(F32 factor) { mMotionController.setTimeFactor(factor); }
void setTimeStep(F32 time_step) { mMotionController.setTimeStep(time_step); }
@ -197,12 +197,12 @@ public:
void addSharedVisualParam(LLVisualParam *param);
// <FS:Ansariel> [Legacy Bake]
//virtual BOOL setVisualParamWeight(const LLVisualParam *which_param, F32 weight);
//virtual BOOL setVisualParamWeight(const char* param_name, F32 weight);
//virtual BOOL setVisualParamWeight(S32 index, F32 weight);
virtual BOOL setVisualParamWeight(const LLVisualParam *which_param, F32 weight, BOOL upload_bake = FALSE );
virtual BOOL setVisualParamWeight(const char* param_name, F32 weight, BOOL upload_bake = FALSE );
virtual BOOL setVisualParamWeight(S32 index, F32 weight, BOOL upload_bake = FALSE );
//virtual bool setVisualParamWeight(const LLVisualParam *which_param, F32 weight);
//virtual bool setVisualParamWeight(const char* param_name, F32 weight);
//virtual bool setVisualParamWeight(S32 index, F32 weight);
virtual bool setVisualParamWeight(const LLVisualParam *which_param, F32 weight, bool upload_bake = false );
virtual bool setVisualParamWeight(const char* param_name, F32 weight, bool upload_bake = false );
virtual bool setVisualParamWeight(S32 index, F32 weight, bool upload_bake = false );
// </FS:Ansariel> [Legacy Bake]
// get visual param weight by param or name
@ -267,7 +267,7 @@ public:
void setSkeletonSerialNum( U32 num ) { mSkeletonSerialNum = num; }
static std::vector< LLCharacter* > sInstances;
static BOOL sAllowInstancesChange ; //debug use
static bool sAllowInstancesChange ; //debug use
virtual void setHoverOffset(const LLVector3& hover_offset, bool send_update=true) { mHoverOffset = hover_offset; }
const LLVector3& getHoverOffset() const { return mHoverOffset; }

View File

@ -141,7 +141,7 @@ LLMotion::LLMotionInitStatus LLEditingMotion::onInitialize(LLCharacter *characte
//-----------------------------------------------------------------------------
// LLEditingMotion::onActivate()
//-----------------------------------------------------------------------------
BOOL LLEditingMotion::onActivate()
bool LLEditingMotion::onActivate()
{
// propagate joint positions to kinematic chain
// SL-315
@ -161,14 +161,14 @@ BOOL LLEditingMotion::onActivate()
//-----------------------------------------------------------------------------
// LLEditingMotion::onUpdate()
//-----------------------------------------------------------------------------
BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask)
bool LLEditingMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
LLVector3 focus_pt;
LLVector3* pointAtPt = (LLVector3*)mCharacter->getAnimationData("PointAtPoint");
BOOL result = true;
bool result = true;
if (!pointAtPt)
{

View File

@ -94,14 +94,14 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
// called when a motion is activated
// must return TRUE to indicate success, or else
// must return true to indicate success, or else
// it will be deactivated
virtual BOOL onActivate();
virtual bool onActivate();
// called per time step
// must return TRUE while it is active, and
// must return FALSE when the motion is completed.
virtual BOOL onUpdate(F32 time, U8* joint_mask);
// must return true while it is active, and
// must return false when the motion is completed.
virtual bool onUpdate(F32 time, U8* joint_mask);
// called when a motion is deactivated
virtual void onDeactivate();

View File

@ -91,14 +91,14 @@ const LLGesture &LLGesture::operator =(const LLGesture &rhs)
}
BOOL LLGesture::trigger(KEY key, MASK mask)
bool LLGesture::trigger(KEY key, MASK mask)
{
LL_WARNS() << "Parent class trigger called: you probably didn't mean this." << LL_ENDL;
return false;
}
BOOL LLGesture::trigger(const std::string& trigger_string)
bool LLGesture::trigger(const std::string& trigger_string)
{
LL_WARNS() << "Parent class trigger called: you probably didn't mean this." << LL_ENDL;
return false;
@ -189,12 +189,12 @@ void LLGestureList::deleteAll()
// Iterates through space delimited tokens in string, triggering any gestures found.
// Generates a revised string that has the found tokens replaced by their replacement strings
// and (as a minor side effect) has multiple spaces in a row replaced by single spaces.
BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::string* revised_string)
bool LLGestureList::triggerAndReviseString(const std::string &string, std::string* revised_string)
{
std::string tokenized = string;
BOOL found_gestures = FALSE;
BOOL first_token = TRUE;
bool found_gestures = false;
bool first_token = true;
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
boost::char_separator<char> sep(" ");
@ -235,7 +235,7 @@ BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::strin
}
}
found_gestures = TRUE;
found_gestures = true;
break;
}
gesture = NULL;
@ -251,14 +251,14 @@ BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::strin
revised_string->append( cur_token );
}
first_token = FALSE;
first_token = false;
}
return found_gestures;
}
BOOL LLGestureList::trigger(KEY key, MASK mask)
bool LLGestureList::trigger(KEY key, MASK mask)
{
for (U32 i = 0; i < mList.size(); i++)
{

View File

@ -55,10 +55,10 @@ public:
const std::string& getOutputString() const { return mOutputString; }
// Triggers if a key/mask matches it
virtual BOOL trigger(KEY key, MASK mask);
virtual bool trigger(KEY key, MASK mask);
// Triggers if case-insensitive substring matches (assumes string is lowercase)
virtual BOOL trigger(const std::string &string);
virtual bool trigger(const std::string &string);
// non-endian-neutral serialization
U8 *serialize(U8 *buffer) const;
@ -84,10 +84,10 @@ public:
virtual ~LLGestureList();
// Triggers if a key/mask matches one in the list
BOOL trigger(KEY key, MASK mask);
bool trigger(KEY key, MASK mask);
// Triggers if substring matches and generates revised string.
BOOL triggerAndReviseString(const std::string &string, std::string* revised_string);
bool triggerAndReviseString(const std::string &string, std::string* revised_string);
// Used for construction from UI
S32 count() const { return mList.size(); }

View File

@ -98,7 +98,7 @@ LLMotion::LLMotionInitStatus LLHandMotion::onInitialize(LLCharacter *character)
//-----------------------------------------------------------------------------
// LLHandMotion::onActivate()
//-----------------------------------------------------------------------------
BOOL LLHandMotion::onActivate()
bool LLHandMotion::onActivate()
{
LLPolyMesh *upperBodyMesh = mCharacter->getUpperBodyMesh();
@ -119,7 +119,7 @@ BOOL LLHandMotion::onActivate()
//-----------------------------------------------------------------------------
// LLHandMotion::onUpdate()
//-----------------------------------------------------------------------------
BOOL LLHandMotion::onUpdate(F32 time, U8* joint_mask)
bool LLHandMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
eHandPose *requestedHandPose;

View File

@ -107,14 +107,14 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
// called when a motion is activated
// must return TRUE to indicate success, or else
// it will be deactivated
virtual BOOL onActivate();
// must return true to indicate success, or else
// it will be deactivated
virtual bool onActivate();
// called per time step
// must return TRUE while it is active, and
// must return FALSE when the motion is completed.
virtual BOOL onUpdate(F32 time, U8* joint_mask);
// must return true while it is active, and
// must return false when the motion is completed.
virtual bool onUpdate(F32 time, U8* joint_mask);
// called when a motion is deactivated
virtual void onDeactivate();

View File

@ -164,7 +164,7 @@ LLMotion::LLMotionInitStatus LLHeadRotMotion::onInitialize(LLCharacter *characte
//-----------------------------------------------------------------------------
// LLHeadRotMotion::onActivate()
//-----------------------------------------------------------------------------
BOOL LLHeadRotMotion::onActivate()
bool LLHeadRotMotion::onActivate()
{
return true;
}
@ -173,7 +173,7 @@ BOOL LLHeadRotMotion::onActivate()
//-----------------------------------------------------------------------------
// LLHeadRotMotion::onUpdate()
//-----------------------------------------------------------------------------
BOOL LLHeadRotMotion::onUpdate(F32 time, U8* joint_mask)
bool LLHeadRotMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
LLQuaternion targetHeadRotWorld;
@ -279,7 +279,7 @@ LLEyeMotion::LLEyeMotion(const LLUUID &id) : LLMotion(id)
mEyeLookAwayPitch = 0.f;
mEyeBlinkTime = 0.f;
mEyesClosed = FALSE;
mEyesClosed = false;
mHeadJoint = NULL;
@ -362,7 +362,7 @@ LLMotion::LLMotionInitStatus LLEyeMotion::onInitialize(LLCharacter *character)
//-----------------------------------------------------------------------------
// LLEyeMotion::onActivate()
//-----------------------------------------------------------------------------
BOOL LLEyeMotion::onActivate()
bool LLEyeMotion::onActivate()
{
return true;
}
@ -373,7 +373,7 @@ BOOL LLEyeMotion::onActivate()
void LLEyeMotion::adjustEyeTarget(LLVector3* targetPos, LLJointState& left_eye_state, LLJointState& right_eye_state)
{
// Compute eye rotation.
BOOL has_eye_target = FALSE;
bool has_eye_target = false;
LLQuaternion target_eye_rot;
LLVector3 eye_look_at;
F32 vergence;
@ -385,7 +385,7 @@ void LLEyeMotion::adjustEyeTarget(LLVector3* targetPos, LLJointState& left_eye_s
LLVector3 up;
eye_look_at = *targetPos;
has_eye_target = TRUE;
has_eye_target = true;
F32 lookAtDistance = eye_look_at.normVec();
left.setVec(skyward % eye_look_at);
@ -460,7 +460,7 @@ void LLEyeMotion::adjustEyeTarget(LLVector3* targetPos, LLJointState& left_eye_s
//-----------------------------------------------------------------------------
// LLEyeMotion::onUpdate()
//-----------------------------------------------------------------------------
BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask)
bool LLEyeMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
//calculate jitter
@ -508,7 +508,7 @@ BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask)
if (rightEyeBlinkMorph == 1.f)
{
mEyesClosed = TRUE;
mEyesClosed = true;
mEyeBlinkTime = EYE_BLINK_CLOSE_TIME;
mEyeBlinkTimer.reset();
}
@ -528,7 +528,7 @@ BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask)
if (rightEyeBlinkMorph == 0.f)
{
mEyesClosed = FALSE;
mEyesClosed = false;
mEyeBlinkTime = EYE_BLINK_MIN_TIME + ll_frand(EYE_BLINK_MAX_TIME - EYE_BLINK_MIN_TIME);
mEyeBlinkTimer.reset();
}

View File

@ -89,14 +89,14 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
// called when a motion is activated
// must return TRUE to indicate success, or else
// must return true to indicate success, or else
// it will be deactivated
virtual BOOL onActivate();
virtual bool onActivate();
// called per time step
// must return TRUE while it is active, and
// must return FALSE when the motion is completed.
virtual BOOL onUpdate(F32 time, U8* joint_mask);
// must return true while it is active, and
// must return false when the motion is completed.
virtual bool onUpdate(F32 time, U8* joint_mask);
// called when a motion is deactivated
virtual void onDeactivate();
@ -172,16 +172,16 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
// called when a motion is activated
// must return TRUE to indicate success, or else
// must return true to indicate success, or else
// it will be deactivated
virtual BOOL onActivate();
virtual bool onActivate();
void adjustEyeTarget(LLVector3* targetPos, LLJointState& left_eye_state, LLJointState& right_eye_state);
// called per time step
// must return TRUE while it is active, and
// must return FALSE when the motion is completed.
virtual BOOL onUpdate(F32 time, U8* joint_mask);
// must return true while it is active, and
// must return false when the motion is completed.
virtual bool onUpdate(F32 time, U8* joint_mask);
// called when a motion is deactivated
virtual void onDeactivate();
@ -209,7 +209,7 @@ public:
// eye blinking
LLFrameTimer mEyeBlinkTimer;
F32 mEyeBlinkTime;
BOOL mEyesClosed;
bool mEyesClosed;
};
#endif // LL_LLHEADROTMOTION_H

View File

@ -123,10 +123,10 @@ void LLJoint::init()
{
mName = "unnamed";
mParent = NULL;
mXform.setScaleChildOffset(TRUE);
mXform.setScaleChildOffset(true);
mXform.setScale(LLVector3(1.0f, 1.0f, 1.0f));
mDirtyFlags = MATRIX_DIRTY | ROTATION_DIRTY | POSITION_DIRTY;
mUpdateXform = TRUE;
mUpdateXform = true;
mSupport = SUPPORT_BASE;
mEnd = LLVector3(0.0f, 0.0f, 0.0f);
}
@ -153,7 +153,7 @@ LLJoint::LLJoint(const std::string &name, LLJoint *parent) :
mJointNum(-2)
{
init();
mUpdateXform = FALSE;
mUpdateXform = false;
setName(name);
if (parent)
@ -1017,7 +1017,7 @@ void LLJoint::updateWorldMatrix()
if (mDirtyFlags & MATRIX_DIRTY)
{
sNumUpdates++;
mXform.updateMatrix(FALSE);
mXform.updateMatrix(false);
mWorldMatrix.loadu(mXform.getWorldMatrix());
mDirtyFlags = 0x0;
}

View File

@ -65,21 +65,21 @@ inline std::ostream& operator<<(std::ostream &aLHS, JointKey const &aRHS)
}
// </FS:ND>
const S32 LL_CHARACTER_MAX_JOINTS_PER_MESH = 15;
constexpr S32 LL_CHARACTER_MAX_JOINTS_PER_MESH = 15;
// Need to set this to count of animate-able joints,
// currently = #bones + #collision_volumes + #attachments + 2,
// rounded to next multiple of 4.
const U32 LL_CHARACTER_MAX_ANIMATED_JOINTS = 216; // must be divisible by 4!
const U32 LL_MAX_JOINTS_PER_MESH_OBJECT = 110;
constexpr U32 LL_CHARACTER_MAX_ANIMATED_JOINTS = 216; // must be divisible by 4!
constexpr U32 LL_MAX_JOINTS_PER_MESH_OBJECT = 110;
// These should be higher than the joint_num of any
// other joint, to avoid conflicts in updateMotionsByType()
const U32 LL_HAND_JOINT_NUM = (LL_CHARACTER_MAX_ANIMATED_JOINTS-1);
const U32 LL_FACE_JOINT_NUM = (LL_CHARACTER_MAX_ANIMATED_JOINTS-2);
const S32 LL_CHARACTER_MAX_PRIORITY = 7;
const F32 LL_MAX_PELVIS_OFFSET = 5.f;
constexpr U32 LL_HAND_JOINT_NUM = (LL_CHARACTER_MAX_ANIMATED_JOINTS-1);
constexpr U32 LL_FACE_JOINT_NUM = (LL_CHARACTER_MAX_ANIMATED_JOINTS-2);
constexpr S32 LL_CHARACTER_MAX_PRIORITY = 7;
constexpr F32 LL_MAX_PELVIS_OFFSET = 5.f;
const F32 LL_JOINT_TRESHOLD_POS_OFFSET = 0.0001f; //0.1 mm
constexpr F32 LL_JOINT_TRESHOLD_POS_OFFSET = 0.0001f; //0.1 mm
class LLVector3OverrideMap
{
@ -158,7 +158,7 @@ protected:
public:
U32 mDirtyFlags;
BOOL mUpdateXform;
bool mUpdateXform;
// describes the skin binding pose
LLVector3 mSkinOffset;
@ -305,7 +305,7 @@ public:
void clampRotation(LLQuaternion old_rot, LLQuaternion new_rot);
virtual BOOL isAnimatable() const { return true; }
virtual bool isAnimatable() const { return true; }
void addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh_id, const std::string& av_info, bool& active_override_changed );
void removeAttachmentPosOverride( const LLUUID& mesh_id, const std::string& av_info, bool& active_override_changed );

View File

@ -53,9 +53,9 @@ LLJointSolverRP3::LLJointSolverRP3()
mLengthAB = 1.0f;
mLengthBC = 1.0f;
mPoleVector.setVec( 1.0f, 0.0f, 0.0f );
mbUseBAxis = FALSE;
mbUseBAxis = false;
mTwist = 0.0f;
mFirstTime = TRUE;
mFirstTime = true;
}
@ -114,7 +114,7 @@ void LLJointSolverRP3::setBAxis( const LLVector3& bAxis )
{
mBAxis = bAxis;
mBAxis.normVec();
mbUseBAxis = TRUE;
mbUseBAxis = true;
}
//-----------------------------------------------------------------------------

View File

@ -97,11 +97,11 @@ protected:
LLVector3 mPoleVector;
LLVector3 mBAxis;
BOOL mbUseBAxis;
bool mbUseBAxis;
F32 mTwist;
BOOL mFirstTime;
bool mFirstTime;
LLMatrix4 mSavedJointAMat;
LLMatrix4 mSavedInvPlaneMat;

View File

@ -80,7 +80,7 @@ public:
// joint that this state is applied to
LLJoint* getJoint() { return mJoint; }
const LLJoint* getJoint() const { return mJoint; }
BOOL setJoint( LLJoint *joint ) { mJoint = joint; return mJoint != NULL; }
bool setJoint( LLJoint *joint ) { mJoint = joint; return mJoint != NULL; }
// transform type (bitwise flags can be combined)
// Note that these are set automatically when various

View File

@ -91,7 +91,7 @@ LLMotion::LLMotionInitStatus LLKeyframeFallMotion::onInitialize(LLCharacter *cha
//-----------------------------------------------------------------------------
// LLKeyframeFallMotion::onActivate()
//-----------------------------------------------------------------------------
BOOL LLKeyframeFallMotion::onActivate()
bool LLKeyframeFallMotion::onActivate()
{
LLVector3 ground_pos;
LLVector3 ground_normal;
@ -119,10 +119,10 @@ BOOL LLKeyframeFallMotion::onActivate()
//-----------------------------------------------------------------------------
// LLKeyframeFallMotion::onUpdate()
//-----------------------------------------------------------------------------
BOOL LLKeyframeFallMotion::onUpdate(F32 activeTime, U8* joint_mask)
bool LLKeyframeFallMotion::onUpdate(F32 activeTime, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
BOOL result = LLKeyframeMotion::onUpdate(activeTime, joint_mask);
bool result = LLKeyframeMotion::onUpdate(activeTime, joint_mask);
F32 slerp_amt = clamp_rescale(activeTime / getDuration(), 0.5f, 0.75f, 0.f, 1.f);
if (mPelvisState.notNull())

View File

@ -60,9 +60,9 @@ public:
// animation callbacks to be implemented by subclasses
//-------------------------------------------------------------------------
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
virtual BOOL onActivate();
virtual bool onActivate();
virtual F32 getEaseInDuration();
virtual BOOL onUpdate(F32 activeTime, U8* joint_mask);
virtual bool onUpdate(F32 activeTime, U8* joint_mask);
protected:
//-------------------------------------------------------------------------

View File

@ -68,7 +68,7 @@ static F32 MAX_CONSTRAINTS = 10;
//-----------------------------------------------------------------------------
LLKeyframeMotion::JointMotionList::JointMotionList()
: mDuration(0.f),
mLoop(FALSE),
mLoop(false),
mLoopInPoint(0.f),
mLoopOutPoint(0.f),
mEaseInDuration(0.f),
@ -508,7 +508,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact
LLAssetType::AT_ANIMATION,
onLoadComplete,
(void*)character_id,
FALSE);
false);
}
else
{
@ -568,7 +568,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact
U8 *anim_data;
S32 anim_file_size;
BOOL success = FALSE;
bool success = false;
LLFileSystem* anim_file = new LLFileSystem(mID, LLAssetType::AT_ANIMATION);
if (!anim_file || !anim_file->getSize())
{
@ -623,7 +623,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact
//-----------------------------------------------------------------------------
// setupPose()
//-----------------------------------------------------------------------------
BOOL LLKeyframeMotion::setupPose()
bool LLKeyframeMotion::setupPose()
{
// add all valid joint states to the pose
for (U32 jm=0; jm<mJointMotionList->getNumJointMotions(); jm++)
@ -662,7 +662,7 @@ BOOL LLKeyframeMotion::setupPose()
//-----------------------------------------------------------------------------
// LLKeyframeMotion::onActivate()
//-----------------------------------------------------------------------------
BOOL LLKeyframeMotion::onActivate()
bool LLKeyframeMotion::onActivate()
{
// If the keyframe anim has an associated emote, trigger it.
if( mJointMotionList->mEmoteName.length() > 0 )
@ -683,7 +683,7 @@ BOOL LLKeyframeMotion::onActivate()
//-----------------------------------------------------------------------------
// LLKeyframeMotion::onUpdate()
//-----------------------------------------------------------------------------
BOOL LLKeyframeMotion::onUpdate(F32 time, U8* joint_mask)
bool LLKeyframeMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
// llassert(time >= 0.f); // This will fire
@ -872,7 +872,7 @@ void LLKeyframeMotion::initializeConstraint(JointConstraint* constraint)
void LLKeyframeMotion::activateConstraint(JointConstraint* constraint)
{
JointConstraintSharedData *shared_data = constraint->mSharedData;
constraint->mActive = TRUE;
constraint->mActive = true;
S32 joint_num;
// grab ground position if we need to
@ -904,17 +904,17 @@ void LLKeyframeMotion::deactivateConstraint(JointConstraint *constraintp)
{
if (constraintp->mSourceVolume)
{
constraintp->mSourceVolume->mUpdateXform = FALSE;
constraintp->mSourceVolume->mUpdateXform = false;
}
if (constraintp->mSharedData->mConstraintTargetType != CONSTRAINT_TARGET_TYPE_GROUND)
{
if (constraintp->mTargetVolume)
{
constraintp->mTargetVolume->mUpdateXform = FALSE;
constraintp->mTargetVolume->mUpdateXform = false;
}
}
constraintp->mActive = FALSE;
constraintp->mActive = false;
}
//-----------------------------------------------------------------------------
@ -1091,9 +1091,9 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
// convert intermediate joint positions to world coordinates
positions[joint_num] = ( constraint->mPositions[joint_num] * mPelvisp->getWorldRotation()) + mPelvisp->getWorldPosition();
F32 time_constant = 1.f / clamp_rescale(constraint->mFixupDistanceRMS, 0.f, 0.5f, 0.2f, 8.f);
// LL_INFOS() << "Interpolant " << LLSmoothInterpolation::getInterpolant(time_constant, FALSE) << " and fixup distance " << constraint->mFixupDistanceRMS << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL;
positions[joint_num] = lerp(positions[joint_num], kinematic_position,
LLSmoothInterpolation::getInterpolant(time_constant, FALSE));
// LL_INFOS() << "Interpolant " << LLSmoothInterpolation::getInterpolant(time_constant, false) << " and fixup distance " << constraint->mFixupDistanceRMS << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL;
positions[joint_num] = lerp(positions[joint_num], kinematic_position,
LLSmoothInterpolation::getInterpolant(time_constant, false));
}
S32 iteration_count;
@ -1228,9 +1228,9 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
// allow_invalid_joints should be true when handling existing content, to avoid breakage.
// During upload, we should be more restrictive and reject such animations.
//-----------------------------------------------------------------------------
BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, bool allow_invalid_joints)
bool LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, bool allow_invalid_joints)
{
BOOL old_version = FALSE;
bool old_version = false;
std::unique_ptr<LLKeyframeMotion::JointMotionList> joint_motion_list(new LLKeyframeMotion::JointMotionList);
//-------------------------------------------------------------------------
@ -1254,7 +1254,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
if (version == 0 && sub_version == 1)
{
old_version = TRUE;
old_version = true;
}
else if (version != KEYFRAME_MOTION_VERSION || sub_version != KEYFRAME_MOTION_SUBVERSION)
{
@ -1355,7 +1355,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
if (female_land_anim == asset_id || formal_female_land_anim == asset_id)
{
LL_WARNS() << "Animation(" << asset_id << ") won't be looped." << LL_ENDL;
joint_motion_list->mLoop = FALSE;
joint_motion_list->mLoop = false;
}
//-------------------------------------------------------------------------
@ -1659,7 +1659,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
// scan position curve keys
//---------------------------------------------------------------------
PositionCurve *pCurve = &joint_motion->mPositionCurve;
BOOL is_pelvis = joint_motion->mJointName == "mPelvis";
bool is_pelvis = joint_motion->mJointName == "mPelvis";
for (S32 k = 0; k < joint_motion->mPositionCurve.mNumKeys; k++)
{
U16 time_short;
@ -1906,7 +1906,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
if (!constraintp->mTargetConstraintDir.isExactlyZero())
{
constraintp->mUseTargetOffset = TRUE;
constraintp->mUseTargetOffset = true;
// constraintp->mTargetConstraintDir *= constraintp->mSourceConstraintOffset.magVec();
}
@ -2001,9 +2001,9 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
//-----------------------------------------------------------------------------
// serialize()
//-----------------------------------------------------------------------------
BOOL LLKeyframeMotion::serialize(LLDataPacker& dp) const
bool LLKeyframeMotion::serialize(LLDataPacker& dp) const
{
BOOL success = true;
bool success = true;
LL_DEBUGS("BVH") << "serializing" << LL_ENDL;
@ -2286,7 +2286,7 @@ void LLKeyframeMotion::flushKeyframeCache()
//-----------------------------------------------------------------------------
// setLoop()
//-----------------------------------------------------------------------------
void LLKeyframeMotion::setLoop(BOOL loop)
void LLKeyframeMotion::setLoop(bool loop)
{
if (mJointMotionList)
{
@ -2534,7 +2534,7 @@ LLKeyframeMotion::JointConstraint::JointConstraint(JointConstraintSharedData* sh
{
mWeight = 0.f;
mTotalLength = 0.f;
mActive = FALSE;
mActive = false;
mSourceVolume = NULL;
mTargetVolume = NULL;
mFixupDistanceRMS = 0.f;

View File

@ -135,14 +135,14 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
// called when a motion is activated
// must return TRUE to indicate success, or else
// must return true to indicate success, or else
// it will be deactivated
virtual BOOL onActivate();
virtual bool onActivate();
// called per time step
// must return TRUE while it is active, and
// must return FALSE when the motion is completed.
virtual BOOL onUpdate(F32 time, U8* joint_mask);
// must return true while it is active, and
// must return false when the motion is completed.
virtual bool onUpdate(F32 time, U8* joint_mask);
// called when a motion is deactivated
virtual void onDeactivate();
@ -155,14 +155,14 @@ public:
public:
U32 getFileSize();
BOOL serialize(LLDataPacker& dp) const;
BOOL deserialize(LLDataPacker& dp, const LLUUID& asset_id, bool allow_invalid_joints = true);
BOOL isLoaded() { return mJointMotionList != NULL; }
bool serialize(LLDataPacker& dp) const;
bool deserialize(LLDataPacker& dp, const LLUUID& asset_id, bool allow_invalid_joints = true);
bool isLoaded() { return mJointMotionList != NULL; }
bool dumpToFile(const std::string& name);
// setters for modifying a keyframe animation
void setLoop(BOOL loop);
void setLoop(bool loop);
F32 getLoopIn() {
return (mJointMotionList) ? mJointMotionList->mLoopInPoint : 0.f;
@ -211,7 +211,7 @@ protected:
mEaseInStopTime(0.f),
mEaseOutStartTime(0.f),
mEaseOutStopTime(0.f),
mUseTargetOffset(FALSE),
mUseTargetOffset(false),
mConstraintType(CONSTRAINT_TYPE_POINT),
mConstraintTargetType(CONSTRAINT_TARGET_TYPE_BODY),
mSourceConstraintVolume(0),
@ -231,7 +231,7 @@ protected:
F32 mEaseInStopTime;
F32 mEaseOutStartTime;
F32 mEaseOutStopTime;
BOOL mUseTargetOffset;
bool mUseTargetOffset;
EConstraintType mConstraintType;
EConstraintTargetType mConstraintTargetType;
};
@ -251,7 +251,7 @@ protected:
LLVector3 mPositions[MAX_CHAIN_LENGTH];
F32 mJointLengths[MAX_CHAIN_LENGTH];
F32 mJointLengthFractions[MAX_CHAIN_LENGTH];
BOOL mActive;
bool mActive;
LLVector3d mGroundPos;
LLVector3 mGroundNorm;
LLJoint* mSourceVolume;
@ -271,7 +271,7 @@ protected:
void applyConstraint(JointConstraint* constraintp, F32 time, U8* joint_mask);
BOOL setupPose();
bool setupPose();
public:
enum AssetStatus { ASSET_LOADED, ASSET_FETCHED, ASSET_NEEDS_FETCH, ASSET_FETCH_FAILED, ASSET_UNDEFINED };

View File

@ -136,7 +136,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotionParam::onInitialize(LLCharacter *ch
//-----------------------------------------------------------------------------
// LLKeyframeMotionParam::onActivate()
//-----------------------------------------------------------------------------
BOOL LLKeyframeMotionParam::onActivate()
bool LLKeyframeMotionParam::onActivate()
{
for (motion_map_t::value_type& motion_pair : mParameterizedMotions)
{
@ -153,7 +153,7 @@ BOOL LLKeyframeMotionParam::onActivate()
//-----------------------------------------------------------------------------
// LLKeyframeMotionParam::onUpdate()
//-----------------------------------------------------------------------------
BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask)
bool LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
F32 weightFactor = 1.f / (F32)mParameterizedMotions.size();
@ -286,7 +286,7 @@ void LLKeyframeMotionParam::onDeactivate()
//-----------------------------------------------------------------------------
// LLKeyframeMotionParam::addKeyframeMotion()
//-----------------------------------------------------------------------------
BOOL LLKeyframeMotionParam::addKeyframeMotion(char *name, const LLUUID &id, char *param, F32 value)
bool LLKeyframeMotionParam::addKeyframeMotion(char *name, const LLUUID &id, char *param, F32 value)
{
LLMotion *newMotion = mCharacter->createMotion( id );
@ -325,7 +325,7 @@ void LLKeyframeMotionParam::setDefaultKeyframeMotion(char *name)
//-----------------------------------------------------------------------------
// loadMotions()
//-----------------------------------------------------------------------------
BOOL LLKeyframeMotionParam::loadMotions()
bool LLKeyframeMotionParam::loadMotions()
{
//-------------------------------------------------------------------------
// Load named file by concatenating the character prefix with the motion name.
@ -409,7 +409,7 @@ BOOL LLKeyframeMotionParam::loadMotions()
//-------------------------------------------------------------------------
// get priority
//-------------------------------------------------------------------------
BOOL isFirstMotion = TRUE;
bool isFirstMotion = true;
num = sscanf(p, "%79s %79s %f", strA, strB, &floatA); /* Flawfinder: ignore */
while(1)
@ -424,7 +424,7 @@ BOOL LLKeyframeMotionParam::loadMotions()
addKeyframeMotion(strA, gAnimLibrary.stringToAnimState(std::string(strA)), strB, floatA);
if (isFirstMotion)
{
isFirstMotion = FALSE;
isFirstMotion = false;
setDefaultKeyframeMotion(strA);
}

View File

@ -102,14 +102,14 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
// called when a motion is activated
// must return TRUE to indicate success, or else
// must return true to indicate success, or else
// it will be deactivated
virtual BOOL onActivate();
virtual bool onActivate();
// called per time step
// must return TRUE while it is active, and
// must return FALSE when the motion is completed.
virtual BOOL onUpdate(F32 time, U8* joint_mask);
// must return true while it is active, and
// must return false when the motion is completed.
virtual bool onUpdate(F32 time, U8* joint_mask);
// called when a motion is deactivated
virtual void onDeactivate();
@ -128,12 +128,12 @@ protected:
};
// add a motion and associated parameter triplet
BOOL addKeyframeMotion(char *name, const LLUUID &id, char *param, F32 value);
bool addKeyframeMotion(char *name, const LLUUID &id, char *param, F32 value);
// set default motion for LOD and retrieving blend constants
void setDefaultKeyframeMotion(char *);
BOOL loadMotions();
bool loadMotions();
protected:
//-------------------------------------------------------------------------

View File

@ -46,7 +46,7 @@ const F32 POSITION_THRESHOLD = 0.1f;
//-----------------------------------------------------------------------------
LLKeyframeStandMotion::LLKeyframeStandMotion(const LLUUID &id) : LLKeyframeMotion(id)
{
mFlipFeet = FALSE;
mFlipFeet = false;
mCharacter = NULL;
// create kinematic hierarchy
@ -67,7 +67,7 @@ LLKeyframeStandMotion::LLKeyframeStandMotion(const LLUUID &id) : LLKeyframeMotio
mKneeRightState = NULL;
mAnkleRightState = NULL;
mTrackAnkles = TRUE;
mTrackAnkles = true;
mFrameNum = 0;
}
@ -90,7 +90,7 @@ LLMotion::LLMotionInitStatus LLKeyframeStandMotion::onInitialize(LLCharacter *ch
// save character pointer for later use
mCharacter = character;
mFlipFeet = FALSE;
mFlipFeet = false;
// load keyframe data, setup pose and joint states
LLMotion::LLMotionInitStatus status = LLKeyframeMotion::onInitialize(character);
@ -129,7 +129,7 @@ LLMotion::LLMotionInitStatus LLKeyframeStandMotion::onInitialize(LLCharacter *ch
//-----------------------------------------------------------------------------
// LLKeyframeStandMotion::onActivate()
//-----------------------------------------------------------------------------
BOOL LLKeyframeStandMotion::onActivate()
bool LLKeyframeStandMotion::onActivate()
{
//-------------------------------------------------------------------------
// setup the IK solvers
@ -158,12 +158,12 @@ void LLKeyframeStandMotion::onDeactivate()
//-----------------------------------------------------------------------------
// LLKeyframeStandMotion::onUpdate()
//-----------------------------------------------------------------------------
BOOL LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask)
bool LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask)
{
//-------------------------------------------------------------------------
// let the base class update the cycle
//-------------------------------------------------------------------------
BOOL status = LLKeyframeMotion::onUpdate(time, joint_mask);
bool status = LLKeyframeMotion::onUpdate(time, joint_mask);
if (!status)
{
return false;
@ -185,16 +185,16 @@ BOOL LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask)
{
mLastGoodPelvisRotation = mPelvisState->getJoint()->getWorldRotation();
mLastGoodPelvisRotation.normalize();
mTrackAnkles = TRUE;
mTrackAnkles = true;
}
else if ((mCharacter->getCharacterPosition() - mLastGoodPosition).magVecSquared() > POSITION_THRESHOLD)
{
mLastGoodPosition = mCharacter->getCharacterPosition();
mTrackAnkles = TRUE;
mTrackAnkles = true;
}
else if (mPose.getWeight() < 1.f)
{
mTrackAnkles = TRUE;
mTrackAnkles = true;
}

View File

@ -63,9 +63,9 @@ public:
// animation callbacks to be implemented by subclasses
//-------------------------------------------------------------------------
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
virtual BOOL onActivate();
virtual bool onActivate();
void onDeactivate();
virtual BOOL onUpdate(F32 time, U8* joint_mask);
virtual bool onUpdate(F32 time, U8* joint_mask);
public:
//-------------------------------------------------------------------------
@ -85,7 +85,7 @@ public:
LLCharacter *mCharacter;
BOOL mFlipFeet;
bool mFlipFeet;
LLPointer<LLJointState> mPelvisState;
@ -109,7 +109,7 @@ public:
LLQuaternion mLastGoodPelvisRotation;
LLVector3 mLastGoodPosition;
BOOL mTrackAnkles;
bool mTrackAnkles;
S32 mFrameNum;
} LL_ALIGN_POSTFIX(16);

View File

@ -83,7 +83,7 @@ LLMotion::LLMotionInitStatus LLKeyframeWalkMotion::onInitialize(LLCharacter *cha
//-----------------------------------------------------------------------------
// LLKeyframeWalkMotion::onActivate()
//-----------------------------------------------------------------------------
BOOL LLKeyframeWalkMotion::onActivate()
bool LLKeyframeWalkMotion::onActivate()
{
mRealTimeLast = 0.0f;
mAdjTimeLast = 0.0f;
@ -103,7 +103,7 @@ void LLKeyframeWalkMotion::onDeactivate()
//-----------------------------------------------------------------------------
// LLKeyframeWalkMotion::onUpdate()
//-----------------------------------------------------------------------------
BOOL LLKeyframeWalkMotion::onUpdate(F32 time, U8* joint_mask)
bool LLKeyframeWalkMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
// compute time since last update
@ -174,7 +174,7 @@ LLMotion::LLMotionInitStatus LLWalkAdjustMotion::onInitialize(LLCharacter *chara
//-----------------------------------------------------------------------------
// LLWalkAdjustMotion::onActivate()
//-----------------------------------------------------------------------------
BOOL LLWalkAdjustMotion::onActivate()
bool LLWalkAdjustMotion::onActivate()
{
mAnimSpeed = 0.f;
mAdjustedSpeed = 0.f;
@ -197,7 +197,7 @@ BOOL LLWalkAdjustMotion::onActivate()
//-----------------------------------------------------------------------------
// LLWalkAdjustMotion::onUpdate()
//-----------------------------------------------------------------------------
BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask)
bool LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
// delta_time is guaranteed to be non zero
@ -365,7 +365,7 @@ LLMotion::LLMotionInitStatus LLFlyAdjustMotion::onInitialize(LLCharacter *charac
//-----------------------------------------------------------------------------
// LLFlyAdjustMotion::onActivate()
//-----------------------------------------------------------------------------
BOOL LLFlyAdjustMotion::onActivate()
bool LLFlyAdjustMotion::onActivate()
{
mPelvisState->setPosition(LLVector3::zero);
mPelvisState->setRotation(LLQuaternion::DEFAULT);
@ -376,7 +376,7 @@ BOOL LLFlyAdjustMotion::onActivate()
//-----------------------------------------------------------------------------
// LLFlyAdjustMotion::onUpdate()
//-----------------------------------------------------------------------------
BOOL LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask)
bool LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
LLVector3 ang_vel = mCharacter->getCharacterAngularVelocity() * mCharacter->getTimeDilation();

View File

@ -65,9 +65,9 @@ public:
// animation callbacks to be implemented by subclasses
//-------------------------------------------------------------------------
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
virtual BOOL onActivate();
virtual bool onActivate();
virtual void onDeactivate();
virtual BOOL onUpdate(F32 time, U8* joint_mask);
virtual bool onUpdate(F32 time, U8* joint_mask);
public:
//-------------------------------------------------------------------------
@ -100,9 +100,9 @@ public:
// animation callbacks to be implemented by subclasses
//-------------------------------------------------------------------------
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
virtual BOOL onActivate();
virtual bool onActivate();
virtual void onDeactivate();
virtual BOOL onUpdate(F32 time, U8* joint_mask);
virtual bool onUpdate(F32 time, U8* joint_mask);
virtual LLJoint::JointPriority getPriority(){return LLJoint::HIGH_PRIORITY;}
virtual bool getLoop() { return true; }
virtual F32 getDuration() { return 0.f; }
@ -150,9 +150,9 @@ public:
// animation callbacks to be implemented by subclasses
//-------------------------------------------------------------------------
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
virtual BOOL onActivate();
virtual bool onActivate();
virtual void onDeactivate() {};
virtual BOOL onUpdate(F32 time, U8* joint_mask);
virtual bool onUpdate(F32 time, U8* joint_mask);
virtual LLJoint::JointPriority getPriority(){return LLJoint::HIGHER_PRIORITY;}
virtual bool getLoop() { return true; }
virtual F32 getDuration() { return 0.f; }

View File

@ -43,8 +43,8 @@
// Class Constructor
//-----------------------------------------------------------------------------
LLMotion::LLMotion( const LLUUID &id ) :
mStopped(TRUE),
mActive(FALSE),
mStopped(true),
mActive(false),
mID(id),
mActivationTimestamp(0.f),
mStopTimestamp(0.f),
@ -132,10 +132,10 @@ void LLMotion::setDeactivateCallback( void (*cb)(void *), void* userdata )
void LLMotion::setStopTime(F32 time)
{
mStopTimestamp = time;
mStopped = TRUE;
mStopped = true;
}
BOOL LLMotion::isBlending()
bool LLMotion::isBlending()
{
return mPose.getWeight() < 1.f;
}
@ -146,8 +146,8 @@ BOOL LLMotion::isBlending()
void LLMotion::activate(F32 time)
{
mActivationTimestamp = time;
mStopped = FALSE;
mActive = TRUE;
mStopped = false;
mActive = true;
onActivate();
}
@ -156,7 +156,7 @@ void LLMotion::activate(F32 time)
//-----------------------------------------------------------------------------
void LLMotion::deactivate()
{
mActive = FALSE;
mActive = false;
mPose.setWeight(0.f);
if (mDeactivateCallback)

View File

@ -91,21 +91,21 @@ public:
virtual void setStopTime(F32 time);
BOOL isStopped() const { return mStopped; }
bool isStopped() const { return mStopped; }
void setStopped(BOOL stopped) { mStopped = stopped; }
void setStopped(bool stopped) { mStopped = stopped; }
BOOL isBlending();
bool isBlending();
// Activation functions.
// It is OK for other classes to activate a motion,
// but only the controller can deactivate it.
// Thus, if mActive == TRUE, the motion *may* be on the controllers active list,
// but if mActive == FALSE, the motion is gauranteed not to be on the active list.
// Thus, if mActive == true, the motion *may* be on the controllers active list,
// but if mActive == false, the motion is gauranteed not to be on the active list.
protected:
// Used by LLMotionController only
void deactivate();
BOOL isActive() { return mActive; }
bool isActive() { return mActive; }
public:
void activate(F32 time);
@ -144,15 +144,15 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character) = 0;
// called per time step
// must return TRUE while it is active, and
// must return FALSE when the motion is completed.
virtual BOOL onUpdate(F32 activeTime, U8* joint_mask) = 0;
// must return true while it is active, and
// must return false when the motion is completed.
virtual bool onUpdate(F32 activeTime, U8* joint_mask) = 0;
// called when a motion is deactivated
virtual void onDeactivate() = 0;
// can we crossfade this motion with a new instance when restarted?
// should ultimately always be TRUE, but lack of emote blending, etc
// should ultimately always be true, but lack of emote blending, etc
// requires this
virtual bool canDeprecate();
@ -161,16 +161,16 @@ public:
protected:
// called when a motion is activated
// must return TRUE to indicate success, or else
// must return true to indicate success, or else
// it will be deactivated
virtual BOOL onActivate() = 0;
virtual bool onActivate() = 0;
void addJointState(const LLPointer<LLJointState>& jointState);
protected:
LLPose mPose;
BOOL mStopped; // motion has been stopped;
BOOL mActive; // motion is on active list (can be stopped or not stopped)
bool mStopped; // motion has been stopped;
bool mActive; // motion is on active list (can be stopped or not stopped)
//-------------------------------------------------------------------------
// these are set implicitly by the motion controller and
@ -208,8 +208,8 @@ public:
F32 getMinPixelArea() { return 0.f; }
LLMotionInitStatus onInitialize(LLCharacter*) { LL_INFOS() << "LLTestMotion::onInitialize()" << LL_ENDL; return STATUS_SUCCESS; }
BOOL onActivate() { LL_INFOS() << "LLTestMotion::onActivate()" << LL_ENDL; return true; }
BOOL onUpdate(F32 time, U8* joint_mask) { LL_INFOS() << "LLTestMotion::onUpdate(" << time << ")" << LL_ENDL; return true; }
bool onActivate() { LL_INFOS() << "LLTestMotion::onActivate()" << LL_ENDL; return true; }
bool onUpdate(F32 time, U8* joint_mask) { LL_INFOS() << "LLTestMotion::onUpdate(" << time << ")" << LL_ENDL; return true; }
void onDeactivate() { LL_INFOS() << "LLTestMotion::onDeactivate()" << LL_ENDL; }
};
@ -251,14 +251,14 @@ public:
/*virtual*/ LLMotionInitStatus onInitialize(LLCharacter *character) { return STATUS_SUCCESS; }
// called when a motion is activated
// must return TRUE to indicate success, or else
// must return true to indicate success, or else
// it will be deactivated
/*virtual*/ BOOL onActivate() { return true; }
/*virtual*/ bool onActivate() { return true; }
// called per time step
// must return TRUE while it is active, and
// must return FALSE when the motion is completed.
/*virtual*/ BOOL onUpdate(F32 activeTime, U8* joint_mask) { return true; }
// must return true while it is active, and
// must return false when the motion is completed.
/*virtual*/ bool onUpdate(F32 activeTime, U8* joint_mask) { return true; }
// called when a motion is deactivated
/*virtual*/ void onDeactivate() {}

View File

@ -76,7 +76,7 @@ LLMotionRegistry::~LLMotionRegistry()
//-----------------------------------------------------------------------------
// addMotion()
//-----------------------------------------------------------------------------
BOOL LLMotionRegistry::registerMotion( const LLUUID& id, LLMotionConstructor constructor )
bool LLMotionRegistry::registerMotion( const LLUUID& id, LLMotionConstructor constructor )
{
// LL_INFOS() << "Registering motion: " << name << LL_ENDL;
if (!is_in_map(mMotionTable, id))
@ -134,13 +134,13 @@ LLMotionController::LLMotionController()
mAnimTime(0.f),
mPrevTimerElapsed(0.f),
mLastTime(0.0f),
mHasRunOnce(FALSE),
mPaused(FALSE),
mHasRunOnce(false),
mPaused(false),
mPausedFrame(0),
mTimeStep(0.f),
mTimeStepCount(0),
mLastInterp(0.f),
mIsSelf(FALSE),
mIsSelf(false),
mLastCountAfterPurge(0)
{
}
@ -278,7 +278,7 @@ void LLMotionController::setTimeStep(F32 step)
LLMotion* motionp = *iter;
F32 activation_time = motionp->mActivationTimestamp;
motionp->mActivationTimestamp = (F32)(llfloor(activation_time / step)) * step;
BOOL stopped = motionp->isStopped();
bool stopped = motionp->isStopped();
motionp->setStopTime((F32)(llfloor(motionp->getStopTime() / step)) * step);
motionp->setStopped(stopped);
motionp->mSendStopTimestamp = (F32)llfloor(motionp->mSendStopTimestamp / step) * step;
@ -306,7 +306,7 @@ void LLMotionController::setCharacter(LLCharacter *character)
//-----------------------------------------------------------------------------
// registerMotion()
//-----------------------------------------------------------------------------
BOOL LLMotionController::registerMotion( const LLUUID& id, LLMotionConstructor constructor )
bool LLMotionController::registerMotion( const LLUUID& id, LLMotionConstructor constructor )
{
return sRegistry.registerMotion(id, constructor);
}
@ -399,7 +399,7 @@ LLMotion* LLMotionController::createMotion( const LLUUID &id )
//-----------------------------------------------------------------------------
// startMotion()
//-----------------------------------------------------------------------------
BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset)
bool LLMotionController::startMotion(const LLUUID &id, F32 start_offset)
{
// do we have an instance of this motion for this character?
LLMotion *motion = findMotion(id);
@ -441,7 +441,7 @@ BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset)
//-----------------------------------------------------------------------------
// stopMotionLocally()
//-----------------------------------------------------------------------------
BOOL LLMotionController::stopMotionLocally(const LLUUID &id, BOOL stop_immediate)
bool LLMotionController::stopMotionLocally(const LLUUID &id, bool stop_immediate)
{
// if already inactive, return false
LLMotion *motion = findMotion(id);
@ -449,7 +449,7 @@ BOOL LLMotionController::stopMotionLocally(const LLUUID &id, BOOL stop_immediate
return stopMotionInstance(motion, stop_immediate||mPaused);
}
BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediate)
bool LLMotionController::stopMotionInstance(LLMotion* motion, bool stop_immediate)
{
if (!motion)
{
@ -469,7 +469,7 @@ BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediat
}
else if (isMotionLoading(motion))
{
motion->setStopped(TRUE);
motion->setStopped(true);
return true;
}
@ -528,7 +528,7 @@ void LLMotionController::updateIdleMotion(LLMotion* motionp)
if (mLastTime <= motionp->mSendStopTimestamp)
{
mCharacter->requestStopMotion( motionp );
stopMotionInstance(motionp, FALSE);
stopMotionInstance(motionp, false);
}
}
else if (mAnimTime >= motionp->mActivationTimestamp)
@ -562,7 +562,7 @@ void LLMotionController::updateIdleActiveMotions()
void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
BOOL update_result = TRUE;
bool update_result = true;
U8 last_joint_signature[LL_CHARACTER_MAX_ANIMATED_JOINTS];
memset(&last_joint_signature, 0, sizeof(U8) * LL_CHARACTER_MAX_ANIMATED_JOINTS);
@ -578,11 +578,11 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
continue;
}
BOOL update_motion = FALSE;
bool update_motion = false;
if (motionp->getPose()->getWeight() < 1.f)
{
update_motion = TRUE;
update_motion = true;
}
else
{
@ -594,7 +594,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
if ((*current_signature | test_signature) > (*current_signature))
{
*current_signature |= test_signature;
update_motion = TRUE;
update_motion = true;
}
*((U32*)&last_joint_signature[i * 4]) = *(U32*)&(mJointSignature[1][i * 4]);
@ -604,7 +604,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
if ((*current_signature | test_signature) > (*current_signature))
{
*current_signature |= test_signature;
update_motion = TRUE;
update_motion = true;
}
}
}
@ -630,7 +630,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
if (mLastTime <= motionp->mSendStopTimestamp)
{
mCharacter->requestStopMotion( motionp );
stopMotionInstance(motionp, FALSE);
stopMotionInstance(motionp, false);
}
}
@ -711,7 +711,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
if (mLastTime <= motionp->mSendStopTimestamp)
{
mCharacter->requestStopMotion( motionp );
stopMotionInstance(motionp, FALSE);
stopMotionInstance(motionp, false);
}
}
@ -757,12 +757,12 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
// propagate this to the network
// as not all viewers are guaranteed to have access to the same logic
mCharacter->requestStopMotion( motionp );
stopMotionInstance(motionp, FALSE);
stopMotionInstance(motionp, false);
}
}
// even if onupdate returns FALSE, add this motion in to the blend one last time
// even if onupdate returns false, add this motion in to the blend one last time
mPoseBlender.addMotion(motionp);
}
}
@ -825,7 +825,7 @@ void LLMotionController::updateMotions(bool force_update)
// The use_quantum optimization or possibly the associated code in setTimeStamp()
// does not work as implemented.
// Currently setting mTimeStep to nonzero is disabled elsewhere.
BOOL use_quantum = (mTimeStep != 0.f);
bool use_quantum = (mTimeStep != 0.f);
// Always update mPrevTimerElapsed
F32 cur_time = mTimer.getElapsedTimeF32();
@ -898,7 +898,7 @@ void LLMotionController::updateMotions(bool force_update)
if (use_quantum)
{
mPoseBlender.blendAndCache(TRUE);
mPoseBlender.blendAndCache(true);
}
else
{
@ -906,7 +906,7 @@ void LLMotionController::updateMotions(bool force_update)
}
}
mHasRunOnce = TRUE;
mHasRunOnce = true;
// LL_INFOS() << "Motion controller time " << motionTimer.getElapsedTimeF32() << LL_ENDL;
}
@ -926,13 +926,13 @@ void LLMotionController::updateMotionsMinimal()
deactivateStoppedMotions();
mHasRunOnce = TRUE;
mHasRunOnce = true;
}
//-----------------------------------------------------------------------------
// activateMotionInstance()
//-----------------------------------------------------------------------------
BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time)
bool LLMotionController::activateMotionInstance(LLMotion *motion, F32 time)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
// It's not clear why the getWeight() line seems to be crashing this, but
@ -945,7 +945,7 @@ BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time)
if (mLoadingMotions.find(motion) != mLoadingMotions.end())
{
// we want to start this motion, but we can't yet, so flag it as started
motion->setStopped(FALSE);
motion->setStopped(false);
// report pending animations as activated
return true;
}
@ -997,7 +997,7 @@ BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time)
//-----------------------------------------------------------------------------
// deactivateMotionInstance()
//-----------------------------------------------------------------------------
BOOL LLMotionController::deactivateMotionInstance(LLMotion *motion)
bool LLMotionController::deactivateMotionInstance(LLMotion *motion)
{
motion->deactivate();
@ -1022,7 +1022,7 @@ void LLMotionController::deprecateMotionInstance(LLMotion* motion)
mDeprecatedMotions.insert(motion);
//fade out deprecated motion
stopMotionInstance(motion, FALSE);
stopMotionInstance(motion, false);
//no longer canonical
mAllMotions.erase(motion->getID());
}
@ -1137,7 +1137,7 @@ void LLMotionController::pauseAllMotions()
if (!mPaused)
{
//LL_INFOS() << "Pausing animations..." << LL_ENDL;
mPaused = TRUE;
mPaused = true;
mPausedFrame = LLFrameTimer::getFrameCount();
}
@ -1151,7 +1151,7 @@ void LLMotionController::unpauseAllMotions()
if (mPaused)
{
//LL_INFOS() << "Unpausing animations..." << LL_ENDL;
mPaused = FALSE;
mPaused = false;
}
}
// End

View File

@ -62,7 +62,7 @@ public:
// adds motion classes to the registry
// returns true if successfull
BOOL registerMotion( const LLUUID& id, LLMotionConstructor create);
bool registerMotion( const LLUUID& id, LLMotionConstructor create);
// creates a new instance of a named motion
// returns NULL motion is not registered
@ -85,7 +85,7 @@ class LLMotionController
public:
typedef std::list<LLMotion*> motion_list_t;
typedef std::set<LLMotion*> motion_set_t;
BOOL mIsSelf;
bool mIsSelf;
public:
// Constructor
@ -102,7 +102,7 @@ public:
// registers a motion with the controller
// (actually just forwards call to motion registry)
// returns true if successfull
BOOL registerMotion( const LLUUID& id, LLMotionConstructor create );
bool registerMotion( const LLUUID& id, LLMotionConstructor create );
// creates a motion from the registry
LLMotion *createMotion( const LLUUID &id );
@ -115,13 +115,13 @@ public:
// start motion
// begins playing the specified motion
// returns true if successful
BOOL startMotion( const LLUUID &id, F32 start_offset );
bool startMotion( const LLUUID &id, F32 start_offset );
// stop motion
// stops a playing motion
// in reality, it begins the ease out transition phase
// returns true if successful
BOOL stopMotionLocally( const LLUUID &id, BOOL stop_immediate );
bool stopMotionLocally( const LLUUID &id, bool stop_immediate );
// Move motions from loading to loaded
void updateLoadingMotions();
@ -147,7 +147,7 @@ public:
// pause and continue all motions
void pauseAllMotions();
void unpauseAllMotions();
BOOL isPaused() const { return mPaused; }
bool isPaused() const { return mPaused; }
S32 getPausedFrame() const { return mPausedFrame; }
void setTimeStep(F32 step);
@ -181,10 +181,10 @@ protected:
// internal operations act on motion instances directly
// as there can be duplicate motions per id during blending overlap
void deleteAllMotions();
BOOL activateMotionInstance(LLMotion *motion, F32 time);
BOOL deactivateMotionInstance(LLMotion *motion);
bool activateMotionInstance(LLMotion *motion, F32 time);
bool deactivateMotionInstance(LLMotion *motion);
void deprecateMotionInstance(LLMotion* motion);
BOOL stopMotionInstance(LLMotion *motion, BOOL stop_imemdiate);
bool stopMotionInstance(LLMotion *motion, bool stop_imemdiate);
void removeMotionInstance(LLMotion* motion);
void updateRegularMotions();
void updateAdditiveMotions();
@ -224,8 +224,8 @@ protected:
F32 mPrevTimerElapsed;
F32 mAnimTime;
F32 mLastTime;
BOOL mHasRunOnce;
BOOL mPaused;
bool mHasRunOnce;
bool mPaused;
S32 mPausedFrame;
F32 mTimeStep;
S32 mTimeStepCount;

View File

@ -48,7 +48,7 @@ LLMultiGesture::LLMultiGesture()
mTrigger(),
mReplaceText(),
mSteps(),
mPlaying(FALSE),
mPlaying(false),
mCurrentStep(0),
mDoneCallback(NULL),
mCallbackData(NULL)
@ -64,12 +64,12 @@ LLMultiGesture::~LLMultiGesture()
void LLMultiGesture::reset()
{
mPlaying = FALSE;
mPlaying = false;
mCurrentStep = 0;
mWaitTimer.reset();
mWaitingTimer = FALSE;
mWaitingAnimations = FALSE;
mWaitingAtEnd = FALSE;
mWaitingTimer = false;
mWaitingAnimations = false;
mWaitingAtEnd = false;
mRequestedAnimIDs.clear();
mPlayingAnimIDs.clear();
}
@ -114,7 +114,7 @@ S32 LLMultiGesture::getMaxSerialSize() const
return max_size;
}
BOOL LLMultiGesture::serialize(LLDataPacker& dp) const
bool LLMultiGesture::serialize(LLDataPacker& dp) const
{
dp.packS32(GESTURE_VERSION, "version");
dp.packU8(mKey, "key");
@ -130,7 +130,7 @@ BOOL LLMultiGesture::serialize(LLDataPacker& dp) const
LLGestureStep* step = mSteps[i];
dp.packS32(step->getType(), "step_type");
BOOL ok = step->serialize(dp);
bool ok = step->serialize(dp);
if (!ok)
{
return false;
@ -139,7 +139,7 @@ BOOL LLMultiGesture::serialize(LLDataPacker& dp) const
return true;
}
BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
bool LLMultiGesture::deserialize(LLDataPacker& dp)
{
S32 version;
dp.unpackS32(version, "version");
@ -179,7 +179,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
case STEP_ANIMATION:
{
LLGestureStepAnimation* step = new LLGestureStepAnimation();
BOOL ok = step->deserialize(dp);
bool ok = step->deserialize(dp);
if (!ok) return false;
mSteps.push_back(step);
break;
@ -187,7 +187,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
case STEP_SOUND:
{
LLGestureStepSound* step = new LLGestureStepSound();
BOOL ok = step->deserialize(dp);
bool ok = step->deserialize(dp);
if (!ok) return false;
mSteps.push_back(step);
break;
@ -195,7 +195,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
case STEP_CHAT:
{
LLGestureStepChat* step = new LLGestureStepChat();
BOOL ok = step->deserialize(dp);
bool ok = step->deserialize(dp);
if (!ok) return false;
mSteps.push_back(step);
break;
@ -203,7 +203,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
case STEP_WAIT:
{
LLGestureStepWait* step = new LLGestureStepWait();
BOOL ok = step->deserialize(dp);
bool ok = step->deserialize(dp);
if (!ok) return false;
mSteps.push_back(step);
break;
@ -262,7 +262,7 @@ S32 LLGestureStepAnimation::getMaxSerialSize() const
return max_size;
}
BOOL LLGestureStepAnimation::serialize(LLDataPacker& dp) const
bool LLGestureStepAnimation::serialize(LLDataPacker& dp) const
{
dp.packString(mAnimName, "anim_name");
dp.packUUID(mAnimAssetID, "asset_id");
@ -270,7 +270,7 @@ BOOL LLGestureStepAnimation::serialize(LLDataPacker& dp) const
return true;
}
BOOL LLGestureStepAnimation::deserialize(LLDataPacker& dp)
bool LLGestureStepAnimation::deserialize(LLDataPacker& dp)
{
dp.unpackString(mAnimName, "anim_name");
@ -344,7 +344,7 @@ S32 LLGestureStepSound::getMaxSerialSize() const
return max_size;
}
BOOL LLGestureStepSound::serialize(LLDataPacker& dp) const
bool LLGestureStepSound::serialize(LLDataPacker& dp) const
{
dp.packString(mSoundName, "sound_name");
dp.packUUID(mSoundAssetID, "asset_id");
@ -352,7 +352,7 @@ BOOL LLGestureStepSound::serialize(LLDataPacker& dp) const
return true;
}
BOOL LLGestureStepSound::deserialize(LLDataPacker& dp)
bool LLGestureStepSound::deserialize(LLDataPacker& dp)
{
dp.unpackString(mSoundName, "sound_name");
@ -404,14 +404,14 @@ S32 LLGestureStepChat::getMaxSerialSize() const
return max_size;
}
BOOL LLGestureStepChat::serialize(LLDataPacker& dp) const
bool LLGestureStepChat::serialize(LLDataPacker& dp) const
{
dp.packString(mChatText, "chat_text");
dp.packU32(mFlags, "flags");
return true;
}
BOOL LLGestureStepChat::deserialize(LLDataPacker& dp)
bool LLGestureStepChat::deserialize(LLDataPacker& dp)
{
dp.unpackString(mChatText, "chat_text");
@ -459,14 +459,14 @@ S32 LLGestureStepWait::getMaxSerialSize() const
return max_size;
}
BOOL LLGestureStepWait::serialize(LLDataPacker& dp) const
bool LLGestureStepWait::serialize(LLDataPacker& dp) const
{
dp.packF32(mWaitSeconds, "wait_seconds");
dp.packU32(mFlags, "flags");
return true;
}
BOOL LLGestureStepWait::deserialize(LLDataPacker& dp)
bool LLGestureStepWait::deserialize(LLDataPacker& dp)
{
dp.unpackF32(mWaitSeconds, "wait_seconds");
dp.unpackU32(mFlags, "flags");

View File

@ -46,8 +46,8 @@ public:
// Maximum number of bytes this could hold once serialized.
S32 getMaxSerialSize() const;
BOOL serialize(LLDataPacker& dp) const;
BOOL deserialize(LLDataPacker& dp);
bool serialize(LLDataPacker& dp) const;
bool deserialize(LLDataPacker& dp);
void dump();
@ -75,19 +75,19 @@ public:
std::vector<LLGestureStep*> mSteps;
// Is the gesture currently playing?
BOOL mPlaying;
bool mPlaying;
// "instruction pointer" for steps
S32 mCurrentStep;
// We're waiting for triggered animations to stop playing
BOOL mWaitingAnimations;
bool mWaitingAnimations;
// We're waiting a fixed amount of time
BOOL mWaitingTimer;
bool mWaitingTimer;
// Waiting after the last step played for all animations to complete
BOOL mWaitingAtEnd;
bool mWaitingAtEnd;
// Timer for waiting
LLFrameTimer mWaitTimer;
@ -129,8 +129,8 @@ public:
virtual std::vector<std::string> getLabel() const = 0;
virtual S32 getMaxSerialSize() const = 0;
virtual BOOL serialize(LLDataPacker& dp) const = 0;
virtual BOOL deserialize(LLDataPacker& dp) = 0;
virtual bool serialize(LLDataPacker& dp) const = 0;
virtual bool deserialize(LLDataPacker& dp) = 0;
virtual void dump() = 0;
};
@ -151,8 +151,8 @@ public:
virtual std::vector<std::string> getLabel() const;
virtual S32 getMaxSerialSize() const;
virtual BOOL serialize(LLDataPacker& dp) const;
virtual BOOL deserialize(LLDataPacker& dp);
virtual bool serialize(LLDataPacker& dp) const;
virtual bool deserialize(LLDataPacker& dp);
virtual void dump();
@ -174,8 +174,8 @@ public:
virtual std::vector<std::string> getLabel() const;
virtual S32 getMaxSerialSize() const;
virtual BOOL serialize(LLDataPacker& dp) const;
virtual BOOL deserialize(LLDataPacker& dp);
virtual bool serialize(LLDataPacker& dp) const;
virtual bool deserialize(LLDataPacker& dp);
virtual void dump();
@ -197,8 +197,8 @@ public:
virtual std::vector<std::string> getLabel() const;
virtual S32 getMaxSerialSize() const;
virtual BOOL serialize(LLDataPacker& dp) const;
virtual BOOL deserialize(LLDataPacker& dp);
virtual bool serialize(LLDataPacker& dp) const;
virtual bool deserialize(LLDataPacker& dp);
virtual void dump();
@ -222,8 +222,8 @@ public:
virtual std::vector<std::string> getLabel() const;
virtual S32 getMaxSerialSize() const;
virtual BOOL serialize(LLDataPacker& dp) const;
virtual BOOL deserialize(LLDataPacker& dp);
virtual bool serialize(LLDataPacker& dp) const;
virtual bool deserialize(LLDataPacker& dp);
virtual void dump();

View File

@ -81,7 +81,7 @@ LLJointState *LLPose::getNextJointState()
//-----------------------------------------------------------------------------
// addJointState()
//-----------------------------------------------------------------------------
BOOL LLPose::addJointState(const LLPointer<LLJointState>& jointState)
bool LLPose::addJointState(const LLPointer<LLJointState>& jointState)
{
if (mJointMap.find(jointState->getJoint()->getName()) == mJointMap.end())
{
@ -93,7 +93,7 @@ BOOL LLPose::addJointState(const LLPointer<LLJointState>& jointState)
//-----------------------------------------------------------------------------
// removeJointState()
//-----------------------------------------------------------------------------
BOOL LLPose::removeJointState(const LLPointer<LLJointState>& jointState)
bool LLPose::removeJointState(const LLPointer<LLJointState>& jointState)
{
mJointMap.erase(jointState->getJoint()->getName());
return true;
@ -102,7 +102,7 @@ BOOL LLPose::removeJointState(const LLPointer<LLJointState>& jointState)
//-----------------------------------------------------------------------------
// removeAllJointStates()
//-----------------------------------------------------------------------------
BOOL LLPose::removeAllJointStates()
bool LLPose::removeAllJointStates()
{
mJointMap.clear();
return true;
@ -181,7 +181,7 @@ LLJointStateBlender::LLJointStateBlender()
{
mJointStates[i] = NULL;
mPriorities[i] = S32_MIN;
mAdditiveBlends[i] = FALSE;
mAdditiveBlends[i] = false;
}
}
@ -193,7 +193,7 @@ LLJointStateBlender::~LLJointStateBlender()
//-----------------------------------------------------------------------------
// addJointState()
//-----------------------------------------------------------------------------
BOOL LLJointStateBlender::addJointState(const LLPointer<LLJointState>& joint_state, S32 priority, BOOL additive_blend)
bool LLJointStateBlender::addJointState(const LLPointer<LLJointState>& joint_state, S32 priority, bool additive_blend)
{
llassert(joint_state);
@ -235,7 +235,7 @@ BOOL LLJointStateBlender::addJointState(const LLPointer<LLJointState>& joint_sta
//-----------------------------------------------------------------------------
// blendJointStates()
//-----------------------------------------------------------------------------
void LLJointStateBlender::blendJointStates(BOOL apply_now)
void LLJointStateBlender::blendJointStates(bool apply_now)
{
// we need at least one joint to blend
// if there is one, it will be in slot zero according to insertion logic
@ -468,7 +468,7 @@ LLPoseBlender::~LLPoseBlender()
//-----------------------------------------------------------------------------
// addMotion()
//-----------------------------------------------------------------------------
BOOL LLPoseBlender::addMotion(LLMotion* motion)
bool LLPoseBlender::addMotion(LLMotion* motion)
{
LLPose* pose = motion->getPose();
@ -525,7 +525,7 @@ void LLPoseBlender::blendAndApply()
//-----------------------------------------------------------------------------
// blendAndCache()
//-----------------------------------------------------------------------------
void LLPoseBlender::blendAndCache(BOOL reset_cached_joints)
void LLPoseBlender::blendAndCache(bool reset_cached_joints)
{
for (blender_list_t::iterator iter = mActiveBlenders.begin();
iter != mActiveBlenders.end(); ++iter)
@ -535,7 +535,7 @@ void LLPoseBlender::blendAndCache(BOOL reset_cached_joints)
{
jsbp->resetCachedJoint();
}
jsbp->blendJointStates(FALSE);
jsbp->blendJointStates(false);
}
}

View File

@ -65,11 +65,11 @@ public:
// Destructor
~LLPose();
// add a joint state in this pose
BOOL addJointState(const LLPointer<LLJointState>& jointState);
bool addJointState(const LLPointer<LLJointState>& jointState);
// remove a joint state from this pose
BOOL removeJointState(const LLPointer<LLJointState>& jointState);
bool removeJointState(const LLPointer<LLJointState>& jointState);
// removes all joint states from this pose
BOOL removeAllJointStates();
bool removeAllJointStates();
// set weight for all joint states in this pose
void setWeight(F32 weight);
// get weight for this pose
@ -87,12 +87,12 @@ class LLJointStateBlender
protected:
LLPointer<LLJointState> mJointStates[JSB_NUM_JOINT_STATES];
S32 mPriorities[JSB_NUM_JOINT_STATES];
BOOL mAdditiveBlends[JSB_NUM_JOINT_STATES];
bool mAdditiveBlends[JSB_NUM_JOINT_STATES];
public:
LLJointStateBlender();
~LLJointStateBlender();
void blendJointStates(BOOL apply_now = TRUE);
BOOL addJointState(const LLPointer<LLJointState>& joint_state, S32 priority, BOOL additive_blend);
void blendJointStates(bool apply_now = true);
bool addJointState(const LLPointer<LLJointState>& joint_state, S32 priority, bool additive_blend);
void interpolate(F32 u);
void clear();
void resetCachedJoint();
@ -120,7 +120,7 @@ public:
~LLPoseBlender();
// request motion joint states to be added to pose blender joint state records
BOOL addMotion(LLMotion* motion);
bool addMotion(LLMotion* motion);
// blend all joint states and apply to skeleton
void blendAndApply();
@ -129,7 +129,7 @@ public:
void clearBlenders();
// blend all joint states and cache results
void blendAndCache(BOOL reset_cached_joints);
void blendAndCache(bool reset_cached_joints);
// interpolate all joints towards cached values
void interpolate(F32 u);

View File

@ -49,7 +49,7 @@ bool operator!=(const LLUniqueID &a, const LLUniqueID &b)
LLStateDiagram::LLStateDiagram()
{
mDefaultState = NULL;
mUseDefaultState = FALSE;
mUseDefaultState = false;
}
LLStateDiagram::~LLStateDiagram()
@ -58,14 +58,14 @@ LLStateDiagram::~LLStateDiagram()
}
// add a state to the state graph
BOOL LLStateDiagram::addState(LLFSMState *state)
bool LLStateDiagram::addState(LLFSMState *state)
{
mStates[state] = Transitions();
return true;
}
// add a directed transition between 2 states
BOOL LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition)
bool LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition)
{
StateMap::iterator state_it;
state_it = mStates.find(&start_state);
@ -97,9 +97,9 @@ BOOL LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_stat
}
// add an undirected transition between 2 states
BOOL LLStateDiagram::addUndirectedTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition)
bool LLStateDiagram::addUndirectedTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition)
{
BOOL result;
bool result;
result = addTransition(start_state, end_state, transition);
if (result)
{
@ -162,7 +162,7 @@ LLFSMState* LLStateDiagram::processTransition(LLFSMState& start_state, LLFSMTran
void LLStateDiagram::setDefaultState(LLFSMState& default_state)
{
mUseDefaultState = TRUE;
mUseDefaultState = true;
mDefaultState = &default_state;
}
@ -179,7 +179,7 @@ S32 LLStateDiagram::numDeadendStates()
return numDeadends;
}
BOOL LLStateDiagram::stateIsValid(LLFSMState& state)
bool LLStateDiagram::stateIsValid(LLFSMState& state)
{
if (mStates.find(&state) != mStates.end())
{
@ -200,7 +200,7 @@ LLFSMState* LLStateDiagram::getState(U32 state_id)
return NULL;
}
BOOL LLStateDiagram::saveDotFile(const std::string& filename)
bool LLStateDiagram::saveDotFile(const std::string& filename)
{
LLAPRFile outfile ;
outfile.open(filename, LL_APR_W);
@ -312,7 +312,7 @@ void LLStateMachine::runCurrentState(void *data)
}
// set current state
BOOL LLStateMachine::setCurrentState(LLFSMState *initial_state, void* user_data, BOOL skip_entry)
bool LLStateMachine::setCurrentState(LLFSMState *initial_state, void* user_data, bool skip_entry)
{
llassert(mStateDiagram);
@ -329,7 +329,7 @@ BOOL LLStateMachine::setCurrentState(LLFSMState *initial_state, void* user_data,
return false;
}
BOOL LLStateMachine::setCurrentState(U32 state_id, void* user_data, BOOL skip_entry)
bool LLStateMachine::setCurrentState(U32 state_id, void* user_data, bool skip_entry)
{
llassert(mStateDiagram);

View File

@ -74,7 +74,7 @@ protected:
StateMap mStates;
Transitions mDefaultTransitions;
LLFSMState* mDefaultState;
BOOL mUseDefaultState;
bool mUseDefaultState;
public:
LLStateDiagram();
@ -82,13 +82,13 @@ public:
protected:
// add a state to the state graph, executed implicitly when adding transitions
BOOL addState(LLFSMState *state);
bool addState(LLFSMState *state);
// add a directed transition between 2 states
BOOL addTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition);
bool addTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition);
// add an undirected transition between 2 states
BOOL addUndirectedTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition);
bool addUndirectedTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition);
// add a transition that is taken if none other exist
void addDefaultTransition(LLFSMState& end_state, LLFSMTransition& transition);
@ -103,14 +103,14 @@ protected:
S32 numDeadendStates();
// does this state exist in the state diagram?
BOOL stateIsValid(LLFSMState& state);
bool stateIsValid(LLFSMState& state);
// get a state pointer by ID
LLFSMState* getState(U32 state_id);
public:
// save the graph in a DOT file for rendering and visualization
BOOL saveDotFile(const std::string& filename);
bool saveDotFile(const std::string& filename);
};
class LLStateMachine
@ -138,10 +138,10 @@ public:
void runCurrentState(void *data);
// set state by state pointer
BOOL setCurrentState(LLFSMState *initial_state, void* user_data, BOOL skip_entry = TRUE);
bool setCurrentState(LLFSMState *initial_state, void* user_data, bool skip_entry = true);
// set state by unique ID
BOOL setCurrentState(U32 state_id, void* user_data, BOOL skip_entry = TRUE);
bool setCurrentState(U32 state_id, void* user_data, bool skip_entry = true);
};
#endif //_LL_LLSTATEMACHINE_H

View File

@ -93,7 +93,7 @@ LLMotion::LLMotionInitStatus LLTargetingMotion::onInitialize(LLCharacter *charac
//-----------------------------------------------------------------------------
// LLTargetingMotion::onActivate()
//-----------------------------------------------------------------------------
BOOL LLTargetingMotion::onActivate()
bool LLTargetingMotion::onActivate()
{
return true;
}
@ -101,7 +101,7 @@ BOOL LLTargetingMotion::onActivate()
//-----------------------------------------------------------------------------
// LLTargetingMotion::onUpdate()
//-----------------------------------------------------------------------------
BOOL LLTargetingMotion::onUpdate(F32 time, U8* joint_mask)
bool LLTargetingMotion::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED;
F32 slerp_amt = LLSmoothInterpolation::getInterpolant(TORSO_TARGET_HALF_LIFE);
@ -109,7 +109,7 @@ BOOL LLTargetingMotion::onUpdate(F32 time, U8* joint_mask)
LLVector3 target;
LLVector3* lookAtPoint = (LLVector3*)mCharacter->getAnimationData("LookAtPoint");
BOOL result = TRUE;
bool result = true;
if (!lookAtPoint)
{

View File

@ -91,14 +91,14 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character);
// called when a motion is activated
// must return TRUE to indicate success, or else
// must return true to indicate success, or else
// it will be deactivated
virtual BOOL onActivate();
virtual bool onActivate();
// called per time step
// must return TRUE while it is active, and
// must return FALSE when the motion is completed.
virtual BOOL onUpdate(F32 time, U8* joint_mask);
// must return true while it is active, and
// must return true when the motion is completed.
virtual bool onUpdate(F32 time, U8* joint_mask);
// called when a motion is deactivated
virtual void onDeactivate();

View File

@ -164,8 +164,8 @@ LLVisualParam::LLVisualParam()
mLastWeight( 0.f ),
mNext( NULL ),
mTargetWeight( 0.f ),
mIsAnimating( FALSE ),
mIsDummy(FALSE),
mIsAnimating( false ),
mIsDummy(false),
mID( -1 ),
mInfo( 0 ),
mParamLocation(LOC_UNKNOWN)
@ -207,21 +207,21 @@ LLVisualParam::~LLVisualParam()
// setInfo()
//-----------------------------------------------------------------------------
BOOL LLVisualParam::setInfo(LLVisualParamInfo *info)
bool LLVisualParam::setInfo(LLVisualParamInfo *info)
{
llassert(mInfo == NULL);
if (info->mID < 0)
return false;
mInfo = info;
mID = info->mID;
setWeight(getDefaultWeight(), FALSE );
setWeight(getDefaultWeight(), false );
return true;
}
//-----------------------------------------------------------------------------
// parseData()
//-----------------------------------------------------------------------------
BOOL LLVisualParam::parseData(LLXmlTreeNode *node)
bool LLVisualParam::parseData(LLXmlTreeNode *node)
{
LLVisualParamInfo *info = new LLVisualParamInfo;
@ -238,7 +238,7 @@ BOOL LLVisualParam::parseData(LLXmlTreeNode *node)
//-----------------------------------------------------------------------------
// <FS:Ansariel> [Legacy Bake]
//void LLVisualParam::setWeight(F32 weight)
void LLVisualParam::setWeight(F32 weight, BOOL upload_bake)
void LLVisualParam::setWeight(F32 weight, bool upload_bake)
{
if (mIsAnimating)
{
@ -267,7 +267,7 @@ void LLVisualParam::setWeight(F32 weight, BOOL upload_bake)
//-----------------------------------------------------------------------------
// <FS:Ansariel> [Legacy Bake]
//void LLVisualParam::setAnimationTarget(F32 target_value)
void LLVisualParam::setAnimationTarget(F32 target_value, BOOL upload_bake)
void LLVisualParam::setAnimationTarget(F32 target_value, bool upload_bake)
{
// don't animate dummy parameters
if (mIsDummy)
@ -290,7 +290,7 @@ void LLVisualParam::setAnimationTarget(F32 target_value, BOOL upload_bake)
{
mTargetWeight = target_value;
}
mIsAnimating = TRUE;
mIsAnimating = true;
if (mNext)
{
@ -323,7 +323,7 @@ void LLVisualParam::clearNextParam()
//-----------------------------------------------------------------------------
// <FS:Ansariel> [Legacy Bake]
//void LLVisualParam::animate( F32 delta)
void LLVisualParam::animate( F32 delta, BOOL upload_bake)
void LLVisualParam::animate( F32 delta, bool upload_bake)
{
if (mIsAnimating)
{
@ -339,11 +339,11 @@ void LLVisualParam::animate( F32 delta, BOOL upload_bake)
//-----------------------------------------------------------------------------
// <FS:Ansariel> [Legacy Bake]
//void LLVisualParam::stopAnimating()
void LLVisualParam::stopAnimating(BOOL upload_bake)
void LLVisualParam::stopAnimating(bool upload_bake)
{
if (mIsAnimating && isTweakable())
{
mIsAnimating = FALSE;
mIsAnimating = false;
// <FS:Ansariel> [Legacy Bake]
//setWeight(mTargetWeight);
setWeight(mTargetWeight, upload_bake);

View File

@ -113,11 +113,11 @@ public:
// (They can not be virtual because they use specific derived Info classes)
LLVisualParamInfo* getInfo() const { return mInfo; }
// This sets mInfo and calls initialization functions
BOOL setInfo(LLVisualParamInfo *info);
bool setInfo(LLVisualParamInfo *info);
// Virtual functions
// Pure virtuals
//virtual BOOL parseData( LLXmlTreeNode *node ) = 0;
//virtual bool parseData( LLXmlTreeNode *node ) = 0;
virtual void apply( ESex avatar_sex ) = 0;
// Default functions
// <FS:Ansariel> [Legacy Bake]
@ -125,10 +125,10 @@ public:
//virtual void setAnimationTarget( F32 target_value);
//virtual void animate(F32 delta);
//virtual void stopAnimating();
virtual void setWeight(F32 weight, BOOL upload_bake);
virtual void setAnimationTarget( F32 target_value, BOOL upload_bake);
virtual void animate(F32 delta, BOOL upload_bake);
virtual void stopAnimating(BOOL upload_bake);
virtual void setWeight(F32 weight, bool upload_bake);
virtual void setAnimationTarget( F32 target_value, bool upload_bake);
virtual void animate(F32 delta, bool upload_bake);
virtual void stopAnimating(bool upload_bake);
// </FS:Ansariel> [Legacy Bake]
virtual bool linkDrivenParams(visual_param_mapper mapper, bool only_cross_params);
@ -157,17 +157,17 @@ public:
F32 getCurrentWeight() const { return mCurWeight; }
F32 getLastWeight() const { return mLastWeight; }
void setLastWeight(F32 val) { mLastWeight = val; }
BOOL isAnimating() const { return mIsAnimating; }
BOOL isTweakable() const { return (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) || (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT); }
bool isAnimating() const { return mIsAnimating; }
bool isTweakable() const { return (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) || (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT); }
LLVisualParam* getNextParam() { return mNext; }
void setNextParam( LLVisualParam *next );
void clearNextParam();
virtual void setAnimating(BOOL is_animating) { mIsAnimating = is_animating && !mIsDummy; }
BOOL getAnimating() const { return mIsAnimating; }
virtual void setAnimating(bool is_animating) { mIsAnimating = is_animating && !mIsDummy; }
bool getAnimating() const { return mIsAnimating; }
void setIsDummy(BOOL is_dummy) { mIsDummy = is_dummy; }
void setIsDummy(bool is_dummy) { mIsDummy = is_dummy; }
void setParamLocation(EParamLocation loc);
EParamLocation getParamLocation() const { return mParamLocation; }
@ -179,8 +179,8 @@ protected:
F32 mLastWeight; // last weight
LLVisualParam* mNext; // next param in a shared chain
F32 mTargetWeight; // interpolation target
BOOL mIsAnimating; // this value has been given an interpolation target
BOOL mIsDummy; // this is used to prevent dummy visual params from animating
bool mIsAnimating; // this value has been given an interpolation target
bool mIsDummy; // this is used to prevent dummy visual params from animating
S32 mID; // id for storing weight/morphtarget compares compactly

View File

@ -308,10 +308,10 @@ S32 wstring_utf16_length(const LLWString &wstr, const S32 woffset, const S32 wle
// Given a wstring and an offset in it, returns the length as wstring (i.e.,
// number of llwchars) of the longest substring that starts at the offset
// and whose equivalent utf-16 string does not exceeds the given utf16_length.
S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, const S32 woffset, const S32 utf16_length, BOOL *unaligned)
S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, const S32 woffset, const S32 utf16_length, bool *unaligned)
{
const auto end = wstr.length();
BOOL u = FALSE;
bool u{ false };
S32 n = woffset + utf16_length;
S32 i = woffset;
while (i < end)
@ -1486,7 +1486,7 @@ S32 LLStringUtil::format(std::string& s, const format_map_t& substitutions)
if (iter != substitutions.end())
{
S32 secFromEpoch = 0;
BOOL r = LLStringUtil::convertToS32(iter->second, secFromEpoch);
bool r = LLStringUtil::convertToS32(iter->second, secFromEpoch);
if (r)
{
found_replacement = formatDatetime(replacement, tokens[0], param, secFromEpoch);

View File

@ -391,7 +391,7 @@ public:
static void _makeASCII(string_type& string);
// Conversion to other data types
static bool convertToBOOL(const string_type& string, BOOL& value);
static bool convertToBOOL(const string_type& string, bool& value);
static bool convertToU8(const string_type& string, U8& value);
static bool convertToS8(const string_type& string, S8& value);
static bool convertToS16(const string_type& string, S16& value);
@ -696,7 +696,7 @@ LL_COMMON_API S32 utf16str_wstring_length(const llutf16string &utf16str, S32 len
LL_COMMON_API S32 wstring_utf16_length(const LLWString & wstr, S32 woffset, S32 wlen);
// Length in wstring (i.e., llwchar count) of a part of a wstring specified by utf16 length (i.e., utf16 units.)
LL_COMMON_API S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, S32 woffset, S32 utf16_length, BOOL *unaligned = NULL);
LL_COMMON_API S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, S32 woffset, S32 utf16_length, bool *unaligned = nullptr);
/**
* @brief Properly truncate a utf8 string to a maximum byte count.
@ -1818,7 +1818,7 @@ auto LLStringUtilBase<T>::getenv(const std::string& key, const string_type& dflt
}
template<class T>
bool LLStringUtilBase<T>::convertToBOOL(const string_type& string, BOOL& value)
bool LLStringUtilBase<T>::convertToBOOL(const string_type& string, bool& value)
{
if( string.empty() )
{

View File

@ -231,7 +231,7 @@ namespace tut
template<> template<>
void string_index_object_t::test<17>()
{
BOOL value;
bool value;
std::string str_val("1");
ensure("convertToBOOL 1 failed", LLStringUtil::convertToBOOL(str_val, value) && value);
str_val = "T";

View File

@ -100,6 +100,10 @@ void LL::ThreadPoolBase::start()
LL::ThreadPoolBase::~ThreadPoolBase()
{
close();
if (!LLEventPumps::wasDeleted())
{
LLEventPumps::instance().obtain("LLApp").stopListening(mName);
}
}
void LL::ThreadPoolBase::close()

View File

@ -308,11 +308,11 @@ bool LLDir_Linux::fileExists(const std::string &filename) const
int res = stat(filename.c_str(), &stat_data);
if (!res)
{
return TRUE;
return true;
}
else
{
return FALSE;
return false;
}
}

View File

@ -47,7 +47,9 @@ DWORD GetDllVersion(LPCTSTR lpszDllName);
namespace
{ // anonymous
enum class prst { INIT, OPEN, SKIP } state = prst::INIT;
enum class prst { INIT, OPEN, SKIP };
prst state{ prst::INIT };
// This is called so early that we can't count on static objects being
// properly constructed yet, so declare a pointer instead of an instance.
std::ofstream* prelogf = nullptr;
@ -75,6 +77,7 @@ namespace
(*prelogf) << "========================================================================"
<< std::endl;
// fall through, don't break
[[fallthrough]];
case prst::OPEN:
(*prelogf) << message << std::endl;
@ -256,7 +259,7 @@ LLDir_Win32::LLDir_Win32()
#endif
mAppRODataDir = mWorkingDir;
mAppRODataDir = mWorkingDir;
// if (mExecutableDir.find("indra") == std::string::npos)
@ -444,11 +447,11 @@ bool LLDir_Win32::fileExists(const std::string &filename) const
int res = LLFile::stat(filename, &stat_data);
if (!res)
{
return TRUE;
return true;
}
else
{
return FALSE;
return false;
}
}

View File

@ -51,7 +51,7 @@ public:
private:
BOOL getNextFileInDir(const llutf16string &dirname, const std::string &mask, std::string &fname); //FS:LGG for LGG's particle beam
void* mDirSearch_h;
void* mDirSearch_h{ nullptr };
llutf16string mCurrentDir;
};

View File

@ -124,10 +124,10 @@ LLParcel::LLParcel()
LLParcel::LLParcel(const LLUUID &owner_id,
BOOL modify, BOOL terraform, BOOL damage,
bool modify, bool terraform, bool damage,
time_t claim_date, S32 claim_price_per_meter,
S32 rent_price_per_meter, S32 area, S32 sim_object_limit, F32 parcel_object_bonus,
BOOL is_group_owned)
bool is_group_owned)
{
init( owner_id, modify, terraform, damage, claim_date,
claim_price_per_meter, rent_price_per_meter, area, sim_object_limit, parcel_object_bonus,
@ -142,10 +142,10 @@ LLParcel::~LLParcel()
}
void LLParcel::init(const LLUUID &owner_id,
BOOL modify, BOOL terraform, BOOL damage,
bool modify, bool terraform, bool damage,
time_t claim_date, S32 claim_price_per_meter,
S32 rent_price_per_meter, S32 area, S32 sim_object_limit, F32 parcel_object_bonus,
BOOL is_group_owned)
bool is_group_owned)
{
mID.setNull();
mOwnerID = owner_id;
@ -172,7 +172,7 @@ void LLParcel::init(const LLUUID &owner_id,
mSaleTimerExpires.stop();
mGraceExtension = 0;
//mExpireAction = STEA_REVERT;
//mRecordTransaction = FALSE;
//mRecordTransaction = false;
mAuctionID = 0;
mInEscrow = false;
@ -238,7 +238,7 @@ void LLParcel::init(const LLUUID &owner_id,
setObscureMOAP(false);
}
void LLParcel::overrideOwner(const LLUUID& owner_id, BOOL is_group_owned)
void LLParcel::overrideOwner(const LLUUID& owner_id, bool is_group_owned)
{
// Override with system permission (LLUUID::null)
// Overridden parcels have no group
@ -352,7 +352,7 @@ void LLParcel::setAllParcelFlags(U32 flags)
mParcelFlags = flags;
}
void LLParcel::setParcelFlag(U32 flag, BOOL b)
void LLParcel::setParcelFlag(U32 flag, bool b)
{
if (b)
{
@ -365,7 +365,7 @@ void LLParcel::setParcelFlag(U32 flag, BOOL b)
}
BOOL LLParcel::allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) const
bool LLParcel::allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) const
{
if (agent_id == LLUUID::null)
{
@ -394,7 +394,7 @@ BOOL LLParcel::allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) con
return false;
}
BOOL LLParcel::allowTerraformBy(const LLUUID &agent_id) const
bool LLParcel::allowTerraformBy(const LLUUID &agent_id) const
{
if (agent_id == LLUUID::null)
{
@ -441,7 +441,7 @@ void LLParcel::setDiscountRate(F32 rate)
// File input and output
//-----------------------------------------------------------
BOOL LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entry)
bool LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entry)
{
skip_to_end_of_next_keyword("{", input_stream);
while (input_stream.good())
@ -561,9 +561,9 @@ void LLParcel::unpackMessage(LLMessageSystem* msg)
msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MediaURL, buffer );
setMediaURL(buffer);
BOOL see_avs = TRUE; // All default to true for legacy server behavior
BOOL any_av_sounds = TRUE;
BOOL group_av_sounds = TRUE;
bool see_avs = true; // All default to true for legacy server behavior
bool any_av_sounds = true;
bool group_av_sounds = true;
bool have_new_parcel_limit_data = (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_SeeAVs) > 0); // New version of server should send all 3 of these values
have_new_parcel_limit_data &= (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_AnyAVSounds) > 0);
have_new_parcel_limit_data &= (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_GroupAVSounds) > 0);
@ -787,7 +787,7 @@ void LLParcel::extendAABB(const LLVector3& box_min, const LLVector3& box_max)
}
}
BOOL LLParcel::addToAccessList(const LLUUID& agent_id, S32 time)
bool LLParcel::addToAccessList(const LLUUID& agent_id, S32 time)
{
if (mAccessList.size() >= (U32) PARCEL_MAX_ACCESS_LIST)
{
@ -828,7 +828,7 @@ BOOL LLParcel::addToAccessList(const LLUUID& agent_id, S32 time)
return true;
}
BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time)
bool LLParcel::addToBanList(const LLUUID& agent_id, S32 time)
{
if (mBanList.size() >= (U32) PARCEL_MAX_ACCESS_LIST)
{
@ -871,11 +871,11 @@ BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time)
return true;
}
BOOL remove_from_access_array(std::map<LLUUID,LLAccessEntry>* list, const LLUUID& agent_id); // <FS:CR> Various missing prototypes
BOOL remove_from_access_array(std::map<LLUUID,LLAccessEntry>* list,
bool remove_from_access_array(std::map<LLUUID,LLAccessEntry>* list, const LLUUID& agent_id); // <FS:CR> Various missing prototypes
bool remove_from_access_array(std::map<LLUUID,LLAccessEntry>* list,
const LLUUID& agent_id)
{
BOOL removed = FALSE;
bool removed = false;
LLAccessEntry::map::iterator itor = list->begin();
while (itor != list->end())
{
@ -883,7 +883,7 @@ BOOL remove_from_access_array(std::map<LLUUID,LLAccessEntry>* list,
if (entry.mID == agent_id)
{
list->erase(itor++);
removed = TRUE;
removed = true;
}
else
{
@ -893,12 +893,12 @@ BOOL remove_from_access_array(std::map<LLUUID,LLAccessEntry>* list,
return removed;
}
BOOL LLParcel::removeFromAccessList(const LLUUID& agent_id)
bool LLParcel::removeFromAccessList(const LLUUID& agent_id)
{
return remove_from_access_array(&mAccessList, agent_id);
}
BOOL LLParcel::removeFromBanList(const LLUUID& agent_id)
bool LLParcel::removeFromBanList(const LLUUID& agent_id)
{
return remove_from_access_array(&mBanList, agent_id);
}
@ -948,13 +948,13 @@ const std::string& LLParcel::getActionString(LLParcel::EAction action)
return PARCEL_ACTION_STRING[index];
}
BOOL LLParcel::isSaleTimerExpired(const U64& time)
bool LLParcel::isSaleTimerExpired(const U64& time)
{
if (mSaleTimerExpires.getStarted() == FALSE)
{
return false;
}
BOOL expired = mSaleTimerExpires.checkExpirationAndReset(0.0f);
bool expired = mSaleTimerExpires.checkExpirationAndReset(0.0f);
if (expired)
{
mSaleTimerExpires.stop();
@ -962,13 +962,13 @@ BOOL LLParcel::isSaleTimerExpired(const U64& time)
return expired;
}
BOOL LLParcel::isMediaResetTimerExpired(const U64& time)
bool LLParcel::isMediaResetTimerExpired(const U64& time)
{
if (mMediaResetTimer.getStarted() == FALSE)
if (mMediaResetTimer.getStarted() == false)
{
return false;
}
BOOL expired = mMediaResetTimer.checkExpirationAndReset(0.0f);
bool expired = mMediaResetTimer.checkExpirationAndReset(0.0f);
if (expired)
{
mMediaResetTimer.stop();
@ -977,7 +977,7 @@ BOOL LLParcel::isMediaResetTimerExpired(const U64& time)
}
void LLParcel::startSale(const LLUUID& buyer_id, BOOL is_buyer_group)
void LLParcel::startSale(const LLUUID& buyer_id, bool is_buyer_group)
{
// TODO -- this and all Sale related methods need to move out of the LLParcel
// base class and into server-side-only LLSimParcel class
@ -1043,7 +1043,7 @@ void LLParcel::completeSale(
// Turn off show directory, since it's a recurring fee that
// the buyer may not want.
setParcelFlag(PF_SHOW_DIRECTORY, FALSE);
setParcelFlag(PF_SHOW_DIRECTORY, false);
//should be cleared on sale.
mAccessList.clear();
@ -1070,12 +1070,12 @@ void LLParcel::clearSale()
setSellWithObjects(FALSE);
}
BOOL LLParcel::isPublic() const
bool LLParcel::isPublic() const
{
return (mOwnerID.isNull());
}
BOOL LLParcel::isBuyerAuthorized(const LLUUID& buyer_id) const
bool LLParcel::isBuyerAuthorized(const LLUUID& buyer_id) const
{
if(mAuthBuyerID.isNull())
{

View File

@ -209,37 +209,37 @@ public:
LLParcel();
LLParcel(
const LLUUID &owner_id,
BOOL modify,
BOOL terraform,
BOOL damage,
bool modify,
bool terraform,
bool damage,
time_t claim_date,
S32 claim_price,
S32 rent_price,
S32 area,
S32 sim_object_limit,
F32 parcel_object_bonus,
BOOL is_group_owned = FALSE);
bool is_group_owned = false);
virtual ~LLParcel();
void init(
const LLUUID &owner_id,
BOOL modify,
BOOL terraform,
BOOL damage,
bool modify,
bool terraform,
bool damage,
time_t claim_date,
S32 claim_price,
S32 rent_price,
S32 area,
S32 sim_object_limit,
F32 parcel_object_bonus,
BOOL is_group_owned = FALSE);
bool is_group_owned = false);
// TODO: make an actual copy constructor for this
void overrideParcelFlags(U32 flags);
// if you specify an agent id here, the group id will be zeroed
void overrideOwner(
const LLUUID& owner_id,
BOOL is_group_owned = FALSE);
bool is_group_owned = false);
void overrideSaleTimerExpires(F32 secs_left) { mSaleTimerExpires.setTimerExpirySec(secs_left); }
// MANIPULATORS
@ -283,7 +283,7 @@ public:
void setAuctionID(U32 auction_id) { mAuctionID = auction_id;}
void setAllParcelFlags(U32 flags);
void setParcelFlag(U32 flag, BOOL b);
void setParcelFlag(U32 flag, bool b);
virtual void setArea(S32 area, S32 sim_object_limit);
void setDiscountRate(F32 rate);
@ -316,7 +316,7 @@ public:
void setPassHours(F32 hours) { mPassHours = hours; }
// BOOL importStream(std::istream& input_stream);
BOOL importAccessEntry(std::istream& input_stream, LLAccessEntry* entry);
bool importAccessEntry(std::istream& input_stream, LLAccessEntry* entry);
// BOOL exportStream(std::ostream& output_stream);
void packMessage(LLMessageSystem* msg);
@ -344,10 +344,10 @@ public:
void expirePasses(S32 now);
// Add to list, suppressing duplicates. Returns TRUE if added.
BOOL addToAccessList(const LLUUID& agent_id, S32 time);
BOOL addToBanList(const LLUUID& agent_id, S32 time);
BOOL removeFromAccessList(const LLUUID& agent_id);
BOOL removeFromBanList(const LLUUID& agent_id);
bool addToAccessList(const LLUUID& agent_id, S32 time);
bool addToBanList(const LLUUID& agent_id, S32 time);
bool removeFromAccessList(const LLUUID& agent_id);
bool removeFromBanList(const LLUUID& agent_id);
// ACCESSORS
const LLUUID& getID() const { return mID; }
@ -377,14 +377,14 @@ public:
U32 getAuctionID() const { return mAuctionID; }
bool isInEscrow() const { return mInEscrow; }
BOOL isPublic() const;
bool isPublic() const;
// Region-local user-specified position
const LLVector3& getUserLocation() const { return mUserLocation; }
const LLVector3& getUserLookAt() const { return mUserLookAt; }
ELandingType getLandingType() const { return mLandingType; }
BOOL getSeeAVs() const { return mSeeAVs; }
BOOL getHaveNewParcelLimitData() const { return mHaveNewParcelLimitData; }
bool getSeeAVs() const { return mSeeAVs; }
bool getHaveNewParcelLimitData() const { return mHaveNewParcelLimitData; }
// User-specified snapshot
const LLUUID& getSnapshotID() const { return mSnapshotID; }
@ -395,7 +395,7 @@ public:
const LLUUID& getAuthorizedBuyerID() const { return mAuthBuyerID; }
// helper function
BOOL isBuyerAuthorized(const LLUUID& buyer_id) const;
bool isBuyerAuthorized(const LLUUID& buyer_id) const;
// The buyer of a plot is set when someone indicates they want to
// buy the plot, and the system is simply waiting for tier-up
@ -422,7 +422,7 @@ public:
// the isSaleTimerExpired will trivially return FALSE if there is
// no sale going on. Pass in the current time in usec which will
// be used for comparison.
BOOL isSaleTimerExpired(const U64& time);
bool isSaleTimerExpired(const U64& time);
F32 getSaleTimerExpires() { return mSaleTimerExpires.getRemainingTimeF32(); }
@ -431,7 +431,7 @@ public:
// need to record a few things with the parcel when a sale
// starts.
void startSale(const LLUUID& buyer_id, BOOL is_buyer_group);
void startSale(const LLUUID& buyer_id, bool is_buyer_group);
// do the expiration logic, which needs to return values usable in
// a L$ transaction.
@ -440,26 +440,26 @@ public:
void clearSale();
BOOL isMediaResetTimerExpired(const U64& time);
bool isMediaResetTimerExpired(const U64& time);
// more accessors
U32 getParcelFlags() const { return mParcelFlags; }
BOOL getParcelFlag(U32 flag) const
{ return (mParcelFlags & flag) ? TRUE : FALSE; }
bool getParcelFlag(U32 flag) const
{ return (mParcelFlags & flag) ? true : false; }
// objects can be added or modified by anyone (only parcel owner if disabled)
BOOL getAllowModify() const
{ return (mParcelFlags & PF_CREATE_OBJECTS) ? TRUE : FALSE; }
bool getAllowModify() const
{ return (mParcelFlags & PF_CREATE_OBJECTS) ? true : false; }
// objects can be added or modified by group members
BOOL getAllowGroupModify() const
{ return (mParcelFlags & PF_CREATE_GROUP_OBJECTS) ? TRUE : FALSE; }
bool getAllowGroupModify() const
{ return (mParcelFlags & PF_CREATE_GROUP_OBJECTS) ? true : false; }
// the parcel can be deeded to the group
BOOL getAllowDeedToGroup() const
{ return (mParcelFlags & PF_ALLOW_DEED_TO_GROUP) ? TRUE : FALSE; }
bool getAllowDeedToGroup() const
{ return (mParcelFlags & PF_ALLOW_DEED_TO_GROUP) ? true : false; }
// Does the owner want to make a contribution along with the deed.
BOOL getContributeWithDeed() const
@ -537,10 +537,10 @@ public:
S32 getClaimPrice() const { return mClaimPricePerMeter * mArea; }
// Can this agent create objects here?
BOOL allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) const;
bool allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) const;
// Can this agent change the shape of the land?
BOOL allowTerraformBy(const LLUUID &agent_id) const;
bool allowTerraformBy(const LLUUID &agent_id) const;
bool operator==(const LLParcel &rhs) const;

View File

@ -87,21 +87,21 @@ void LLPermissions::initMasks(LLInventoryType::EType type)
}
}
BOOL LLPermissions::getOwnership(LLUUID& owner_id, BOOL& is_group_owned) const
bool LLPermissions::getOwnership(LLUUID& owner_id, bool& is_group_owned) const
{
if(mOwner.notNull())
{
owner_id = mOwner;
is_group_owned = FALSE;
return TRUE;
is_group_owned = false;
return true;
}
else if(mIsGroupOwned)
{
owner_id = mGroup;
is_group_owned = TRUE;
return TRUE;
is_group_owned = true;
return true;
}
return FALSE;
return false;
}
LLUUID LLPermissions::getSafeOwner() const
@ -232,13 +232,13 @@ void LLPermissions::accumulate(const LLPermissions& perm)
// saves last owner, sets current owner, and sets the group. note
// that this function has to more cleverly apply the fair use
// permissions.
BOOL LLPermissions::setOwnerAndGroup(
bool LLPermissions::setOwnerAndGroup(
const LLUUID& agent,
const LLUUID& owner,
const LLUUID& group,
bool is_atomic)
{
BOOL allowed = FALSE;
bool allowed = false;
if( agent.isNull() || mOwner.isNull()
|| ((agent == mOwner) && ((owner == mOwner) || (mMaskOwner & PERM_TRANSFER)) ) )
@ -246,7 +246,7 @@ BOOL LLPermissions::setOwnerAndGroup(
// ...system can alway set owner
// ...public objects can be claimed by anyone
// ...otherwise, agent must own it and have transfer ability
allowed = TRUE;
allowed = true;
}
if (allowed)
@ -301,7 +301,7 @@ void LLPermissions::yesReallySetOwner(const LLUUID& owner, bool group_owned)
mIsGroupOwned = group_owned;
}
BOOL LLPermissions::deedToGroup(const LLUUID& agent, const LLUUID& group)
bool LLPermissions::deedToGroup(const LLUUID& agent, const LLUUID& group)
{
if(group.notNull() && (agent.isNull() || ((group == mGroup)
&& (mMaskOwner & PERM_TRANSFER)
@ -318,18 +318,18 @@ BOOL LLPermissions::deedToGroup(const LLUUID& agent, const LLUUID& group)
mIsGroupOwned = true;
fixFairUse();
fix();
return TRUE;
return true;
}
return FALSE;
return false;
}
BOOL LLPermissions::setBaseBits(const LLUUID& agent, BOOL set, PermissionMask bits)
bool LLPermissions::setBaseBits(const LLUUID& agent, bool set, PermissionMask bits)
{
BOOL ownership = FALSE;
bool ownership = true;
if(agent.isNull())
{
// only the system is always allowed to change base bits
ownership = TRUE;
ownership = true;
}
if (ownership)
@ -351,19 +351,19 @@ BOOL LLPermissions::setBaseBits(const LLUUID& agent, BOOL set, PermissionMask bi
// Note: If you attempt to set bits that the base bits doesn't allow,
// the function will succeed, but those bits will not be set.
BOOL LLPermissions::setOwnerBits(const LLUUID& agent, BOOL set, PermissionMask bits)
bool LLPermissions::setOwnerBits(const LLUUID& agent, bool set, PermissionMask bits)
{
BOOL ownership = FALSE;
bool ownership = false;
if(agent.isNull())
{
// ...system always allowed to change things
ownership = TRUE;
ownership = true;
}
else if (agent == mOwner)
{
// ...owner bits can only be set by owner
ownership = TRUE;
ownership = true;
}
// If we have correct ownership and
@ -383,15 +383,15 @@ BOOL LLPermissions::setOwnerBits(const LLUUID& agent, BOOL set, PermissionMask b
return (ownership);
}
BOOL LLPermissions::setGroupBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits)
bool LLPermissions::setGroupBits(const LLUUID& agent, const LLUUID& group, bool set, PermissionMask bits)
{
BOOL ownership = FALSE;
bool ownership = false;
if((agent.isNull()) || (agent == mOwner)
|| ((group == mGroup) && (!mGroup.isNull())))
{
// The group bits can be set by the system, the owner, or a
// group member.
ownership = TRUE;
ownership = true;
}
if (ownership)
@ -412,15 +412,15 @@ BOOL LLPermissions::setGroupBits(const LLUUID& agent, const LLUUID& group, BOOL
// Note: If you attempt to set bits that the creator or owner doesn't allow,
// the function will succeed, but those bits will not be set.
BOOL LLPermissions::setEveryoneBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits)
bool LLPermissions::setEveryoneBits(const LLUUID& agent, const LLUUID& group, bool set, PermissionMask bits)
{
BOOL ownership = FALSE;
bool ownership = false;
if((agent.isNull()) || (agent == mOwner)
|| ((group == mGroup) && (!mGroup.isNull())))
{
// The everyone bits can be set by the system, the owner, or a
// group member.
ownership = TRUE;
ownership = true;
}
if (ownership)
{
@ -441,15 +441,15 @@ BOOL LLPermissions::setEveryoneBits(const LLUUID& agent, const LLUUID& group, BO
// Note: If you attempt to set bits that the creator or owner doesn't allow,
// the function will succeed, but those bits will not be set.
BOOL LLPermissions::setNextOwnerBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits)
bool LLPermissions::setNextOwnerBits(const LLUUID& agent, const LLUUID& group, bool set, PermissionMask bits)
{
BOOL ownership = FALSE;
bool ownership = false;
if((agent.isNull()) || (agent == mOwner)
|| ((group == mGroup) && (!mGroup.isNull())))
{
// The next owner bits can be set by the system, the owner, or
// a group member.
ownership = TRUE;
ownership = true;
}
if (ownership)
{
@ -478,7 +478,7 @@ bool LLPermissions::allowOperationBy(PermissionBit op, const LLUUID& requester,
{
// ...system making request
// ...not owned
return TRUE;
return true;
}
else if (mIsGroupOwned && (mGroup == requester))
{
@ -513,7 +513,7 @@ LLSD LLPermissions::packMessage() const
result["group-mask"] = (S32)mMaskGroup;
result["everyone-mask"] = (S32)mMaskEveryone;
result["next-owner-mask"]= (S32)mMaskNextOwner;
result["group-owned"] = (BOOL)mIsGroupOwned;
result["group-owned"] = (bool)mIsGroupOwned;
return result;
}
@ -531,7 +531,7 @@ void LLPermissions::packMessage(LLMessageSystem* msg) const
msg->addU32Fast(_PREHASH_GroupMask, mMaskGroup );
msg->addU32Fast(_PREHASH_EveryoneMask, mMaskEveryone );
msg->addU32Fast(_PREHASH_NextOwnerMask, mMaskNextOwner );
msg->addBOOLFast(_PREHASH_GroupOwned, (BOOL)mIsGroupOwned);
msg->addBOOLFast(_PREHASH_GroupOwned, mIsGroupOwned);
}
void LLPermissions::unpackMessage(LLSD perms)
@ -559,13 +559,13 @@ void LLPermissions::unpackMessage(LLMessageSystem* msg, const char* block, S32 b
msg->getU32Fast(block, _PREHASH_GroupMask, mMaskGroup, block_num );
msg->getU32Fast(block, _PREHASH_EveryoneMask, mMaskEveryone, block_num );
msg->getU32Fast(block, _PREHASH_NextOwnerMask, mMaskNextOwner, block_num );
BOOL tmp;
bool tmp;
msg->getBOOLFast(block, _PREHASH_GroupOwned, tmp, block_num);
mIsGroupOwned = (bool)tmp;
mIsGroupOwned = tmp;
}
BOOL LLPermissions::importLegacyStream(std::istream& input_stream)
bool LLPermissions::importLegacyStream(std::istream& input_stream)
{
init(LLUUID::null, LLUUID::null, LLUUID::null, LLUUID::null);
const S32 BUFSIZE = 16384;
@ -661,11 +661,11 @@ BOOL LLPermissions::importLegacyStream(std::istream& input_stream)
}
}
fix();
return TRUE;
return true;
}
BOOL LLPermissions::exportLegacyStream(std::ostream& output_stream) const
bool LLPermissions::exportLegacyStream(std::ostream& output_stream) const
{
std::string uuid_str;
@ -701,12 +701,9 @@ BOOL LLPermissions::exportLegacyStream(std::ostream& output_stream) const
output_stream << "\t\tgroup_owned\t1\n";
}
output_stream << "\t}\n";
return TRUE;
return true;
}
// Deleted LLPermissions::exportFileXML() and LLPermissions::importXML()
// because I can't find any non-test code references to it. 2009-05-04 JC
bool LLPermissions::operator==(const LLPermissions &rhs) const
{
return
@ -791,21 +788,21 @@ U8 LLAggregatePermissions::getU8() const
return byte;
}
BOOL LLAggregatePermissions::isEmpty() const
bool LLAggregatePermissions::isEmpty() const
{
for(S32 i = 0; i < PI_END; ++i)
{
if(mBits[i] != AP_EMPTY)
{
return FALSE;
return false;
}
}
return TRUE;
return true;
}
void LLAggregatePermissions::aggregate(PermissionMask mask)
{
BOOL is_allowed = mask & PERM_COPY;
bool is_allowed = mask & PERM_COPY;
aggregateBit(PI_COPY, is_allowed);
is_allowed = mask & PERM_MODIFY;
aggregateBit(PI_MODIFY, is_allowed);
@ -821,7 +818,7 @@ void LLAggregatePermissions::aggregate(const LLAggregatePermissions& ag)
}
}
void LLAggregatePermissions::aggregateBit(EPermIndex idx, BOOL allowed)
void LLAggregatePermissions::aggregateBit(EPermIndex idx, bool allowed)
{
//if(AP_SOME == mBits[idx]) return; // P4 branch prediction optimization
switch(mBits[idx])

View File

@ -162,7 +162,7 @@ public:
// either the owner id or the group id, and the is_group_owned
// parameter is appropriately filled. The values of owner_id and
// is_group_owned are not changed if the object is not owned.
BOOL getOwnership(LLUUID& owner_id, BOOL& is_group_owned) const;
bool getOwnership(LLUUID& owner_id, bool& is_group_owned) const;
// Gets the 'safe' owner. This should never return LLUUID::null.
// If no group owned, return the agent owner id normally.
@ -218,7 +218,7 @@ public:
// Currently, the only way to have a collection is when an object
// has inventory and is then itself rolled up into an inventory
// item.
BOOL setOwnerAndGroup(const LLUUID& agent, const LLUUID& owner, const LLUUID& group, bool is_atomic);
bool setOwnerAndGroup(const LLUUID& agent, const LLUUID& owner, const LLUUID& group, bool is_atomic);
// only call this if you know what you're doing
// there are usually perm-bit consequences when the
@ -239,16 +239,16 @@ public:
// owner transfer) then this function will deed the permissions,
// set the next owner mask, and return TRUE. Otherwise, no change
// is effected, and the function returns FALSE.
BOOL deedToGroup(const LLUUID& agent, const LLUUID& group);
bool deedToGroup(const LLUUID& agent, const LLUUID& group);
// Attempt to set or clear the given bitmask. Returns TRUE if you
// are allowed to modify the permissions. If you attempt to turn
// on bits not allowed by the base bits, the function will return
// TRUE, but those bits will not be set.
BOOL setBaseBits( const LLUUID& agent, BOOL set, PermissionMask bits);
BOOL setOwnerBits( const LLUUID& agent, BOOL set, PermissionMask bits);
BOOL setGroupBits( const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits);
BOOL setEveryoneBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits);
BOOL setNextOwnerBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits);
bool setBaseBits( const LLUUID& agent, bool set, PermissionMask bits);
bool setOwnerBits( const LLUUID& agent, bool set, PermissionMask bits);
bool setGroupBits( const LLUUID& agent, const LLUUID& group, bool set, PermissionMask bits);
bool setEveryoneBits(const LLUUID& agent, const LLUUID& group, bool set, PermissionMask bits);
bool setNextOwnerBits(const LLUUID& agent, const LLUUID& group, bool set, PermissionMask bits);
// This is currently only used in the Viewer to handle calling cards
// where the creator is actually used to store the target. Use with care.
@ -312,8 +312,8 @@ public:
void packMessage(LLMessageSystem* msg) const;
void unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0);
BOOL importLegacyStream(std::istream& input_stream);
BOOL exportLegacyStream(std::ostream& output_stream) const;
bool importLegacyStream(std::istream& input_stream);
bool exportLegacyStream(std::ostream& output_stream) const;
bool operator==(const LLPermissions &rhs) const;
bool operator!=(const LLPermissions &rhs) const;
@ -409,8 +409,8 @@ public:
// LSB is to the right
U8 getU8() const;
// return TRUE is the aggregate permissions are empty, otherwise FALSE.
BOOL isEmpty() const ;
// return true is the aggregate permissions are empty, otherwise false.
bool isEmpty() const ;
// pass in a PERM_COPY, PERM_TRANSFER, etc, and an EValue
// enumeration to specifically set that value. Not implemented
@ -440,7 +440,7 @@ protected:
PI_END = 3,
PI_COUNT = 3
};
void aggregateBit(EPermIndex idx, BOOL allowed);
void aggregateBit(EPermIndex idx, bool allowed);
void aggregateIndex(EPermIndex idx, U8 bits);
static EPermIndex perm2PermIndex(PermissionBit bit);

View File

@ -61,7 +61,7 @@ public:
//LLCoordFrame(const F32 *origin, const F32 *rotation); // Assumes "origin" is 1x3 and "rotation" is 1x9 array
//LLCoordFrame(const F32 *origin_and_rotation); // Assumes "origin_and_rotation" is 1x12 array
BOOL isFinite() { return mOrigin.isFinite() && mXAxis.isFinite() && mYAxis.isFinite() && mZAxis.isFinite(); }
bool isFinite() { return mOrigin.isFinite() && mXAxis.isFinite() && mYAxis.isFinite() && mZAxis.isFinite(); }
void reset();
void resetAxes();

View File

@ -41,7 +41,6 @@ class LLInterpVal
{
public:
virtual ~LLInterpVal() {}
virtual void interp(LLInterpVal &target, const F32 frac); // Linear interpolation for each type
};
template <typename Type>
@ -52,7 +51,7 @@ public:
virtual ~LLInterp() {}
virtual void start();
void update(const F32 time);
virtual void update(const F32 time) = 0;
const Type &getCurVal() const;
void setStartVal(const Type &start_val);
@ -67,15 +66,15 @@ public:
void setEndTime(const F32 time);
F32 getEndTime() const;
BOOL isActive() const;
BOOL isDone() const;
bool isActive() const;
bool isDone() const;
protected:
F32 mStartTime;
F32 mEndTime;
F32 mDuration;
BOOL mActive;
BOOL mDone;
bool mActive;
bool mDone;
Type mStartVal;
Type mEndVal;
@ -88,8 +87,8 @@ template <typename Type>
class LLInterpLinear : public LLInterp<Type>
{
public:
/*virtual*/ void start();
void update(const F32 time);
void start() override;
void update(const F32 time) override;
F32 getCurFrac() const;
protected:
F32 mCurFrac;
@ -108,10 +107,10 @@ class LLInterpAttractor : public LLInterp<Type>
{
public:
LLInterpAttractor();
/*virtual*/ void start();
void start() override;
void setStartVel(const Type &vel);
void setForce(const F32 force);
void update(const F32 time);
void update(const F32 time) override;
protected:
F32 mForce;
Type mStartVel;
@ -123,7 +122,7 @@ class LLInterpFunc : public LLInterp<Type>
{
public:
LLInterpFunc();
void update(const F32 time);
void update(const F32 time) override;
void setFunc(Type (*)(const F32, void *data), void *data);
protected:
@ -151,8 +150,8 @@ LLInterp<Type>::LLInterp()
mEndTime = 1.f;
mDuration = 1.f;
mCurTime = 0.f;
mDone = FALSE;
mActive = FALSE;
mDone = false;
mActive = false;
}
template <class Type>
@ -166,8 +165,8 @@ void LLInterp<Type>::start()
{
mCurVal = mStartVal;
mCurTime = mStartTime;
mDone = FALSE;
mActive = FALSE;
mDone = false;
mActive = false;
}
template <class Type>
@ -225,13 +224,13 @@ F32 LLInterp<Type>::getEndTime() const
template <class Type>
BOOL LLInterp<Type>::isDone() const
bool LLInterp<Type>::isDone() const
{
return mDone;
}
template <class Type>
BOOL LLInterp<Type>::isActive() const
bool LLInterp<Type>::isActive() const
{
return mActive;
}
@ -254,7 +253,7 @@ void LLInterpLinear<Type>::update(const F32 time)
F32 dfrac = target_frac - this->mCurFrac;
if (target_frac >= 0.f)
{
this->mActive = TRUE;
this->mActive = true;
}
if (target_frac > 1.f)
@ -262,7 +261,7 @@ void LLInterpLinear<Type>::update(const F32 time)
this->mCurVal = this->mEndVal;
this->mCurFrac = 1.f;
this->mCurTime = time;
this->mDone = TRUE;
this->mDone = true;
return;
}
@ -332,7 +331,7 @@ void LLInterpAttractor<Type>::update(const F32 time)
{
if (time > this->mStartTime)
{
this->mActive = TRUE;
this->mActive = true;
}
else
{
@ -340,7 +339,7 @@ void LLInterpAttractor<Type>::update(const F32 time)
}
if (time > this->mEndTime)
{
this->mDone = TRUE;
this->mDone = true;
return;
}
@ -362,8 +361,8 @@ void LLInterpAttractor<Type>::update(const F32 time)
template <class Type>
LLInterpFunc<Type>::LLInterpFunc() : LLInterp<Type>()
{
mFunc = NULL;
mData = NULL;
mFunc = nullptr;
mData = nullptr;
}
template <class Type>
@ -378,7 +377,7 @@ void LLInterpFunc<Type>::update(const F32 time)
{
if (time > this->mStartTime)
{
this->mActive = TRUE;
this->mActive = true;
}
else
{
@ -386,7 +385,7 @@ void LLInterpFunc<Type>::update(const F32 time)
}
if (time > this->mEndTime)
{
this->mDone = TRUE;
this->mDone = true;
return;
}
@ -405,7 +404,7 @@ void LLInterpExp<Type>::update(const F32 time)
F32 target_frac = (time - this->mStartTime) / this->mDuration;
if (target_frac >= 0.f)
{
this->mActive = TRUE;
this->mActive = true;
}
if (target_frac > 1.f)
@ -413,7 +412,7 @@ void LLInterpExp<Type>::update(const F32 time)
this->mCurVal = this->mEndVal;
this->mCurFrac = 1.f;
this->mCurTime = time;
this->mDone = TRUE;
this->mDone = true;
return;
}

View File

@ -59,34 +59,34 @@
#define tanf(x) ((F32)tan((F64)(x)))
#endif*/
const F32 GRAVITY = -9.8f;
constexpr F32 GRAVITY = -9.8f;
// mathematical constants
const F32 F_PI = 3.1415926535897932384626433832795f;
const F32 F_TWO_PI = 6.283185307179586476925286766559f;
const F32 F_PI_BY_TWO = 1.5707963267948966192313216916398f;
const F32 F_SQRT_TWO_PI = 2.506628274631000502415765284811f;
const F32 F_E = 2.71828182845904523536f;
const F32 F_SQRT2 = 1.4142135623730950488016887242097f;
const F32 F_SQRT3 = 1.73205080756888288657986402541f;
const F32 OO_SQRT2 = 0.7071067811865475244008443621049f;
const F32 OO_SQRT3 = 0.577350269189625764509f;
const F32 DEG_TO_RAD = 0.017453292519943295769236907684886f;
const F32 RAD_TO_DEG = 57.295779513082320876798154814105f;
const F32 F_APPROXIMATELY_ZERO = 0.00001f;
const F32 F_LN10 = 2.3025850929940456840179914546844f;
const F32 OO_LN10 = 0.43429448190325182765112891891661f;
const F32 F_LN2 = 0.69314718056f;
const F32 OO_LN2 = 1.4426950408889634073599246810019f;
constexpr F32 F_PI = 3.1415926535897932384626433832795f;
constexpr F32 F_TWO_PI = 6.283185307179586476925286766559f;
constexpr F32 F_PI_BY_TWO = 1.5707963267948966192313216916398f;
constexpr F32 F_SQRT_TWO_PI = 2.506628274631000502415765284811f;
constexpr F32 F_E = 2.71828182845904523536f;
constexpr F32 F_SQRT2 = 1.4142135623730950488016887242097f;
constexpr F32 F_SQRT3 = 1.73205080756888288657986402541f;
constexpr F32 OO_SQRT2 = 0.7071067811865475244008443621049f;
constexpr F32 OO_SQRT3 = 0.577350269189625764509f;
constexpr F32 DEG_TO_RAD = 0.017453292519943295769236907684886f;
constexpr F32 RAD_TO_DEG = 57.295779513082320876798154814105f;
constexpr F32 F_APPROXIMATELY_ZERO = 0.00001f;
constexpr F32 F_LN10 = 2.3025850929940456840179914546844f;
constexpr F32 OO_LN10 = 0.43429448190325182765112891891661f;
constexpr F32 F_LN2 = 0.69314718056f;
constexpr F32 OO_LN2 = 1.4426950408889634073599246810019f;
const F32 F_ALMOST_ZERO = 0.0001f;
const F32 F_ALMOST_ONE = 1.0f - F_ALMOST_ZERO;
constexpr F32 F_ALMOST_ZERO = 0.0001f;
constexpr F32 F_ALMOST_ONE = 1.0f - F_ALMOST_ZERO;
const F32 GIMBAL_THRESHOLD = 0.000436f; // sets the gimballock threshold 0.025 away from +/-90 degrees
constexpr F32 GIMBAL_THRESHOLD = 0.000436f; // sets the gimballock threshold 0.025 away from +/-90 degrees
// formula: GIMBAL_THRESHOLD = sin(DEG_TO_RAD * gimbal_threshold_angle);
// BUG: Eliminate in favor of F_APPROXIMATELY_ZERO above?
const F32 FP_MAG_THRESHOLD = 0.0000001f;
constexpr F32 FP_MAG_THRESHOLD = 0.0000001f;
// TODO: Replace with logic like is_approx_equal
inline bool is_approx_zero( F32 f ) { return (-F_APPROXIMATELY_ZERO < f) && (f < F_APPROXIMATELY_ZERO); }
@ -123,13 +123,13 @@ inline bool is_zero(F32 x)
inline bool is_approx_equal(F32 x, F32 y)
{
const S32 COMPARE_MANTISSA_UP_TO_BIT = 0x02;
constexpr S32 COMPARE_MANTISSA_UP_TO_BIT = 0x02;
return (std::abs((S32) ((U32&)x - (U32&)y) ) < COMPARE_MANTISSA_UP_TO_BIT);
}
inline bool is_approx_equal(F64 x, F64 y)
{
const S64 COMPARE_MANTISSA_UP_TO_BIT = 0x02;
constexpr S64 COMPARE_MANTISSA_UP_TO_BIT = 0x02;
return (std::abs((S32) ((U64&)x - (U64&)y) ) < COMPARE_MANTISSA_UP_TO_BIT);
}
@ -272,8 +272,8 @@ inline F64 ll_round( F64 val, F64 nearest )
// peak error = -31.4 dB
// RMS error = -28.1 dB
const F32 FAST_MAG_ALPHA = 0.960433870103f;
const F32 FAST_MAG_BETA = 0.397824734759f;
constexpr F32 FAST_MAG_ALPHA = 0.960433870103f;
constexpr F32 FAST_MAG_BETA = 0.397824734759f;
// these provide minimum RMS error
//
@ -281,8 +281,8 @@ const F32 FAST_MAG_BETA = 0.397824734759f;
// peak error = -32.6 dB
// RMS error = -25.7 dB
//
//const F32 FAST_MAG_ALPHA = 0.948059448969f;
//const F32 FAST_MAG_BETA = 0.392699081699f;
//constexpr F32 FAST_MAG_ALPHA = 0.948059448969f;
//constexpr F32 FAST_MAG_BETA = 0.392699081699f;
inline F32 fastMagnitude(F32 a, F32 b)
{
@ -299,8 +299,8 @@ inline F32 fastMagnitude(F32 a, F32 b)
//
// Culled from www.stereopsis.com/FPU.html
const F64 LL_DOUBLE_TO_FIX_MAGIC = 68719476736.0*1.5; //2^36 * 1.5, (52-_shiftamt=36) uses limited precisicion to floor
const S32 LL_SHIFT_AMOUNT = 16; //16.16 fixed point representation,
constexpr F64 LL_DOUBLE_TO_FIX_MAGIC = 68719476736.0*1.5; //2^36 * 1.5, (52-_shiftamt=36) uses limited precisicion to floor
constexpr S32 LL_SHIFT_AMOUNT = 16; //16.16 fixed point representation,
// Endian dependent code
#ifdef LL_LITTLE_ENDIAN

View File

@ -579,7 +579,7 @@ public:
}
}
void addChild(oct_node* child, BOOL silent = FALSE)
void addChild(oct_node* child, bool silent = false)
{
#if LL_OCTREE_PARANOIA_CHECK
@ -626,7 +626,7 @@ public:
}
}
void removeChild(S32 index, BOOL destroy = FALSE)
void removeChild(S32 index, bool destroy = false)
{
for (U32 i = 0; i < this->getListenerCount(); i++)
{
@ -673,7 +673,7 @@ public:
{
if (getChild(i) == node)
{
removeChild(i, TRUE);
removeChild(i, true);
return;
}
}
@ -742,7 +742,7 @@ public:
//(don't notify listeners of addition)
for (U32 i = 0; i < child->getChildCount(); i++)
{
this->addChild(child->getChild(i), TRUE);
this->addChild(child->getChild(i), true);
}
//destroy child
@ -758,7 +758,7 @@ public:
// LLOctreeRoot::insert
bool insert(T* data) override
{
if (data == NULL)
if (data == nullptr)
{
OCT_ERRS << "!!! INVALID ELEMENT ADDED TO OCTREE ROOT !!!" << LL_ENDL;
return false;

View File

@ -959,7 +959,7 @@ void LLQuaternion::unpackFromVector3( const LLVector3& vec )
}
}
BOOL LLQuaternion::parseQuat(const std::string& buf, LLQuaternion* value)
bool LLQuaternion::parseQuat(const std::string& buf, LLQuaternion* value)
{
if( buf.empty() || value == NULL)
{

View File

@ -69,9 +69,9 @@ public:
LLSD getValue() const;
void setValue(const LLSD& sd);
BOOL isIdentity() const;
BOOL isNotIdentity() const;
BOOL isFinite() const; // checks to see if all values of LLQuaternion are finite
bool isIdentity() const;
bool isNotIdentity() const;
bool isFinite() const; // checks to see if all values of LLQuaternion are finite
void quantize16(F32 lower, F32 upper); // changes the vector to reflect quatization
void quantize8(F32 lower, F32 upper); // changes the vector to reflect quatization
void loadIdentity(); // Loads the quaternion that represents the identity rotation
@ -167,7 +167,7 @@ public:
friend const char *OrderToString( const Order order );
friend Order StringToOrder( const char *str );
static BOOL parseQuat(const std::string& buf, LLQuaternion* value);
static bool parseQuat(const std::string& buf, LLQuaternion* value);
// For debugging, only
//static U32 mMultCount;
@ -192,12 +192,12 @@ inline void LLQuaternion::setValue(const LLSD& sd)
}
// checker
inline BOOL LLQuaternion::isFinite() const
inline bool LLQuaternion::isFinite() const
{
return (llfinite(mQ[VX]) && llfinite(mQ[VY]) && llfinite(mQ[VZ]) && llfinite(mQ[VS]));
}
inline BOOL LLQuaternion::isIdentity() const
inline bool LLQuaternion::isIdentity() const
{
return
( mQ[VX] == 0.f ) &&
@ -206,7 +206,7 @@ inline BOOL LLQuaternion::isIdentity() const
( mQ[VS] == 1.f );
}
inline BOOL LLQuaternion::isNotIdentity() const
inline bool LLQuaternion::isNotIdentity() const
{
return
( mQ[VX] != 0.f ) ||

View File

@ -83,14 +83,14 @@ public:
}
// Note: follows GL_QUAD conventions: the top and right edges are not considered part of the rect
BOOL pointInRect(const Type x, const Type y) const
bool pointInRect(const Type x, const Type y) const
{
return mLeft <= x && x < mRight &&
mBottom <= y && y < mTop;
}
//// Note: follows GL_QUAD conventions: the top and right edges are not considered part of the rect
BOOL localPointInRect(const Type x, const Type y) const
bool localPointInRect(const Type x, const Type y) const
{
return 0 <= x && x < getWidth() &&
0 <= y && y < getHeight();
@ -138,7 +138,7 @@ public:
// Note: Does NOT follow GL_QUAD conventions: the top and right edges ARE considered part of the rect
// returns TRUE if any part of rect is is inside this LLRect
BOOL overlaps(const LLRectBase& rect) const
bool overlaps(const LLRectBase& rect) const
{
return !(mLeft > rect.mRight
|| mRight < rect.mLeft
@ -146,7 +146,7 @@ public:
|| mTop < rect.mBottom);
}
BOOL contains(const LLRectBase& rect) const
bool contains(const LLRectBase& rect) const
{
return mLeft <= rect.mLeft
&& mRight >= rect.mRight

View File

@ -114,31 +114,31 @@ struct TrianglesPerLODCache
};
// </FS:ND>
BOOL check_same_clock_dir( const LLVector3& pt1, const LLVector3& pt2, const LLVector3& pt3, const LLVector3& norm)
{
bool check_same_clock_dir( const LLVector3& pt1, const LLVector3& pt2, const LLVector3& pt3, const LLVector3& norm)
{
LLVector3 test = (pt2-pt1)%(pt3-pt2);
//answer
if(test * norm < 0)
{
return FALSE;
return false;
}
else
{
return TRUE;
return true;
}
}
BOOL LLLineSegmentBoxIntersect(const LLVector3& start, const LLVector3& end, const LLVector3& center, const LLVector3& size)
bool LLLineSegmentBoxIntersect(const LLVector3& start, const LLVector3& end, const LLVector3& center, const LLVector3& size)
{
return LLLineSegmentBoxIntersect(start.mV, end.mV, center.mV, size.mV);
}
BOOL LLLineSegmentBoxIntersect(const F32* start, const F32* end, const F32* center, const F32* size)
bool LLLineSegmentBoxIntersect(const F32* start, const F32* end, const F32* center, const F32* size)
{
F32 fAWdU[3];
F32 dir[3];
F32 diff[3];
F32 fAWdU[3]{};
F32 dir[3]{};
F32 diff[3]{};
for (U32 i = 0; i < 3; i++)
{
@ -240,7 +240,7 @@ void calc_tangent_from_triangle(
// and returns the intersection point along dir in intersection_t.
// Moller-Trumbore algorithm
BOOL LLTriangleRayIntersect(const LLVector4a& vert0, const LLVector4a& vert1, const LLVector4a& vert2, const LLVector4a& orig, const LLVector4a& dir,
bool LLTriangleRayIntersect(const LLVector4a& vert0, const LLVector4a& vert1, const LLVector4a& vert2, const LLVector4a& orig, const LLVector4a& dir,
F32& intersection_a, F32& intersection_b, F32& intersection_t)
{
@ -302,15 +302,15 @@ BOOL LLTriangleRayIntersect(const LLVector4a& vert0, const LLVector4a& vert1, co
intersection_a = u[0];
intersection_b = v[0];
intersection_t = t[0];
return TRUE;
return true;
}
}
}
return FALSE;
return false;
}
BOOL LLTriangleRayIntersectTwoSided(const LLVector4a& vert0, const LLVector4a& vert1, const LLVector4a& vert2, const LLVector4a& orig, const LLVector4a& dir,
bool LLTriangleRayIntersectTwoSided(const LLVector4a& vert0, const LLVector4a& vert1, const LLVector4a& vert2, const LLVector4a& orig, const LLVector4a& dir,
F32& intersection_a, F32& intersection_b, F32& intersection_t)
{
F32 u, v, t;
@ -333,7 +333,7 @@ BOOL LLTriangleRayIntersectTwoSided(const LLVector4a& vert0, const LLVector4a& v
if (det > -F_APPROXIMATELY_ZERO && det < F_APPROXIMATELY_ZERO)
{
return FALSE;
return false;
}
F32 inv_det = 1.f / det;
@ -346,7 +346,7 @@ BOOL LLTriangleRayIntersectTwoSided(const LLVector4a& vert0, const LLVector4a& v
u = (tvec.dot3(pvec).getF32()) * inv_det;
if (u < 0.f || u > 1.f)
{
return FALSE;
return false;
}
/* prepare to test V parameter */
@ -357,7 +357,7 @@ BOOL LLTriangleRayIntersectTwoSided(const LLVector4a& vert0, const LLVector4a& v
if (v < 0.f || u + v > 1.f)
{
return FALSE;
return false;
}
/* calculate t, ray intersects triangle */
@ -368,32 +368,9 @@ BOOL LLTriangleRayIntersectTwoSided(const LLVector4a& vert0, const LLVector4a& v
intersection_t = t;
return TRUE;
return true;
}
//helper for non-aligned vectors
BOOL LLTriangleRayIntersect(const LLVector3& vert0, const LLVector3& vert1, const LLVector3& vert2, const LLVector3& orig, const LLVector3& dir,
F32& intersection_a, F32& intersection_b, F32& intersection_t, BOOL two_sided)
{
LLVector4a vert0a, vert1a, vert2a, origa, dira;
vert0a.load3(vert0.mV);
vert1a.load3(vert1.mV);
vert2a.load3(vert2.mV);
origa.load3(orig.mV);
dira.load3(dir.mV);
if (two_sided)
{
return LLTriangleRayIntersectTwoSided(vert0a, vert1a, vert2a, origa, dira,
intersection_a, intersection_b, intersection_t);
}
else
{
return LLTriangleRayIntersect(vert0a, vert1a, vert2a, origa, dira,
intersection_a, intersection_b, intersection_t);
}
}
class LLVolumeOctreeRebound : public LLOctreeTravelerDepthFirst<LLVolumeTriangle, LLVolumeTriangle*>
{
public:
@ -843,16 +820,16 @@ S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 de
}
BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split,
BOOL is_sculpted, S32 sculpt_size)
bool LLProfile::generate(const LLProfileParams& params, bool path_open,F32 detail, S32 split,
bool is_sculpted, S32 sculpt_size)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
if ((!mDirty) && (!is_sculpted))
{
return FALSE;
return false;
}
mDirty = FALSE;
mDirty = false;
if (detail < MIN_LOD)
{
@ -873,7 +850,7 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai
if (begin > end - 0.01f)
{
LL_WARNS() << "LLProfile::generate() assertion failed (begin >= end)" << LL_ENDL;
return FALSE;
return false;
}
S32 face_num = 0;
@ -1054,11 +1031,11 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai
}
if (mOpen && !params.getHollow())
{
addFace(0,mTotal-1,0,LL_FACE_OUTER_SIDE_0, FALSE);
addFace(0,mTotal-1,0,LL_FACE_OUTER_SIDE_0, false);
}
else
{
addFace(0,mTotal,0,LL_FACE_OUTER_SIDE_0, FALSE);
addFace(0,mTotal,0,LL_FACE_OUTER_SIDE_0, false);
}
if (hollow)
@ -1066,15 +1043,15 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai
switch (hole_type)
{
case LL_PCODE_HOLE_SQUARE:
addHole(params, TRUE, 2, 0.5f, hollow, 0.5f, split);
addHole(params, true, 2, 0.5f, hollow, 0.5f, split);
break;
case LL_PCODE_HOLE_TRIANGLE:
addHole(params, TRUE, 3, 0.5f, hollow, 0.5f, split);
addHole(params, true, 3, 0.5f, hollow, 0.5f, split);
break;
case LL_PCODE_HOLE_CIRCLE:
case LL_PCODE_HOLE_SAME:
default:
addHole(params, FALSE, circle_detail, 0.5f, hollow, 0.5f);
addHole(params, false, circle_detail, 0.5f, hollow, 0.5f);
break;
}
}
@ -1082,11 +1059,11 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai
// Special case for openness of sphere
if ((params.getEnd() - params.getBegin()) < 1.f)
{
mOpen = TRUE;
mOpen = true;
}
else if (!hollow)
{
mOpen = FALSE;
mOpen = false;
mProfile.push_back(mProfile[0]);
mTotal++;
}
@ -1104,19 +1081,19 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai
if ( mOpen) // interior edge caps
{
addFace(mTotal-1, 2,0.5,LL_FACE_PROFILE_BEGIN, TRUE);
addFace(mTotal-1, 2,0.5,LL_FACE_PROFILE_BEGIN, true);
if (hollow)
{
addFace(mTotalOut-1, 2,0.5,LL_FACE_PROFILE_END, TRUE);
addFace(mTotalOut-1, 2,0.5,LL_FACE_PROFILE_END, true);
}
else
{
addFace(mTotal-2, 2,0.5,LL_FACE_PROFILE_END, TRUE);
addFace(mTotal-2, 2,0.5,LL_FACE_PROFILE_END, true);
}
}
return TRUE;
return true;
}
@ -1561,14 +1538,14 @@ S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail)
return np;
}
BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
BOOL is_sculpted, S32 sculpt_size)
bool LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
bool is_sculpted, S32 sculpt_size)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
if ((!mDirty) && (!is_sculpted))
{
return FALSE;
return false;
}
if (detail < MIN_LOD)
@ -1577,11 +1554,11 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
detail = MIN_LOD;
}
mDirty = FALSE;
mDirty = false;
S32 np = 2; // hardcode for line
mPath.resize(0);
mOpen = TRUE;
mOpen = true;
// Is this 0xf0 mask really necessary? DK 03/02/05
switch (params.getCurveType() & 0xf0)
@ -1641,7 +1618,7 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
if (params.getEnd() - params.getBegin() >= 0.99f &&
params.getScaleX() >= .99f)
{
mOpen = FALSE;
mOpen = false;
}
//genNGon(params, llfloor(MIN_DETAIL_FACES * detail), 4.f, 0.f);
@ -1685,19 +1662,19 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
break;
};
if (params.getTwist() != params.getTwistBegin()) mOpen = TRUE;
if (params.getTwist() != params.getTwistBegin()) mOpen = true;
//if ((int(fabsf(params.getTwist() - params.getTwistBegin())*100))%100 != 0) {
// mOpen = TRUE;
// mOpen = true;
//}
return TRUE;
return true;
}
BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split,
BOOL is_sculpted, S32 sculpt_size)
bool LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split,
bool is_sculpted, S32 sculpt_size)
{
mOpen = TRUE; // Draw end caps
mOpen = true; // Draw end caps
if (getPathLength() == 0)
{
// Path hasn't been generated yet.
@ -1716,7 +1693,7 @@ BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split,
}
}
return TRUE;
return true;
}

View File

@ -706,9 +706,9 @@ public:
static S32 getNumPoints(const LLProfileParams& params, BOOL path_open, F32 detail = 1.0f, S32 split = 0,
BOOL is_sculpted = FALSE, S32 sculpt_size = 0);
BOOL generate(const LLProfileParams& params, BOOL path_open, F32 detail = 1.0f, S32 split = 0,
BOOL is_sculpted = FALSE, S32 sculpt_size = 0);
BOOL isConcave() const { return mConcave; }
bool generate(const LLProfileParams& params, bool path_open, F32 detail = 1.0f, S32 split = 0,
bool is_sculpted = false, S32 sculpt_size = 0);
bool isConcave() const { return mConcave; }
public:
struct Face
{
@ -795,8 +795,8 @@ public:
static S32 getNumNGonPoints(const LLPathParams& params, S32 sides, F32 offset=0.0f, F32 end_scale = 1.f, F32 twist_scale = 1.f);
void genNGon(const LLPathParams& params, S32 sides, F32 offset=0.0f, F32 end_scale = 1.f, F32 twist_scale = 1.f);
virtual BOOL generate(const LLPathParams& params, F32 detail=1.0f, S32 split = 0,
BOOL is_sculpted = FALSE, S32 sculpt_size = 0);
virtual bool generate(const LLPathParams& params, F32 detail=1.0f, S32 split = 0,
bool is_sculpted = false, S32 sculpt_size = 0);
BOOL isOpen() const { return mOpen; }
F32 getStep() const { return mStep; }
@ -822,8 +822,8 @@ class LLDynamicPath : public LLPath
{
public:
LLDynamicPath() : LLPath() { }
/*virtual*/ BOOL generate(const LLPathParams& params, F32 detail=1.0f, S32 split = 0,
BOOL is_sculpted = FALSE, S32 sculpt_size = 0);
/*virtual*/ bool generate(const LLPathParams& params, F32 detail=1.0f, S32 split = 0,
bool is_sculpted = false, S32 sculpt_size = 0);
};
// Yet another "face" class - caches volume-specific, but not instance-specific data for faces)
@ -1110,9 +1110,7 @@ private:
F32 sculptGetSurfaceArea();
void sculptGenerateEmptyPlaceholder();
void sculptGenerateSpherePlaceholder();
void sculptCalcMeshResolution(U16 width, U16 height, U8 type, S32& s, S32& t);
protected:
BOOL generate();
void createVolumeFaces();
@ -1157,18 +1155,13 @@ private:
std::ostream& operator<<(std::ostream &s, const LLVolumeParams &volume_params);
BOOL LLLineSegmentBoxIntersect(const F32* start, const F32* end, const F32* center, const F32* size);
BOOL LLLineSegmentBoxIntersect(const LLVector3& start, const LLVector3& end, const LLVector3& center, const LLVector3& size);
BOOL LLLineSegmentBoxIntersect(const LLVector4a& start, const LLVector4a& end, const LLVector4a& center, const LLVector4a& size);
bool LLLineSegmentBoxIntersect(const F32* start, const F32* end, const F32* center, const F32* size);
bool LLLineSegmentBoxIntersect(const LLVector3& start, const LLVector3& end, const LLVector3& center, const LLVector3& size);
bool LLLineSegmentBoxIntersect(const LLVector4a& start, const LLVector4a& end, const LLVector4a& center, const LLVector4a& size);
//BOOL LLTriangleRayIntersect(const LLVector3& vert0, const LLVector3& vert1, const LLVector3& vert2, const LLVector3& orig, const LLVector3& dir,
// F32& intersection_a, F32& intersection_b, F32& intersection_t, BOOL two_sided);
BOOL LLTriangleRayIntersect(const LLVector4a& vert0, const LLVector4a& vert1, const LLVector4a& vert2, const LLVector4a& orig, const LLVector4a& dir,
bool LLTriangleRayIntersect(const LLVector4a& vert0, const LLVector4a& vert1, const LLVector4a& vert2, const LLVector4a& orig, const LLVector4a& dir,
F32& intersection_a, F32& intersection_b, F32& intersection_t);
BOOL LLTriangleRayIntersectTwoSided(const LLVector4a& vert0, const LLVector4a& vert1, const LLVector4a& vert2, const LLVector4a& orig, const LLVector4a& dir,
bool LLTriangleRayIntersectTwoSided(const LLVector4a& vert0, const LLVector4a& vert1, const LLVector4a& vert2, const LLVector4a& orig, const LLVector4a& dir,
F32& intersection_a, F32& intersection_b, F32& intersection_t);
#endif

View File

@ -27,7 +27,7 @@
#include "llvolumeoctree.h"
#include "llvector4a.h"
BOOL LLLineSegmentBoxIntersect(const LLVector4a& start, const LLVector4a& end, const LLVector4a& center, const LLVector4a& size)
bool LLLineSegmentBoxIntersect(const LLVector4a& start, const LLVector4a& end, const LLVector4a& center, const LLVector4a& size)
{
LLVector4a fAWdU;
LLVector4a dir;

View File

@ -710,7 +710,7 @@ U32 ray_box(const LLVector3 &ray_point, const LLVector3 &ray_direction,
}
BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
bool ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &prism_center, const LLVector3 &prism_scale, const LLQuaternion &prism_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@ -751,7 +751,7 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
point5 = (point5 * prism_rotation) + prism_center;
// test ray intersection for each face
BOOL b_hit = FALSE;
bool b_hit = false;
LLVector3 face_intersection, face_normal;
F32 distance_squared = 0.0f;
F32 temp;
@ -761,14 +761,14 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
ray_quadrangle(ray_point, ray_direction, point5, point2, point0, intersection, intersection_normal))
{
distance_squared = (ray_point - intersection).magVecSquared();
b_hit = TRUE;
b_hit = true;
}
// face 1
if (ray_direction * ( (point0 - point3) % (point2 - point3)) < 0.0f &&
ray_triangle(ray_point, ray_direction, point2, point3, point0, face_intersection, face_normal))
{
if (TRUE == b_hit)
if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@ -783,7 +783,7 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
distance_squared = (ray_point - face_intersection).magVecSquared();
intersection = face_intersection;
intersection_normal = face_normal;
b_hit = TRUE;
b_hit = true;
}
}
@ -791,7 +791,7 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
if (ray_direction * ( (point1 - point4) % (point3 - point4)) < 0.0f &&
ray_quadrangle(ray_point, ray_direction, point3, point4, point1, face_intersection, face_normal))
{
if (TRUE == b_hit)
if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@ -806,7 +806,7 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
distance_squared = (ray_point - face_intersection).magVecSquared();
intersection = face_intersection;
intersection_normal = face_normal;
b_hit = TRUE;
b_hit = true;
}
}
@ -814,7 +814,7 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
if (ray_direction * ( (point5 - point4) % (point1 - point4)) < 0.0f &&
ray_triangle(ray_point, ray_direction, point1, point4, point5, face_intersection, face_normal))
{
if (TRUE == b_hit)
if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@ -829,7 +829,7 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
distance_squared = (ray_point - face_intersection).magVecSquared();
intersection = face_intersection;
intersection_normal = face_normal;
b_hit = TRUE;
b_hit = true;
}
}
@ -837,7 +837,7 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
if (ray_direction * ( (point4 - point5) % (point2 - point5)) < 0.0f &&
ray_quadrangle(ray_point, ray_direction, point2, point5, point4, face_intersection, face_normal))
{
if (TRUE == b_hit)
if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@ -852,7 +852,7 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
distance_squared = (ray_point - face_intersection).magVecSquared();
intersection = face_intersection;
intersection_normal = face_normal;
b_hit = TRUE;
b_hit = true;
}
}
@ -860,7 +860,7 @@ BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
}
BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
bool ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &t_center, const LLVector3 &t_scale, const LLQuaternion &t_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@ -890,7 +890,7 @@ BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
point3 = (point3 * t_rotation) + t_center;
// test ray intersection for each face
BOOL b_hit = FALSE;
bool b_hit = false;
LLVector3 face_intersection, face_normal;
F32 distance_squared = 1.0e12f;
F32 temp;
@ -900,14 +900,14 @@ BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
ray_triangle(ray_point, ray_direction, point1, point2, point0, intersection, intersection_normal))
{
distance_squared = (ray_point - intersection).magVecSquared();
b_hit = TRUE;
b_hit = true;
}
// face 1
if (ray_direction * ( (point3 - point2) % (point0 - point2)) < 0.0f &&
ray_triangle(ray_point, ray_direction, point2, point3, point0, face_intersection, face_normal))
{
if (TRUE == b_hit)
if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@ -922,7 +922,7 @@ BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
distance_squared = (ray_point - face_intersection).magVecSquared();
intersection = face_intersection;
intersection_normal = face_normal;
b_hit = TRUE;
b_hit = true;
}
}
@ -930,7 +930,7 @@ BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
if (ray_direction * ( (point1 - point3) % (point0 - point3)) < 0.0f &&
ray_triangle(ray_point, ray_direction, point3, point1, point0, face_intersection, face_normal))
{
if (TRUE == b_hit)
if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@ -945,7 +945,7 @@ BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
distance_squared = (ray_point - face_intersection).magVecSquared();
intersection = face_intersection;
intersection_normal = face_normal;
b_hit = TRUE;
b_hit = true;
}
}
@ -953,7 +953,7 @@ BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
if (ray_direction * ( (point2 - point3) % (point1 - point3)) < 0.0f &&
ray_triangle(ray_point, ray_direction, point3, point2, point1, face_intersection, face_normal))
{
if (TRUE == b_hit)
if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@ -966,7 +966,7 @@ BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
{
intersection = face_intersection;
intersection_normal = face_normal;
b_hit = TRUE;
b_hit = true;
}
}
@ -974,7 +974,7 @@ BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
}
BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
bool ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &p_center, const LLVector3 &p_scale, const LLQuaternion &p_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@ -997,7 +997,7 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
point4 = (point4 * p_rotation) + p_center;
// test ray intersection for each face
BOOL b_hit = FALSE;
bool b_hit = false;
LLVector3 face_intersection, face_normal;
F32 distance_squared = 1.0e12f;
F32 temp;
@ -1007,14 +1007,14 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
ray_triangle(ray_point, ray_direction, point4, point1, point0, intersection, intersection_normal))
{
distance_squared = (ray_point - intersection).magVecSquared();
b_hit = TRUE;
b_hit = true;
}
// face 1
if (ray_direction * ( (point2 - point1) % (point0 - point1)) < 0.0f &&
ray_triangle(ray_point, ray_direction, point1, point2, point0, face_intersection, face_normal))
{
if (TRUE == b_hit)
if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@ -1029,7 +1029,7 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
distance_squared = (ray_point - face_intersection).magVecSquared();
intersection = face_intersection;
intersection_normal = face_normal;
b_hit = TRUE;
b_hit = true;
}
}
@ -1037,7 +1037,7 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
if (ray_direction * ( (point3 - point2) % (point0 - point2)) < 0.0f &&
ray_triangle(ray_point, ray_direction, point2, point3, point0, face_intersection, face_normal))
{
if (TRUE == b_hit)
if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@ -1052,7 +1052,7 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
distance_squared = (ray_point - face_intersection).magVecSquared();
intersection = face_intersection;
intersection_normal = face_normal;
b_hit = TRUE;
b_hit = true;
}
}
@ -1060,7 +1060,7 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
if (ray_direction * ( (point4 - point3) % (point0 - point3)) < 0.0f &&
ray_triangle(ray_point, ray_direction, point3, point4, point0, face_intersection, face_normal))
{
if (TRUE == b_hit)
if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@ -1075,7 +1075,7 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
distance_squared = (ray_point - face_intersection).magVecSquared();
intersection = face_intersection;
intersection_normal = face_normal;
b_hit = TRUE;
b_hit = true;
}
}
@ -1083,7 +1083,7 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
if (ray_direction * ( (point3 - point4) % (point2 - point4)) < 0.0f &&
ray_quadrangle(ray_point, ray_direction, point4, point3, point2, face_intersection, face_normal))
{
if (TRUE == b_hit)
if (b_hit)
{
temp = (ray_point - face_intersection).magVecSquared();
if (temp < distance_squared)
@ -1096,7 +1096,7 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
{
intersection = face_intersection;
intersection_normal = face_normal;
b_hit = TRUE;
b_hit = true;
}
}
@ -1104,7 +1104,7 @@ BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
}
BOOL linesegment_circle(const LLVector3 &point_a, const LLVector3 &point_b,
bool linesegment_circle(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &circle_center, const LLVector3 plane_normal, F32 circle_radius,
LLVector3 &intersection)
{
@ -1115,14 +1115,14 @@ BOOL linesegment_circle(const LLVector3 &point_a, const LLVector3 &point_b,
{
if (segment_length >= (point_a - intersection).magVec())
{
return TRUE;
return true;
}
}
return FALSE;
return false;
}
BOOL linesegment_triangle(const LLVector3 &point_a, const LLVector3 &point_b,
bool linesegment_triangle(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@ -1133,14 +1133,14 @@ BOOL linesegment_triangle(const LLVector3 &point_a, const LLVector3 &point_b,
{
if (segment_length >= (point_a - intersection).magVec())
{
return TRUE;
return true;
}
}
return FALSE;
return false;
}
BOOL linesegment_quadrangle(const LLVector3 &point_a, const LLVector3 &point_b,
bool linesegment_quadrangle(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@ -1151,14 +1151,14 @@ BOOL linesegment_quadrangle(const LLVector3 &point_a, const LLVector3 &point_b,
{
if (segment_length >= (point_a - intersection).magVec())
{
return TRUE;
return true;
}
}
return FALSE;
return false;
}
BOOL linesegment_sphere(const LLVector3 &point_a, const LLVector3 &point_b,
bool linesegment_sphere(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &sphere_center, F32 sphere_radius,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@ -1169,14 +1169,14 @@ BOOL linesegment_sphere(const LLVector3 &point_a, const LLVector3 &point_b,
{
if (segment_length >= (point_a - intersection).magVec())
{
return TRUE;
return true;
}
}
return FALSE;
return false;
}
BOOL linesegment_cylinder(const LLVector3 &point_a, const LLVector3 &point_b,
bool linesegment_cylinder(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &cyl_center, const LLVector3 &cyl_scale, const LLQuaternion &cyl_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@ -1187,10 +1187,10 @@ BOOL linesegment_cylinder(const LLVector3 &point_a, const LLVector3 &point_b,
{
if (segment_length >= (point_a - intersection).magVec())
{
return TRUE;
return true;
}
}
return FALSE;
return false;
}
@ -1215,7 +1215,7 @@ U32 linesegment_box(const LLVector3 &point_a, const LLVector3 &point_b,
}
BOOL linesegment_prism(const LLVector3 &point_a, const LLVector3 &point_b,
bool linesegment_prism(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &prism_center, const LLVector3 &prism_scale, const LLQuaternion &prism_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@ -1229,11 +1229,11 @@ BOOL linesegment_prism(const LLVector3 &point_a, const LLVector3 &point_b,
return true;
}
}
return FALSE;
return false;
}
BOOL linesegment_tetrahedron(const LLVector3 &point_a, const LLVector3 &point_b,
bool linesegment_tetrahedron(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &t_center, const LLVector3 &t_scale, const LLQuaternion &t_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@ -1244,14 +1244,14 @@ BOOL linesegment_tetrahedron(const LLVector3 &point_a, const LLVector3 &point_b,
{
if (segment_length >= (point_a - intersection).magVec())
{
return TRUE;
return true;
}
}
return FALSE;
return false;
}
BOOL linesegment_pyramid(const LLVector3 &point_a, const LLVector3 &point_b,
bool linesegment_pyramid(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &p_center, const LLVector3 &p_scale, const LLQuaternion &p_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal)
{
@ -1262,13 +1262,8 @@ BOOL linesegment_pyramid(const LLVector3 &point_a, const LLVector3 &point_b,
{
if (segment_length >= (point_a - intersection).magVec())
{
return TRUE;
return true;
}
}
return FALSE;
return false;
}

View File

@ -129,17 +129,17 @@ BOOL ray_cone(const LLVector3 &ray_point, const LLVector3 &ray_direction,
*/
BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
bool ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &prism_center, const LLVector3 &prism_scale, const LLQuaternion &prism_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
bool ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &t_center, const LLVector3 &t_scale, const LLQuaternion &t_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
bool ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &p_center, const LLVector3 &p_scale, const LLQuaternion &p_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
@ -170,13 +170,13 @@ BOOL ray_hemicone(const LLVector3 &ray_point, const LLVector3 &ray_direction,
*/
BOOL linesegment_circle(const LLVector3 &point_a, const LLVector3 &point_b,
bool linesegment_circle(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &circle_center, const LLVector3 plane_normal, F32 circle_radius,
LLVector3 &intersection);
// point_0 through point_2 define the plane_normal via the right-hand rule:
// circle from point_0 to point_2 with fingers ==> thumb points in direction of normal
BOOL linesegment_triangle(const LLVector3 &point_a, const LLVector3 &point_b,
bool linesegment_triangle(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2,
LLVector3 &intersection, LLVector3 &intersection_normal);
@ -185,19 +185,19 @@ BOOL linesegment_triangle(const LLVector3 &point_a, const LLVector3 &point_b,
// right-hand-rule... curl fingers from lower-left toward lower-right then toward upper-right
// ==> thumb points in direction of normal
// assumes a parallelogram, so point_3 is determined by the other points
BOOL linesegment_quadrangle(const LLVector3 &point_a, const LLVector3 &point_b,
bool linesegment_quadrangle(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2,
LLVector3 &intersection, LLVector3 &intersection_normal);
BOOL linesegment_sphere(const LLVector3 &point_a, const LLVector3 &point_b,
bool linesegment_sphere(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &sphere_center, F32 sphere_radius,
LLVector3 &intersection, LLVector3 &intersection_normal);
// finite right cylinder is defined by end centers: "cyl_top", "cyl_bottom",
// and by the cylinder radius "cyl_radius"
BOOL linesegment_cylinder(const LLVector3 &point_a, const LLVector3 &point_b,
bool linesegment_cylinder(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &cyl_center, const LLVector3 &cyl_scale, const LLQuaternion &cyl_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
@ -213,20 +213,17 @@ U32 linesegment_box(const LLVector3 &point_a, const LLVector3 &point_b,
LLVector3 &intersection, LLVector3 &intersection_normal);
BOOL linesegment_prism(const LLVector3 &point_a, const LLVector3 &point_b,
bool linesegment_prism(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &prism_center, const LLVector3 &prism_scale, const LLQuaternion &prism_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
BOOL linesegment_tetrahedron(const LLVector3 &point_a, const LLVector3 &point_b,
bool linesegment_tetrahedron(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &t_center, const LLVector3 &t_scale, const LLQuaternion &t_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
BOOL linesegment_pyramid(const LLVector3 &point_a, const LLVector3 &point_b,
bool linesegment_pyramid(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &p_center, const LLVector3 &p_scale, const LLQuaternion &p_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
#endif

View File

@ -43,12 +43,12 @@ LLVector2 LLVector2::zero(0,0);
// Sets all values to absolute value of their original values
// Returns TRUE if data changed
BOOL LLVector2::abs()
bool LLVector2::abs()
{
BOOL ret = FALSE;
bool ret{ false };
if (mV[0] < 0.f) { mV[0] = -mV[0]; ret = TRUE; }
if (mV[1] < 0.f) { mV[1] = -mV[1]; ret = TRUE; }
if (mV[0] < 0.f) { mV[0] = -mV[0]; ret = true; }
if (mV[1] < 0.f) { mV[1] = -mV[1]; ret = true; }
return ret;
}
@ -67,7 +67,7 @@ F32 angle_between(const LLVector2& a, const LLVector2& b)
return angle;
}
BOOL are_parallel(const LLVector2 &a, const LLVector2 &b, float epsilon)
bool are_parallel(const LLVector2 &a, const LLVector2 &b, float epsilon)
{
LLVector2 an = a;
LLVector2 bn = b;
@ -76,9 +76,9 @@ BOOL are_parallel(const LLVector2 &a, const LLVector2 &b, float epsilon)
F32 dot = an * bn;
if ( (1.0f - fabs(dot)) < epsilon)
{
return TRUE;
return true;
}
return FALSE;
return false;
}

View File

@ -78,12 +78,12 @@ class LLVector2
F32 magVecSquared() const; // deprecated
F32 normVec(); // deprecated
BOOL abs(); // sets all values to absolute value of original value (first octant), returns TRUE if changed
bool abs(); // sets all values to absolute value of original value (first octant), returns TRUE if changed
const LLVector2& scaleVec(const LLVector2& vec); // scales per component by vec
BOOL isNull(); // Returns TRUE if vector has a _very_small_ length
BOOL isExactlyZero() const { return !mV[VX] && !mV[VY]; }
bool isNull(); // Returns TRUE if vector has a _very_small_ length
bool isExactlyZero() const { return !mV[VX] && !mV[VY]; }
F32 operator[](int idx) const { return mV[idx]; }
F32 &operator[](int idx) { return mV[idx]; }
@ -114,7 +114,7 @@ class LLVector2
// Non-member functions
F32 angle_between(const LLVector2 &a, const LLVector2 &b); // Returns angle (radians) between a and b
BOOL are_parallel(const LLVector2 &a, const LLVector2 &b, F32 epsilon=F_APPROXIMATELY_ZERO); // Returns TRUE if a and b are very close to parallel
bool are_parallel(const LLVector2 &a, const LLVector2 &b, F32 epsilon=F_APPROXIMATELY_ZERO); // Returns TRUE if a and b are very close to parallel
F32 dist_vec(const LLVector2 &a, const LLVector2 &b); // Returns distance between a and b
F32 dist_vec_squared(const LLVector2 &a, const LLVector2 &b);// Returns distance squared between a and b
F32 dist_vec_squared2D(const LLVector2 &a, const LLVector2 &b);// Returns distance squared between a and b ignoring Z component
@ -232,7 +232,7 @@ inline F32 LLVector2::lengthSquared(void) const
return mV[0]*mV[0] + mV[1]*mV[1];
}
inline F32 LLVector2::normalize(void)
inline F32 LLVector2::normalize(void)
{
F32 mag = (F32) sqrt(mV[0]*mV[0] + mV[1]*mV[1]);
F32 oomag;
@ -299,13 +299,13 @@ inline const LLVector2& LLVector2::scaleVec(const LLVector2& vec)
return *this;
}
inline BOOL LLVector2::isNull()
inline bool LLVector2::isNull()
{
if ( F_APPROXIMATELY_ZERO > mV[VX]*mV[VX] + mV[VY]*mV[VY] )
{
return TRUE;
return true;
}
return FALSE;
return false;
}

View File

@ -53,30 +53,30 @@ const LLVector3d LLVector3d::z_axis_neg(0, 0, -1);
// Clamps each values to range (min,max).
// Returns TRUE if data changed.
BOOL LLVector3d::clamp(F64 min, F64 max)
bool LLVector3d::clamp(F64 min, F64 max)
{
BOOL ret = FALSE;
bool ret{ false };
if (mdV[0] < min) { mdV[0] = min; ret = TRUE; }
if (mdV[1] < min) { mdV[1] = min; ret = TRUE; }
if (mdV[2] < min) { mdV[2] = min; ret = TRUE; }
if (mdV[0] < min) { mdV[0] = min; ret = true; }
if (mdV[1] < min) { mdV[1] = min; ret = true; }
if (mdV[2] < min) { mdV[2] = min; ret = true; }
if (mdV[0] > max) { mdV[0] = max; ret = TRUE; }
if (mdV[1] > max) { mdV[1] = max; ret = TRUE; }
if (mdV[2] > max) { mdV[2] = max; ret = TRUE; }
if (mdV[0] > max) { mdV[0] = max; ret = true; }
if (mdV[1] > max) { mdV[1] = max; ret = true; }
if (mdV[2] > max) { mdV[2] = max; ret = true; }
return ret;
}
// Sets all values to absolute value of their original values
// Returns TRUE if data changed
BOOL LLVector3d::abs()
bool LLVector3d::abs()
{
BOOL ret = FALSE;
bool ret{ false };
if (mdV[0] < 0.0) { mdV[0] = -mdV[0]; ret = TRUE; }
if (mdV[1] < 0.0) { mdV[1] = -mdV[1]; ret = TRUE; }
if (mdV[2] < 0.0) { mdV[2] = -mdV[2]; ret = TRUE; }
if (mdV[0] < 0.0) { mdV[0] = -mdV[0]; ret = true; }
if (mdV[1] < 0.0) { mdV[1] = -mdV[1]; ret = true; }
if (mdV[2] < 0.0) { mdV[2] = -mdV[2]; ret = true; }
return ret;
}
@ -127,11 +127,11 @@ const LLVector3d& LLVector3d::rotVec(F64 angle, F64 x, F64 y, F64 z)
}
BOOL LLVector3d::parseVector3d(const std::string& buf, LLVector3d* value)
bool LLVector3d::parseVector3d(const std::string& buf, LLVector3d* value)
{
if( buf.empty() || value == NULL)
if( buf.empty() || value == nullptr)
{
return FALSE;
return false;
}
LLVector3d v;
@ -139,9 +139,9 @@ BOOL LLVector3d::parseVector3d(const std::string& buf, LLVector3d* value)
if( 3 == count )
{
value->setVec( v );
return TRUE;
return true;
}
return FALSE;
return false;
}

Some files were not shown because too many files have changed in this diff Show More