MeshModel utility functions

This commit is contained in:
alemuntoni 2021-12-06 10:02:43 +01:00
parent 7591cbda6c
commit d3fc1c62c7
2 changed files with 39 additions and 1 deletions

View File

@ -236,6 +236,36 @@ bool MeshModel::hasDataMask(const int maskToBeTested) const
return ((currentDataMask & maskToBeTested)!= 0);
}
bool MeshModel::hasPerVertexColor() const
{
return currentDataMask & MM_VERTCOLOR;
}
bool MeshModel::hasPerVertexQuality() const
{
return currentDataMask & MM_VERTQUALITY;
}
bool MeshModel::hasPerVertexTexCoord() const
{
return currentDataMask & MM_VERTTEXCOORD;
}
bool MeshModel::hasPerFaceColor() const
{
return currentDataMask & MM_FACECOLOR;
}
bool MeshModel::hasPerFaceQuality() const
{
return currentDataMask & MM_FACEQUALITY;
}
bool MeshModel::hasPerFaceWedgeTexCoords() const
{
return currentDataMask & MM_WEDGTEXCOORD;
}
void MeshModel::updateDataMask()
{
currentDataMask = MM_NONE;

View File

@ -81,7 +81,7 @@ public:
MM_VERTQUALITY = 0x00000010,
MM_VERTMARK = 0x00000020,
MM_VERTFACETOPO = 0x00000040,
MM_VERTCURV = 0x00000080,
MM_VERTCURV = 0x00000080,
MM_VERTCURVDIR = 0x00000100,
MM_VERTRADIUS = 0x00000200,
MM_VERTTEXCOORD = 0x00000400,
@ -182,6 +182,14 @@ public:
void enable(int openingFileMask);
bool hasDataMask(const int maskToBeTested) const;
bool hasPerVertexColor() const;
bool hasPerVertexQuality() const;
bool hasPerVertexTexCoord() const;
bool hasPerFaceColor() const;
bool hasPerFaceQuality() const;
bool hasPerFaceWedgeTexCoords() const;
void updateDataMask();
void updateDataMask(const MeshModel* m);
void updateDataMask(int neededDataMask);