forked from bartvdbraak/blender
Inline accessor methods used by armature deformation.
This commit is contained in:
parent
512c269a16
commit
52a835a179
@ -60,6 +60,8 @@ const MT_Point3& RAS_TexVert::xyz()
|
||||
return g_pt3;
|
||||
}
|
||||
|
||||
#ifndef RAS_TexVert_INLINE
|
||||
|
||||
void RAS_TexVert::SetXYZ(const MT_Point3& xyz)
|
||||
{
|
||||
xyz.getValue(m_localxyz);
|
||||
@ -92,7 +94,6 @@ void RAS_TexVert::SetNormal(const MT_Vector3& normal)
|
||||
}
|
||||
|
||||
|
||||
#ifndef RAS_TexVert_INLINE
|
||||
// leave multiline for debugging
|
||||
const float* RAS_TexVert::getUV1 () const
|
||||
{
|
||||
@ -124,13 +125,13 @@ const unsigned int& RAS_TexVert::getRGBA() const
|
||||
// compare two vertices, and return TRUE if both are almost identical (they can be shared)
|
||||
bool RAS_TexVert::closeTo(const RAS_TexVert* other)
|
||||
{
|
||||
return ((MT_Vector3(m_localxyz) - MT_Vector3(other->m_localxyz)).fuzzyZero() &&
|
||||
(MT_Vector2(m_uv1) - MT_Vector2(other->m_uv1)).fuzzyZero() &&
|
||||
return (m_flag == other->m_flag &&
|
||||
m_rgba == other->m_rgba &&
|
||||
m_normal[0] == other->m_normal[0] &&
|
||||
m_normal[1] == other->m_normal[1] &&
|
||||
m_normal[2] == other->m_normal[2] &&
|
||||
m_flag == other->m_flag &&
|
||||
m_rgba == other->m_rgba) ;
|
||||
(MT_Vector2(m_uv1) - MT_Vector2(other->m_uv1)).fuzzyZero() &&
|
||||
(MT_Vector3(m_localxyz) - MT_Vector3(other->m_localxyz)).fuzzyZero()) ;
|
||||
|
||||
}
|
||||
|
||||
@ -141,12 +142,12 @@ bool RAS_TexVert::closeTo(const MT_Point3& otherxyz,
|
||||
const unsigned int otherrgba,
|
||||
short othernormal[3]) const
|
||||
{
|
||||
return ((MT_Vector3(m_localxyz) - otherxyz).fuzzyZero() &&
|
||||
(MT_Vector2(m_uv1) - otheruv).fuzzyZero() &&
|
||||
return (m_rgba == otherrgba &&
|
||||
m_normal[0] == othernormal[0] &&
|
||||
m_normal[1] == othernormal[1] &&
|
||||
m_normal[2] == othernormal[2] &&
|
||||
m_rgba == otherrgba) ;
|
||||
(MT_Vector2(m_uv1) - otheruv).fuzzyZero() &&
|
||||
(MT_Vector3(m_localxyz) - otherxyz).fuzzyZero()) ;
|
||||
}
|
||||
|
||||
|
||||
|
@ -67,6 +67,35 @@ public:
|
||||
|
||||
// leave multiline for debugging
|
||||
#ifdef RAS_TexVert_INLINE
|
||||
void SetXYZ(const MT_Point3& xyz)
|
||||
{
|
||||
xyz.getValue(m_localxyz);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SetUV(const MT_Point2& uv)
|
||||
{
|
||||
uv.getValue(m_uv1);
|
||||
}
|
||||
|
||||
void SetRGBA(const unsigned int rgba)
|
||||
{
|
||||
m_rgba = rgba;
|
||||
}
|
||||
|
||||
void SetFlag(const short flag)
|
||||
{
|
||||
m_flag = flag;
|
||||
}
|
||||
|
||||
void SetNormal(const MT_Vector3& normal)
|
||||
{
|
||||
m_normal[0] = short(normal.x()*32767.0);
|
||||
m_normal[1] = short(normal.y()*32767.0);
|
||||
m_normal[2] = short(normal.z()*32767.0);
|
||||
}
|
||||
|
||||
const float* getUV1 () const {
|
||||
return m_uv1;
|
||||
};
|
||||
@ -87,9 +116,6 @@ public:
|
||||
const short* getNormal() const;
|
||||
const float* getLocalXYZ() const;
|
||||
const unsigned int& getRGBA() const;
|
||||
#endif
|
||||
|
||||
const MT_Point3& xyz();
|
||||
|
||||
void SetXYZ(const MT_Point3& xyz);
|
||||
void SetUV(const MT_Point2& uv);
|
||||
@ -97,6 +123,9 @@ public:
|
||||
void SetNormal(const MT_Vector3& normal);
|
||||
void SetFlag(const short flag);
|
||||
|
||||
#endif
|
||||
const MT_Point3& xyz();
|
||||
|
||||
// compare two vertices, and return TRUE if both are almost identical (they can be shared)
|
||||
bool closeTo(const RAS_TexVert* other);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user