CTS-7 Add hard edge threshold capability to normal generation.
parent
0c50236a94
commit
c02702f387
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue