Skip to content
Snippets Groups Projects
Commit 7ab3e7cd authored by Brad Kittenbrink's avatar Brad Kittenbrink
Browse files

clang compatibility fixes for llreflectionmapmanager.cpp and llvovolume.h

parent c13e2044
No related branches found
No related tags found
No related merge requests found
...@@ -109,12 +109,6 @@ void LLReflectionMapManager::update() ...@@ -109,12 +109,6 @@ void LLReflectionMapManager::update()
} }
} }
// =============== TODO -- move to an init function =================
// naively drop probes every 16m as we move the camera around for now
// later, use LLSpatialPartition to manage probes
const F32 PROBE_SPACING = 16.f;
const U32 MAX_PROBES = 8;
LLVector4a camera_pos; LLVector4a camera_pos;
camera_pos.load3(LLViewerCamera::instance().getOrigin().mV); camera_pos.load3(LLViewerCamera::instance().getOrigin().mV);
...@@ -122,7 +116,7 @@ void LLReflectionMapManager::update() ...@@ -122,7 +116,7 @@ void LLReflectionMapManager::update()
// process kill list // process kill list
for (auto& probe : mKillList) for (auto& probe : mKillList)
{ {
auto& iter = std::find(mProbes.begin(), mProbes.end(), probe); auto const & iter = std::find(mProbes.begin(), mProbes.end(), probe);
if (iter != mProbes.end()) if (iter != mProbes.end())
{ {
deleteProbe(iter - mProbes.begin()); deleteProbe(iter - mProbes.begin());
...@@ -143,7 +137,6 @@ void LLReflectionMapManager::update() ...@@ -143,7 +137,6 @@ void LLReflectionMapManager::update()
{ {
return; return;
} }
const F32 UPDATE_INTERVAL = 5.f; //update no more than once every 5 seconds
bool did_update = false; bool did_update = false;
...@@ -366,7 +359,7 @@ void LLReflectionMapManager::deleteProbe(U32 i) ...@@ -366,7 +359,7 @@ void LLReflectionMapManager::deleteProbe(U32 i)
// remove from any Neighbors lists // remove from any Neighbors lists
for (auto& other : probe->mNeighbors) for (auto& other : probe->mNeighbors)
{ {
auto& iter = std::find(other->mNeighbors.begin(), other->mNeighbors.end(), probe); auto const & iter = std::find(other->mNeighbors.begin(), other->mNeighbors.end(), probe);
llassert(iter != other->mNeighbors.end()); llassert(iter != other->mNeighbors.end());
other->mNeighbors.erase(iter); other->mNeighbors.erase(iter);
} }
...@@ -599,7 +592,7 @@ void LLReflectionMapManager::updateNeighbors(LLReflectionMap* probe) ...@@ -599,7 +592,7 @@ void LLReflectionMapManager::updateNeighbors(LLReflectionMap* probe)
for (auto& other : probe->mNeighbors) for (auto& other : probe->mNeighbors)
{ {
auto& iter = std::find(other->mNeighbors.begin(), other->mNeighbors.end(), probe); auto const & iter = std::find(other->mNeighbors.begin(), other->mNeighbors.end(), probe);
llassert(iter != other->mNeighbors.end()); // <--- bug davep if this ever happens, something broke badly llassert(iter != other->mNeighbors.end()); // <--- bug davep if this ever happens, something broke badly
other->mNeighbors.erase(iter); other->mNeighbors.erase(iter);
} }
......
...@@ -114,39 +114,39 @@ class LLVOVolume : public LLViewerObject ...@@ -114,39 +114,39 @@ class LLVOVolume : public LLViewerObject
}; };
public: public:
LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
/*virtual*/ void markDead(); // Override (and call through to parent) to clean up media references void markDead() override; // Override (and call through to parent) to clean up media references
/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); LLDrawable* createDrawable(LLPipeline *pipeline) override;
void deleteFaces(); void deleteFaces();
void animateTextures(); void animateTextures();
BOOL isVisible() const ; BOOL isVisible() const ;
/*virtual*/ BOOL isActive() const; BOOL isActive() const override;
/*virtual*/ BOOL isAttachment() const; BOOL isAttachment() const override;
/*virtual*/ BOOL isRootEdit() const; // overridden for sake of attachments treating themselves as a root object BOOL isRootEdit() const override; // overridden for sake of attachments treating themselves as a root object
/*virtual*/ BOOL isHUDAttachment() const; BOOL isHUDAttachment() const override;
void generateSilhouette(LLSelectNode* nodep, const LLVector3& view_point); void generateSilhouette(LLSelectNode* nodep, const LLVector3& view_point);
/*virtual*/ BOOL setParent(LLViewerObject* parent); /*virtual*/ BOOL setParent(LLViewerObject* parent) override;
S32 getLOD() const { return mLOD; } S32 getLOD() const override { return mLOD; }
void setNoLOD() { mLOD = NO_LOD; mLODChanged = TRUE; } void setNoLOD() { mLOD = NO_LOD; mLODChanged = TRUE; }
bool isNoLOD() const { return NO_LOD == mLOD; } bool isNoLOD() const { return NO_LOD == mLOD; }
const LLVector3 getPivotPositionAgent() const; const LLVector3 getPivotPositionAgent() const override;
const LLMatrix4& getRelativeXform() const { return mRelativeXform; } const LLMatrix4& getRelativeXform() const { return mRelativeXform; }
const LLMatrix3& getRelativeXformInvTrans() const { return mRelativeXformInvTrans; } const LLMatrix3& getRelativeXformInvTrans() const { return mRelativeXformInvTrans; }
/*virtual*/ const LLMatrix4 getRenderMatrix() const; /*virtual*/ const LLMatrix4 getRenderMatrix() const override;
typedef std::map<LLUUID, S32> texture_cost_t; typedef std::map<LLUUID, S32> texture_cost_t;
U32 getRenderCost(texture_cost_t &textures) const; U32 getRenderCost(texture_cost_t &textures) const;
/*virtual*/ F32 getEstTrianglesMax() const; /*virtual*/ F32 getEstTrianglesMax() const override;
/*virtual*/ F32 getEstTrianglesStreamingCost() const; /*virtual*/ F32 getEstTrianglesStreamingCost() const override;
/* virtual*/ F32 getStreamingCost() const; /* virtual*/ F32 getStreamingCost() const override;
/*virtual*/ bool getCostData(LLMeshCostData& costs) const; /*virtual*/ bool getCostData(LLMeshCostData& costs) const override;
/*virtual*/ U32 getTriangleCount(S32* vcount = NULL) const; /*virtual*/ U32 getTriangleCount(S32* vcount = NULL) const override;
/*virtual*/ U32 getHighLODTriangleCount(); /*virtual*/ U32 getHighLODTriangleCount() override;
/*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES S32 face = -1, // which face to check, -1 = ALL_SIDES
BOOL pick_transparent = FALSE, BOOL pick_transparent = FALSE,
...@@ -157,7 +157,7 @@ class LLVOVolume : public LLViewerObject ...@@ -157,7 +157,7 @@ class LLVOVolume : public LLViewerObject
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
LLVector4a* normal = NULL, // return the surface normal at the intersection point LLVector4a* normal = NULL, // return the surface normal at the intersection point
LLVector4a* tangent = NULL // return the surface tangent at the intersection point LLVector4a* tangent = NULL // return the surface tangent at the intersection point
); ) override;
LLVector3 agentPositionToVolume(const LLVector3& pos) const; LLVector3 agentPositionToVolume(const LLVector3& pos) const;
LLVector3 agentDirectionToVolume(const LLVector3& dir) const; LLVector3 agentDirectionToVolume(const LLVector3& dir) const;
...@@ -167,17 +167,17 @@ class LLVOVolume : public LLViewerObject ...@@ -167,17 +167,17 @@ class LLVOVolume : public LLViewerObject
BOOL getVolumeChanged() const { return mVolumeChanged; } BOOL getVolumeChanged() const { return mVolumeChanged; }
/*virtual*/ F32 getRadius() const { return mVObjRadius; }; F32 getVObjRadius() const override { return mVObjRadius; };
const LLMatrix4& getWorldMatrix(LLXformMatrix* xform) const; const LLMatrix4& getWorldMatrix(LLXformMatrix* xform) const override;
void markForUpdate(BOOL priority); void markForUpdate(BOOL priority) override;
void markForUnload() { LLViewerObject::markForUnload(TRUE); mVolumeChanged = TRUE; } void markForUnload() { LLViewerObject::markForUnload(TRUE); mVolumeChanged = TRUE; }
void faceMappingChanged() { mFaceMappingChanged=TRUE; }; void faceMappingChanged() { mFaceMappingChanged=TRUE; };
/*virtual*/ void onShift(const LLVector4a &shift_vector); // Called when the drawable shifts /*virtual*/ void onShift(const LLVector4a &shift_vector) override; // Called when the drawable shifts
/*virtual*/ void parameterChanged(U16 param_type, bool local_origin); /*virtual*/ void parameterChanged(U16 param_type, bool local_origin) override;
/*virtual*/ void parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_use, bool local_origin); /*virtual*/ void parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_use, bool local_origin) override;
// update mReflectionProbe based on isReflectionProbe() // update mReflectionProbe based on isReflectionProbe()
void updateReflectionProbePtr(); void updateReflectionProbePtr();
...@@ -185,40 +185,40 @@ class LLVOVolume : public LLViewerObject ...@@ -185,40 +185,40 @@ class LLVOVolume : public LLViewerObject
/*virtual*/ U32 processUpdateMessage(LLMessageSystem *mesgsys, /*virtual*/ U32 processUpdateMessage(LLMessageSystem *mesgsys,
void **user_data, void **user_data,
U32 block_num, const EObjectUpdateType update_type, U32 block_num, const EObjectUpdateType update_type,
LLDataPacker *dp); LLDataPacker *dp) override;
/*virtual*/ void setSelected(BOOL sel); /*virtual*/ void setSelected(BOOL sel) override;
/*virtual*/ BOOL setDrawableParent(LLDrawable* parentp); /*virtual*/ BOOL setDrawableParent(LLDrawable* parentp) override;
/*virtual*/ void setScale(const LLVector3 &scale, BOOL damped); /*virtual*/ void setScale(const LLVector3 &scale, BOOL damped) override;
/*virtual*/ void changeTEImage(S32 index, LLViewerTexture* new_image) ; /*virtual*/ void changeTEImage(S32 index, LLViewerTexture* new_image) override;
/*virtual*/ void setNumTEs(const U8 num_tes); /*virtual*/ void setNumTEs(const U8 num_tes) override;
/*virtual*/ void setTEImage(const U8 te, LLViewerTexture *imagep); /*virtual*/ void setTEImage(const U8 te, LLViewerTexture *imagep) override;
/*virtual*/ S32 setTETexture(const U8 te, const LLUUID &uuid); /*virtual*/ S32 setTETexture(const U8 te, const LLUUID &uuid) override;
/*virtual*/ S32 setTEColor(const U8 te, const LLColor3 &color); /*virtual*/ S32 setTEColor(const U8 te, const LLColor3 &color) override;
/*virtual*/ S32 setTEColor(const U8 te, const LLColor4 &color); /*virtual*/ S32 setTEColor(const U8 te, const LLColor4 &color) override;
/*virtual*/ S32 setTEBumpmap(const U8 te, const U8 bump); /*virtual*/ S32 setTEBumpmap(const U8 te, const U8 bump) override;
/*virtual*/ S32 setTEShiny(const U8 te, const U8 shiny); /*virtual*/ S32 setTEShiny(const U8 te, const U8 shiny) override;
/*virtual*/ S32 setTEFullbright(const U8 te, const U8 fullbright); /*virtual*/ S32 setTEFullbright(const U8 te, const U8 fullbright) override;
/*virtual*/ S32 setTEBumpShinyFullbright(const U8 te, const U8 bump); /*virtual*/ S32 setTEBumpShinyFullbright(const U8 te, const U8 bump) override;
/*virtual*/ S32 setTEMediaFlags(const U8 te, const U8 media_flags); /*virtual*/ S32 setTEMediaFlags(const U8 te, const U8 media_flags) override;
/*virtual*/ S32 setTEGlow(const U8 te, const F32 glow); /*virtual*/ S32 setTEGlow(const U8 te, const F32 glow) override;
/*virtual*/ S32 setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID); /*virtual*/ S32 setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID) override;
static void setTEMaterialParamsCallbackTE(const LLUUID& objectID, const LLMaterialID& pMaterialID, const LLMaterialPtr pMaterialParams, U32 te); static void setTEMaterialParamsCallbackTE(const LLUUID& objectID, const LLMaterialID& pMaterialID, const LLMaterialPtr pMaterialParams, U32 te);
/*virtual*/ S32 setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams); /*virtual*/ S32 setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams) override;
/*virtual*/ S32 setTEScale(const U8 te, const F32 s, const F32 t); /*virtual*/ S32 setTEScale(const U8 te, const F32 s, const F32 t) override;
/*virtual*/ S32 setTEScaleS(const U8 te, const F32 s); /*virtual*/ S32 setTEScaleS(const U8 te, const F32 s) override;
/*virtual*/ S32 setTEScaleT(const U8 te, const F32 t); /*virtual*/ S32 setTEScaleT(const U8 te, const F32 t) override;
/*virtual*/ S32 setTETexGen(const U8 te, const U8 texgen); /*virtual*/ S32 setTETexGen(const U8 te, const U8 texgen) override;
/*virtual*/ S32 setTEMediaTexGen(const U8 te, const U8 media); /*virtual*/ S32 setTEMediaTexGen(const U8 te, const U8 media) override;
/*virtual*/ BOOL setMaterial(const U8 material); /*virtual*/ BOOL setMaterial(const U8 material) override;
void setTexture(const S32 face); void setTexture(const S32 face);
S32 getIndexInTex(U32 ch) const {return mIndexInTex[ch];} S32 getIndexInTex(U32 ch) const {return mIndexInTex[ch];}
/*virtual*/ BOOL setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume = false); /*virtual*/ BOOL setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume = false) override;
void updateSculptTexture(); void updateSculptTexture();
void setIndexInTex(U32 ch, S32 index) { mIndexInTex[ch] = index ;} void setIndexInTex(U32 ch, S32 index) { mIndexInTex[ch] = index ;}
void sculpt(); void sculpt();
...@@ -227,21 +227,21 @@ class LLVOVolume : public LLViewerObject ...@@ -227,21 +227,21 @@ class LLVOVolume : public LLViewerObject
void* user_data, S32 status, LLExtStat ext_status); void* user_data, S32 status, LLExtStat ext_status);
void updateRelativeXform(bool force_identity = false); void updateRelativeXform(bool force_identity = false);
/*virtual*/ BOOL updateGeometry(LLDrawable *drawable); /*virtual*/ BOOL updateGeometry(LLDrawable *drawable) override;
/*virtual*/ void updateFaceSize(S32 idx); /*virtual*/ void updateFaceSize(S32 idx) override;
/*virtual*/ BOOL updateLOD(); /*virtual*/ BOOL updateLOD() override;
void updateRadius(); void updateRadius() override;
/*virtual*/ void updateTextures(); /*virtual*/ void updateTextures() override;
void updateTextureVirtualSize(bool forced = false); void updateTextureVirtualSize(bool forced = false);
void updateFaceFlags(); void updateFaceFlags();
void regenFaces(); void regenFaces();
BOOL genBBoxes(BOOL force_global); BOOL genBBoxes(BOOL force_global);
void preRebuild(); void preRebuild();
virtual void updateSpatialExtents(LLVector4a& min, LLVector4a& max); virtual void updateSpatialExtents(LLVector4a& min, LLVector4a& max) override;
virtual F32 getBinRadius(); virtual F32 getBinRadius() override;
virtual U32 getPartitionType() const; virtual U32 getPartitionType() const override;
// For Lights // For Lights
void setIsLight(BOOL is_light); void setIsLight(BOOL is_light);
...@@ -300,11 +300,11 @@ class LLVOVolume : public LLViewerObject ...@@ -300,11 +300,11 @@ class LLVOVolume : public LLViewerObject
// Flexible Objects // Flexible Objects
U32 getVolumeInterfaceID() const; U32 getVolumeInterfaceID() const;
virtual BOOL isFlexible() const; virtual BOOL isFlexible() const override;
virtual BOOL isSculpted() const; virtual BOOL isSculpted() const override;
virtual BOOL isMesh() const; virtual BOOL isMesh() const override;
virtual BOOL isRiggedMesh() const; virtual BOOL isRiggedMesh() const override;
virtual BOOL hasLightTexture() const; virtual BOOL hasLightTexture() const override;
BOOL isVolumeGlobal() const; BOOL isVolumeGlobal() const;
...@@ -321,12 +321,12 @@ class LLVOVolume : public LLViewerObject ...@@ -321,12 +321,12 @@ class LLVOVolume : public LLViewerObject
void onSetExtendedMeshFlags(U32 flags); void onSetExtendedMeshFlags(U32 flags);
void setExtendedMeshFlags(U32 flags); void setExtendedMeshFlags(U32 flags);
bool canBeAnimatedObject() const; bool canBeAnimatedObject() const;
bool isAnimatedObject() const; bool isAnimatedObject() const override;
virtual void onReparent(LLViewerObject *old_parent, LLViewerObject *new_parent); virtual void onReparent(LLViewerObject *old_parent, LLViewerObject *new_parent) override;
virtual void afterReparent(); virtual void afterReparent() override;
//virtual //virtual
void updateRiggingInfo(); void updateRiggingInfo() override;
S32 mLastRiggingInfoLOD; S32 mLastRiggingInfoLOD;
// Functions that deal with media, or media navigation // Functions that deal with media, or media navigation
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment