47 std::vector<uint32_t> children = std::vector<uint32_t>(4,
NULL_ID)
79 if (c.size() == children.size())
102 std::vector<uint32_t> children;
117 std::array<vec3<T>, 3>
v =
trix.getVertices();
122 w0[0] =
v[2][0]+
v[1][0];
123 w0[1] =
v[2][1]+
v[1][1];
124 w0[2] =
v[2][2]+
v[1][2];
126 w1[0] =
v[2][0]+
v[0][0];
127 w1[1] =
v[2][1]+
v[0][1];
128 w1[2] =
v[2][2]+
v[0][2];
130 w2[0] =
v[1][0]+
v[0][0];
131 w2[1] =
v[1][1]+
v[0][1];
132 w2[2] =
v[1][2]+
v[0][2];
154 std::string
id =
trix.getID();
160 std::array<Trixel<T>, 4>
u {
T1,
T2,
T3,
T4};
A 3D triangle.
Definition triangle.h:24
vec3< T > z
Definition triangle.h:95
vec3< T > y
Definition triangle.h:94
vec3< T > x
Definition triangle.h:93
A triangular pixel of a hierarchical triangular mesh.
Definition trixel.h:19
Trixel()
Construct a new empty Trixel.
Definition trixel.h:26
void setParent(uint32_t &p)
Set the Trixel's parent Trixel.
Definition trixel.h:67
const std::vector< uint32_t > & getChildren() const
Get the Trixel's children.
Definition trixel.h:93
Trixel(std::string id, vec3< T > x, vec3< T > y, vec3< T > z, uint32_t parent=NULL_ID, std::vector< uint32_t > children=std::vector< uint32_t >(4, NULL_ID))
Construct a new Trixel.
Definition trixel.h:41
std::string getID() const
Return the Trixel's id.
Definition trixel.h:57
void setChildren(std::vector< uint32_t > &c)
Set the Trixel's children.
Definition trixel.h:77
glm::vec< L, float, glm::qualifier::highp > vec
Definition commandLine.h:214
const uint32_t NULL_ID
The null Trixel identity.
Definition trixel.h:10
std::array< Trixel< T >, 4 > subdivideTrixel(Trixel< T > &trix)
Subdivide a Trixel.
Definition trixel.h:115