Commit 0b6795ab authored by Sylvain Thery's avatar Sylvain Thery

multi_attribs modif

parent 998fd0e2
......@@ -70,6 +70,8 @@ struct RefCompo3Type
RefCompo3Type (Compo3Type<T1,T2,T3>& comp);
RefCompo3Type<T1,T2,T3>& operator=(const RefCompo3Type<T1,T2,T3>& v);
RefCompo3Type<T1,T2,T3>& operator=(Compo3Type<T1,T2,T3> v);
Compo3Type<T1,T2,T3> operator+(const RefCompo3Type<T1,T2,T3>& v) const;
Compo3Type<T1,T2,T3> operator-(const RefCompo3Type<T1,T2,T3>& v) const;
Compo3Type<T1,T2,T3> operator/(double d) const;
......@@ -89,8 +91,8 @@ class Vertex3Attributes
VertexAttribute<T2>& m_h2;
VertexAttribute<T3>& m_h3;
public:
typedef Compo3Type<T1,T2,T3> VALUE;
typedef RefCompo3Type<T1,T2,T3> REF;
typedef Compo3Type<T1,T2,T3> DATA_TYPE;
typedef RefCompo3Type<T1,T2,T3> REF_DATA_TYPE;
Vertex3Attributes(VertexAttribute<T1>& h1, VertexAttribute<T2>& h2, VertexAttribute<T3>& h3):
m_h1(h1), m_h2(h2), m_h3(h3) {}
......@@ -104,6 +106,16 @@ public:
{
return RefCompo3Type<T1,T2,T3>(m_h1[d],m_h2[d],m_h3[d]);
}
const RefCompo3Type<T1,T2,T3> operator[](unsigned int a) const
{
return RefCompo3Type<T1,T2,T3>(m_h1[a],m_h2[a],m_h3[a]);
}
const RefCompo3Type<T1,T2,T3> operator[](Dart d) const
{
return RefCompo3Type<T1,T2,T3>(m_h1[d],m_h2[d],m_h3[d]);
}
};
......@@ -114,8 +126,8 @@ class Face3Attributes
FaceAttribute<T2>& m_h2;
FaceAttribute<T3>& m_h3;
public:
typedef Compo3Type<T1,T2,T3> VALUE;
typedef RefCompo3Type<T1,T2,T3> REF;
typedef Compo3Type<T1,T2,T3> DATA_TYPE;
typedef RefCompo3Type<T1,T2,T3> REF_DATA_TYPE;
Face3Attributes(FaceAttribute<T1>& h1, FaceAttribute<T2>& h2, FaceAttribute<T3>& h3):
m_h1(h1), m_h2(h2), m_h3(h3) {}
......@@ -129,6 +141,16 @@ public:
{
return RefCompo3Type<T1,T2,T3>(m_h1[d],m_h2[d],m_h3[d]);
}
const RefCompo3Type<T1,T2,T3> operator[](unsigned int a) const
{
return RefCompo3Type<T1,T2,T3>(m_h1[a],m_h2[a],m_h3[a]);
}
const RefCompo3Type<T1,T2,T3> operator[](Dart d) const
{
return RefCompo3Type<T1,T2,T3>(m_h1[d],m_h2[d],m_h3[d]);
}
};
template <typename T1, typename T2, typename T3>
......@@ -138,8 +160,8 @@ class Volume3Attributes
VolumeAttribute<T2>& m_h2;
VolumeAttribute<T3>& m_h3;
public:
typedef Compo3Type<T1,T2,T3> VALUE;
typedef RefCompo3Type<T1,T2,T3> REF;
typedef Compo3Type<T1,T2,T3> DATA_TYPE;
typedef RefCompo3Type<T1,T2,T3> REF_DATA_TYPE;
Volume3Attributes(VolumeAttribute<T1>& h1, VolumeAttribute<T2>& h2, VolumeAttribute<T2>& h3):
m_h1(h1), m_h2(h2), m_h3(h3) {}
......@@ -153,6 +175,16 @@ public:
{
return RefCompo3Type<T1,T2,T3>(m_h1[d],m_h2[d],m_h3[d]);
}
const RefCompo3Type<T1,T2,T3> operator[](unsigned int a) const
{
return RefCompo3Type<T1,T2,T3>(m_h1[a],m_h2[a],m_h3[a]);
}
const RefCompo3Type<T1,T2,T3> operator[](Dart d) const
{
return RefCompo3Type<T1,T2,T3>(m_h1[d],m_h2[d],m_h3[d]);
}
};
......@@ -275,6 +307,16 @@ RefCompo3Type<T1,T2,T3>& RefCompo3Type<T1,T2,T3>::operator=(const RefCompo3Type<
return *this;
}
template < typename T1, typename T2, typename T3>
RefCompo3Type<T1,T2,T3>& RefCompo3Type<T1,T2,T3>::operator=(Compo3Type<T1,T2,T3> v)
{
m_v1 = v.m_v1;
m_v2 = v.m_v2;
m_v3 = v.m_v3;
return *this;
}
template < typename T1, typename T2, typename T3>
Compo3Type<T1,T2,T3> RefCompo3Type<T1,T2,T3>::operator+(const RefCompo3Type<T1,T2,T3>& v) const
{
......
......@@ -72,6 +72,8 @@ struct RefCompo4Type
RefCompo4Type (Compo4Type<T1,T2,T3,T4>& comp);
RefCompo4Type<T1,T2,T3,T4>& operator=(const RefCompo4Type<T1,T2,T3,T4>& v);
RefCompo4Type<T1,T2,T3,T4>& operator=(Compo4Type<T1,T2,T3,T4> v);
Compo4Type<T1,T2,T3,T4> operator+(const RefCompo4Type<T1,T2,T3,T4>& v) const;
Compo4Type<T1,T2,T3,T4> operator-(const RefCompo4Type<T1,T2,T3,T4>& v) const;
Compo4Type<T1,T2,T3,T4> operator/(double d) const;
......@@ -92,8 +94,8 @@ class Vertex4Attributes
VertexAttribute<T3>& m_h3;
VertexAttribute<T4>& m_h4;
public:
typedef Compo4Type<T1,T2,T3,T4> VALUE;
typedef RefCompo4Type<T1,T2,T3,T4> REF;
typedef Compo4Type<T1,T2,T3,T4> DATA_TYPE;
typedef RefCompo4Type<T1,T2,T3,T4> REF_DATA_TYPE;
Vertex4Attributes(VertexAttribute<T1>& h1, VertexAttribute<T2>& h2, VertexAttribute<T3>& h3, VertexAttribute<T4>& h4):
m_h1(h1), m_h2(h2), m_h3(h3), m_h4(h4) {}
......@@ -107,6 +109,16 @@ public:
{
return RefCompo4Type<T1,T2,T3,T4>(m_h1[d],m_h2[d],m_h3[d],m_h4[d]);
}
const RefCompo4Type<T1,T2,T3,T4> operator[](unsigned int a) const
{
return RefCompo4Type<T1,T2,T3,T4>(m_h1[a],m_h2[a],m_h3[a],m_h4[a]);
}
const RefCompo4Type<T1,T2,T3,T4> operator[](Dart d) const
{
return RefCompo4Type<T1,T2,T3,T4>(m_h1[d],m_h2[d],m_h3[d],m_h4[d]);
}
};
......@@ -118,8 +130,8 @@ class Face4Attributes
FaceAttribute<T3>& m_h3;
FaceAttribute<T4>& m_h4;
public:
typedef Compo4Type<T1,T2,T3,T4> VALUE;
typedef RefCompo4Type<T1,T2,T3,T4> REF;
typedef Compo4Type<T1,T2,T3,T4> DATA_TYPE;
typedef RefCompo4Type<T1,T2,T3,T4> REF_DATA_TYPE;
Face4Attributes(FaceAttribute<T1>& h1, FaceAttribute<T2>& h2, FaceAttribute<T3>& h3, FaceAttribute<T4>& h4):
m_h1(h1), m_h2(h2), m_h3(h3), m_h4(h4) {}
......@@ -133,6 +145,16 @@ public:
{
return RefCompo4Type<T1,T2,T3,T4>(m_h1[d],m_h2[d],m_h3[d],m_h4[d]);
}
const RefCompo4Type<T1,T2,T3,T4> operator[](unsigned int a) const
{
return RefCompo4Type<T1,T2,T3,T4>(m_h1[a],m_h2[a],m_h3[a],m_h4[a]);
}
const RefCompo4Type<T1,T2,T3,T4> operator[](Dart d) const
{
return RefCompo4Type<T1,T2,T3,T4>(m_h1[d],m_h2[d],m_h3[d],m_h4[d]);
}
};
template <typename T1, typename T2, typename T3, typename T4>
......@@ -143,8 +165,8 @@ class Volume4Attributes
VolumeAttribute<T3>& m_h3;
VolumeAttribute<T4>& m_h4;
public:
typedef Compo4Type<T1,T2,T3,T4> VALUE;
typedef RefCompo4Type<T1,T2,T3,T4> REF;
typedef Compo4Type<T1,T2,T3,T4> DATA_TYPE;
typedef RefCompo4Type<T1,T2,T3,T4> REF_DATA_TYPE;
Volume4Attributes(VolumeAttribute<T1>& h1, VolumeAttribute<T2>& h2, VolumeAttribute<T3>& h3, VolumeAttribute<T4>& h4):
m_h1(h1), m_h2(h2), m_h3(h3), m_h4(h4) {}
......@@ -158,6 +180,16 @@ public:
{
return RefCompo4Type<T1,T2,T3,T4>(m_h1[d],m_h2[d],m_h3[d],m_h4[d]);
}
const RefCompo4Type<T1,T2,T3,T4> operator[](unsigned int a) const
{
return RefCompo4Type<T1,T2,T3,T4>(m_h1[a],m_h2[a],m_h3[a],m_h4[a]);
}
const RefCompo4Type<T1,T2,T3,T4> operator[](Dart d) const
{
return RefCompo4Type<T1,T2,T3,T4>(m_h1[d],m_h2[d],m_h3[d],m_h4[d]);
}
};
......@@ -292,6 +324,17 @@ RefCompo4Type<T1,T2,T3,T4>& RefCompo4Type<T1,T2,T3,T4>::operator=(const RefCompo
return *this;
}
template < typename T1, typename T2, typename T3, typename T4 >
RefCompo4Type<T1,T2,T3,T4>& RefCompo4Type<T1,T2,T3,T4>::operator=(Compo4Type<T1,T2,T3,T4> v)
{
m_v1 = v.m_v1;
m_v2 = v.m_v2;
m_v3 = v.m_v3;
m_v4 = v.m_v4;
return *this;
}
template < typename T1, typename T2, typename T3, typename T4 >
Compo4Type<T1,T2,T3,T4> RefCompo4Type<T1,T2,T3,T4>::operator+(const RefCompo4Type<T1,T2,T3,T4>& v) const
{
......
......@@ -66,6 +66,7 @@ struct RefCompo2Type
RefCompo2Type (Compo2Type<T1,T2>& comp);
RefCompo2Type<T1,T2>& operator=(const RefCompo2Type<T1,T2>& v);
RefCompo2Type<T1,T2>& operator=(Compo2Type<T1,T2> v);
Compo2Type<T1,T2> operator+(const RefCompo2Type<T1,T2>& v) const;
Compo2Type<T1,T2> operator-(const RefCompo2Type<T1,T2>& v) const;
......@@ -85,8 +86,8 @@ class Vertex2Attributes
VertexAttribute<T1>& m_h1;
VertexAttribute<T2>& m_h2;
public:
typedef Compo2Type<T1,T2> VALUE;
typedef RefCompo2Type<T1,T2> REF;
typedef Compo2Type<T1,T2> DATA_TYPE;
typedef RefCompo2Type<T1,T2> REF_DATA_TYPE;
Vertex2Attributes(VertexAttribute<T1>& h1, VertexAttribute<T2>& h2):
m_h1(h1), m_h2(h2) {}
......@@ -100,6 +101,16 @@ public:
{
return RefCompo2Type<T1,T2>(m_h1[d],m_h2[d]);
}
const RefCompo2Type<T1,T2> operator[](unsigned int a) const
{
return RefCompo2Type<T1,T2>(m_h1[a],m_h2[a]);
}
const RefCompo2Type<T1,T2> operator[](Dart d) const
{
return RefCompo2Type<T1,T2>(m_h1[d],m_h2[d]);
}
};
......@@ -109,8 +120,8 @@ class Face2Attributes
FaceAttribute<T1>& m_h1;
FaceAttribute<T2>& m_h2;
public:
typedef Compo2Type<T1,T2> VALUE;
typedef RefCompo2Type<T1,T2> REF;
typedef Compo2Type<T1,T2> DATA_TYPE;
typedef RefCompo2Type<T1,T2> REF_DATA_TYPE;
Face2Attributes(FaceAttribute<T1>& h1, FaceAttribute<T2>& h2):
m_h1(h1), m_h2(h2) {}
......@@ -124,6 +135,17 @@ public:
{
return RefCompo2Type<T1,T2>(m_h1[d],m_h2[d]);
}
const RefCompo2Type<T1,T2> operator[](unsigned int a) const
{
return RefCompo2Type<T1,T2>(m_h1[a],m_h2[a]);
}
const RefCompo2Type<T1,T2> operator[](Dart d) const
{
return RefCompo2Type<T1,T2>(m_h1[d],m_h2[d]);
}
};
template <typename T1, typename T2>
......@@ -132,8 +154,8 @@ class Volume2Attributes
VolumeAttribute<T1>& m_h1;
VolumeAttribute<T2>& m_h2;
public:
typedef Compo2Type<T1,T2> VALUE;
typedef RefCompo2Type<T1,T2> REF;
typedef Compo2Type<T1,T2> DATA_TYPE;
typedef RefCompo2Type<T1,T2> REF_DATA_TYPE;
Volume2Attributes(VolumeAttribute<T1>& h1, VolumeAttribute<T2>& h2):
m_h1(h1), m_h2(h2) {}
......@@ -147,6 +169,16 @@ public:
{
return RefCompo2Type<T1,T2>(m_h1[d],m_h2[d]);
}
const RefCompo2Type<T1,T2> operator[](unsigned int a) const
{
return RefCompo2Type<T1,T2>(m_h1[a],m_h2[a]);
}
const RefCompo2Type<T1,T2> operator[](Dart d) const
{
return RefCompo2Type<T1,T2>(m_h1[d],m_h2[d]);
}
};
......@@ -260,6 +292,15 @@ RefCompo2Type<T1,T2>& RefCompo2Type<T1,T2>::operator=(const RefCompo2Type<T1,T2>
return *this;
}
template < typename T1, typename T2>
RefCompo2Type<T1,T2>& RefCompo2Type<T1,T2>::operator=(Compo2Type<T1,T2> v)
{
m_v1 = v.m_v1;
m_v2 = v.m_v2;
return *this;
}
template < typename T1, typename T2>
Compo2Type<T1,T2> RefCompo2Type<T1,T2>::operator+(const RefCompo2Type<T1,T2>& v) const
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment