mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
rest of virtuals removed
virtuals removed and replaced with override where necessary on the rest of the code base, clang-tidy to the rescue.
This commit is contained in:
parent
efbe5e90f5
commit
2b295fb7f0
454 changed files with 4162 additions and 4156 deletions
|
|
@ -47,7 +47,7 @@ public:
|
|||
AssimpAppMaterial(aiMaterial* mtl);
|
||||
~AssimpAppMaterial() { }
|
||||
|
||||
String getName() const { return name; }
|
||||
String getName() const override { return name; }
|
||||
Material* createMaterial(const Torque::Path& path) const;
|
||||
void initMaterial(const Torque::Path& path, Material* mat) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public:
|
|||
//delete geomExt;
|
||||
}
|
||||
|
||||
void lookupSkinData();
|
||||
void lookupSkinData() override;
|
||||
|
||||
static void fixDetailSize(bool fixed, S32 size=2)
|
||||
{
|
||||
|
|
@ -64,7 +64,7 @@ public:
|
|||
/// Get the name of this mesh
|
||||
///
|
||||
/// @return A string containing the name of this mesh
|
||||
const char *getName(bool allowFixed=true);
|
||||
const char *getName(bool allowFixed=true) override;
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ public:
|
|||
/// @param defaultVal Reference to variable to hold return value
|
||||
///
|
||||
/// @return True if a value was set, false if not
|
||||
bool getFloat(const char *propName, F32 &defaultVal)
|
||||
bool getFloat(const char *propName, F32 &defaultVal) override
|
||||
{
|
||||
return appNode->getFloat(propName,defaultVal);
|
||||
}
|
||||
|
|
@ -85,7 +85,7 @@ public:
|
|||
/// @param defaultVal Reference to variable to hold return value
|
||||
///
|
||||
/// @return True if a value was set, false if not
|
||||
bool getInt(const char *propName, S32 &defaultVal)
|
||||
bool getInt(const char *propName, S32 &defaultVal) override
|
||||
{
|
||||
return appNode->getInt(propName,defaultVal);
|
||||
}
|
||||
|
|
@ -96,13 +96,13 @@ public:
|
|||
/// @param defaultVal Reference to variable to hold return value
|
||||
///
|
||||
/// @return True if a value was set, false if not
|
||||
bool getBool(const char *propName, bool &defaultVal)
|
||||
bool getBool(const char *propName, bool &defaultVal) override
|
||||
{
|
||||
return appNode->getBool(propName,defaultVal);
|
||||
}
|
||||
|
||||
/// Return true if this mesh is a skin
|
||||
bool isSkin()
|
||||
bool isSkin() override
|
||||
{
|
||||
return mIsSkinMesh;
|
||||
}
|
||||
|
|
@ -111,15 +111,15 @@ public:
|
|||
///
|
||||
/// @param time Time at which to generate the mesh data
|
||||
/// @param objectOffset Transform to apply to the generated data (bounds transform)
|
||||
void lockMesh(F32 time, const MatrixF& objOffset);
|
||||
void lockMesh(F32 time, const MatrixF& objOffset) override;
|
||||
|
||||
/// Get the transform of this mesh at a certain time
|
||||
///
|
||||
/// @param time Time at which to get the transform
|
||||
///
|
||||
/// @return The mesh transform at the specified time
|
||||
MatrixF getMeshTransform(F32 time);
|
||||
F32 getVisValue(F32 t);
|
||||
MatrixF getMeshTransform(F32 time) override;
|
||||
F32 getVisValue(F32 t) override;
|
||||
};
|
||||
|
||||
#endif // _COLLADA_APPMESH_H_
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ class AssimpAppNode : public AppNode
|
|||
|
||||
MatrixF getTransform(F32 time);
|
||||
void getAnimatedTransform(MatrixF& mat, F32 t, aiAnimation* animSeq);
|
||||
void buildMeshList();
|
||||
void buildChildList();
|
||||
void buildMeshList() override;
|
||||
void buildChildList() override;
|
||||
|
||||
protected:
|
||||
|
||||
|
|
@ -73,10 +73,10 @@ public:
|
|||
static F32 sTimeMultiplier;
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
const char *getName() { return mName; }
|
||||
const char *getParentName() { return mParentName; }
|
||||
const char *getName() override { return mName; }
|
||||
const char *getParentName() override { return mParentName; }
|
||||
|
||||
bool isEqual(AppNode* node)
|
||||
bool isEqual(AppNode* node) override
|
||||
{
|
||||
const AssimpAppNode* appNode = dynamic_cast<const AssimpAppNode*>(node);
|
||||
return (appNode && (appNode->mNode == mNode));
|
||||
|
|
@ -84,21 +84,21 @@ public:
|
|||
|
||||
// Property look-ups: only float properties are stored, the rest are
|
||||
// converted from floats as needed
|
||||
bool getFloat(const char* propName, F32& defaultVal)
|
||||
bool getFloat(const char* propName, F32& defaultVal) override
|
||||
{
|
||||
//Map<StringTableEntry,F32>::Iterator itr = mProps.find(propName);
|
||||
//if (itr != mProps.end())
|
||||
// defaultVal = itr->value;
|
||||
return false;
|
||||
}
|
||||
bool getInt(const char* propName, S32& defaultVal)
|
||||
bool getInt(const char* propName, S32& defaultVal) override
|
||||
{
|
||||
F32 value = defaultVal;
|
||||
bool ret = getFloat(propName, value);
|
||||
defaultVal = (S32)value;
|
||||
return ret;
|
||||
}
|
||||
bool getBool(const char* propName, bool& defaultVal)
|
||||
bool getBool(const char* propName, bool& defaultVal) override
|
||||
{
|
||||
F32 value = defaultVal;
|
||||
bool ret = getFloat(propName, value);
|
||||
|
|
@ -106,9 +106,9 @@ public:
|
|||
return ret;
|
||||
}
|
||||
|
||||
MatrixF getNodeTransform(F32 time);
|
||||
bool animatesTransform(const AppSequence* appSeq);
|
||||
bool isParentRoot() { return (appParent == NULL); }
|
||||
MatrixF getNodeTransform(F32 time) override;
|
||||
bool animatesTransform(const AppSequence* appSeq) override;
|
||||
bool isParentRoot() override { return (appParent == NULL); }
|
||||
|
||||
static void assimpToTorqueMat(const aiMatrix4x4& inAssimpMat, MatrixF& outMat);
|
||||
static void convertMat(MatrixF& outMat);
|
||||
|
|
|
|||
|
|
@ -34,18 +34,18 @@ public:
|
|||
|
||||
aiAnimation *mAnim;
|
||||
|
||||
virtual void setActive(bool active);
|
||||
void setActive(bool active) override;
|
||||
|
||||
virtual S32 getNumTriggers() const { return 0; }
|
||||
virtual void getTrigger(S32 index, TSShape::Trigger& trigger) const { trigger.state = 0; }
|
||||
S32 getNumTriggers() const override { return 0; }
|
||||
void getTrigger(S32 index, TSShape::Trigger& trigger) const override { trigger.state = 0; }
|
||||
|
||||
virtual const char* getName() const { return mSequenceName.c_str(); }
|
||||
const char* getName() const override { return mSequenceName.c_str(); }
|
||||
|
||||
F32 getStart() const { return seqStart; }
|
||||
F32 getEnd() const { return seqEnd; }
|
||||
F32 getStart() const override { return seqStart; }
|
||||
F32 getEnd() const override { return seqEnd; }
|
||||
void setEnd(F32 end) { seqEnd = end; }
|
||||
|
||||
virtual U32 getFlags() const;
|
||||
virtual F32 getPriority() const;
|
||||
virtual F32 getBlendRefTime() const;
|
||||
U32 getFlags() const override;
|
||||
F32 getPriority() const override;
|
||||
F32 getBlendRefTime() const override;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public:
|
|||
ColladaAppMaterial(const domMaterial* pMat);
|
||||
~ColladaAppMaterial() { delete effectExt; }
|
||||
|
||||
String getName() const { return name; }
|
||||
String getName() const override { return name; }
|
||||
|
||||
void resolveFloat(const domCommon_float_or_param_type* value, F32* dst);
|
||||
void resolveColor(const domCommon_color_or_texture_type* value, LinearColorF* dst);
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ public:
|
|||
/// Get the name of this mesh
|
||||
///
|
||||
/// @return A string containing the name of this mesh
|
||||
const char *getName(bool allowFixed=true);
|
||||
const char *getName(bool allowFixed=true) override;
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ public:
|
|||
/// @param defaultVal Reference to variable to hold return value
|
||||
///
|
||||
/// @return True if a value was set, false if not
|
||||
bool getFloat(const char *propName, F32 &defaultVal)
|
||||
bool getFloat(const char *propName, F32 &defaultVal) override
|
||||
{
|
||||
return appNode->getFloat(propName,defaultVal);
|
||||
}
|
||||
|
|
@ -156,7 +156,7 @@ public:
|
|||
/// @param defaultVal Reference to variable to hold return value
|
||||
///
|
||||
/// @return True if a value was set, false if not
|
||||
bool getInt(const char *propName, S32 &defaultVal)
|
||||
bool getInt(const char *propName, S32 &defaultVal) override
|
||||
{
|
||||
return appNode->getInt(propName,defaultVal);
|
||||
}
|
||||
|
|
@ -167,13 +167,13 @@ public:
|
|||
/// @param defaultVal Reference to variable to hold return value
|
||||
///
|
||||
/// @return True if a value was set, false if not
|
||||
bool getBool(const char *propName, bool &defaultVal)
|
||||
bool getBool(const char *propName, bool &defaultVal) override
|
||||
{
|
||||
return appNode->getBool(propName,defaultVal);
|
||||
}
|
||||
|
||||
/// Return true if this mesh is a skin
|
||||
bool isSkin()
|
||||
bool isSkin() override
|
||||
{
|
||||
if (instanceCtrl) {
|
||||
const domController* ctrl = daeSafeCast<domController>(instanceCtrl->getUrl().getElement());
|
||||
|
|
@ -185,48 +185,48 @@ public:
|
|||
}
|
||||
|
||||
/// Get the skin data: bones, vertex weights etc
|
||||
void lookupSkinData();
|
||||
void lookupSkinData() override;
|
||||
|
||||
/// Check if the mesh visibility is animated
|
||||
///
|
||||
/// @param appSeq Start/end time to check
|
||||
///
|
||||
/// @return True if the mesh visibility is animated, false if not
|
||||
bool animatesVis(const AppSequence* appSeq);
|
||||
bool animatesVis(const AppSequence* appSeq) override;
|
||||
|
||||
/// Check if the material used by this mesh is animated
|
||||
///
|
||||
/// @param appSeq Start/end time to check
|
||||
///
|
||||
/// @return True if the material is animated, false if not
|
||||
bool animatesMatFrame(const AppSequence* appSeq);
|
||||
bool animatesMatFrame(const AppSequence* appSeq) override;
|
||||
|
||||
/// Check if the mesh is animated
|
||||
///
|
||||
/// @param appSeq Start/end time to check
|
||||
///
|
||||
/// @return True if the mesh is animated, false if not
|
||||
bool animatesFrame(const AppSequence* appSeq);
|
||||
bool animatesFrame(const AppSequence* appSeq) override;
|
||||
|
||||
/// Generate the vertex, normal and triangle data for the mesh.
|
||||
///
|
||||
/// @param time Time at which to generate the mesh data
|
||||
/// @param objOffset Transform to apply to the generated data (bounds transform)
|
||||
void lockMesh(F32 time, const MatrixF& objOffset);
|
||||
void lockMesh(F32 time, const MatrixF& objOffset) override;
|
||||
|
||||
/// Get the transform of this mesh at a certain time
|
||||
///
|
||||
/// @param time Time at which to get the transform
|
||||
///
|
||||
/// @return The mesh transform at the specified time
|
||||
MatrixF getMeshTransform(F32 time);
|
||||
MatrixF getMeshTransform(F32 time) override;
|
||||
|
||||
/// Get the visibility of this mesh at a certain time
|
||||
///
|
||||
/// @param time Time at which to get visibility info
|
||||
///
|
||||
/// @return Visibility from 0 (invisible) to 1 (opaque)
|
||||
F32 getVisValue(F32 time);
|
||||
F32 getVisValue(F32 time) override;
|
||||
};
|
||||
|
||||
#endif // _COLLADA_APPMESH_H_
|
||||
|
|
|
|||
|
|
@ -44,20 +44,20 @@ public:
|
|||
ColladaAppSequence(const domAnimation_clip* clip);
|
||||
~ColladaAppSequence();
|
||||
|
||||
void setActive(bool active);
|
||||
void setActive(bool active) override;
|
||||
|
||||
const domAnimation_clip* getClip() const { return pClip; }
|
||||
|
||||
S32 getNumTriggers();
|
||||
void getTrigger(S32 index, TSShape::Trigger& trigger);
|
||||
|
||||
const char* getName() const;
|
||||
const char* getName() const override;
|
||||
|
||||
F32 getStart() const { return seqStart; }
|
||||
F32 getEnd() const { return seqEnd; }
|
||||
F32 getStart() const override { return seqStart; }
|
||||
F32 getEnd() const override { return seqEnd; }
|
||||
void setEnd(F32 end) { seqEnd = end; }
|
||||
|
||||
U32 getFlags() const;
|
||||
U32 getFlags() const override;
|
||||
F32 getPriority();
|
||||
F32 getBlendRefTime();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -68,12 +68,12 @@ static FileTime sLastModTime; // Modification time of the last loaded Collada
|
|||
// Custom warning/error message handler
|
||||
class myErrorHandler : public daeErrorHandler
|
||||
{
|
||||
void handleError( daeString msg )
|
||||
void handleError( daeString msg ) override
|
||||
{
|
||||
Con::errorf("Error: %s", msg);
|
||||
}
|
||||
|
||||
void handleWarning( daeString msg )
|
||||
void handleWarning( daeString msg ) override
|
||||
{
|
||||
Con::errorf("Warning: %s", msg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public:
|
|||
virtual ~InstancingMaterialHook();
|
||||
|
||||
// MatInstanceHook
|
||||
virtual const MatInstanceHookType& getType() const { return Type; }
|
||||
const MatInstanceHookType& getType() const override { return Type; }
|
||||
|
||||
/// Returns the instancing material instance or the input material
|
||||
/// instance if one could not be created.
|
||||
|
|
|
|||
|
|
@ -60,15 +60,15 @@ public:
|
|||
// render methods..
|
||||
void render(S32 frame, S32 matFrame, TSMaterialList *);
|
||||
|
||||
bool buildPolyList( S32 frame, AbstractPolyList *polyList, U32 &surfaceKey, TSMaterialList *materials );
|
||||
bool castRay( S32 frame, const Point3F &start, const Point3F &end, RayInfo *rayInfo, TSMaterialList *materials );
|
||||
bool buildConvexHull(); ///< does nothing, skins don't use this
|
||||
bool buildPolyList( S32 frame, AbstractPolyList *polyList, U32 &surfaceKey, TSMaterialList *materials ) override;
|
||||
bool castRay( S32 frame, const Point3F &start, const Point3F &end, RayInfo *rayInfo, TSMaterialList *materials ) override;
|
||||
bool buildConvexHull() override; ///< does nothing, skins don't use this
|
||||
///
|
||||
/// @returns false ALWAYS
|
||||
S32 getNumPolys();
|
||||
|
||||
void assemble(bool skip);
|
||||
void disassemble();
|
||||
void assemble(bool skip) override;
|
||||
void disassemble() override;
|
||||
|
||||
TSSortedMesh() {
|
||||
alwaysWriteDepth = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue