CTS-7 Add hard edge threshold capability to normal generation.

meow-7.2.2
Dave Parks 2009-11-13 17:01:56 -06:00
parent 0c50236a94
commit c02702f387
2 changed files with 13 additions and 0 deletions

View File

@ -1876,6 +1876,18 @@ bool LLVolumeFace::VertexData::operator==(const LLVolumeFace::VertexData& rhs)co
return true;
}
bool LLVolumeFace::VertexData::compareNormal(const LLVolumeFace::VertexData& rhs, F32 angle_cutoff) const
{
bool retval = false;
if (rhs.mPosition == mPosition && rhs.mTexCoord == mTexCoord)
{
F32 cur_angle = rhs.mNormal*mNormal;
retval = cur_angle > angle_cutoff;
}
return retval;
}
BOOL LLVolume::createVolumeFacesFromFile(const std::string& file_name)
{

View File

@ -814,6 +814,7 @@ public:
bool operator<(const VertexData& rhs) const;
bool operator==(const VertexData& rhs) const;
bool compareNormal(const VertexData& rhs, F32 angle_cutoff) const;
};
enum