@@ -24,7 +24,11 @@ class SimpleTriangleMesh;
2424
2525// Forward declare quantity types
2626class SimpleTriangleMeshScalarQuantity ;
27+ class SimpleTriangleMeshVertexScalarQuantity ;
28+ class SimpleTriangleMeshFaceScalarQuantity ;
2729class SimpleTriangleMeshColorQuantity ;
30+ class SimpleTriangleMeshVertexColorQuantity ;
31+ class SimpleTriangleMeshFaceColorQuantity ;
2832
2933struct SimpleTriangleMeshPickResult {
3034 // this does nothing for now, just matching pattern from other structures
@@ -64,12 +68,19 @@ class SimpleTriangleMesh : public Structure {
6468
6569 // Scalars
6670 template <class T >
67- SimpleTriangleMeshScalarQuantity* addVertexScalarQuantity (std::string name, const T& values,
68- DataType type = DataType::STANDARD );
71+ SimpleTriangleMeshVertexScalarQuantity* addVertexScalarQuantity (std::string name, const T& values,
72+ DataType type = DataType::STANDARD );
73+
74+ template <class T >
75+ SimpleTriangleMeshFaceScalarQuantity* addFaceScalarQuantity (std::string name, const T& values,
76+ DataType type = DataType::STANDARD );
6977
7078 // Colors
7179 template <class T >
72- SimpleTriangleMeshColorQuantity* addVertexColorQuantity (std::string name, const T& values);
80+ SimpleTriangleMeshVertexColorQuantity* addVertexColorQuantity (std::string name, const T& values);
81+
82+ template <class T >
83+ SimpleTriangleMeshFaceColorQuantity* addFaceColorQuantity (std::string name, const T& values);
7384
7485 // === Mutate
7586
@@ -134,10 +145,13 @@ class SimpleTriangleMesh : public Structure {
134145 void setPickUniforms (render::ShaderProgram& p);
135146
136147 // === Quantity adder implementations
137- SimpleTriangleMeshScalarQuantity* addVertexScalarQuantityImpl (std::string name, const std::vector<float >& data,
138- DataType type);
139- SimpleTriangleMeshColorQuantity* addVertexColorQuantityImpl (std::string name,
140- const std::vector<glm::vec3>& colors);
148+ SimpleTriangleMeshVertexScalarQuantity* addVertexScalarQuantityImpl (std::string name, const std::vector<float >& data,
149+ DataType type);
150+ SimpleTriangleMeshFaceScalarQuantity* addFaceScalarQuantityImpl (std::string name, const std::vector<float >& data,
151+ DataType type);
152+ SimpleTriangleMeshVertexColorQuantity* addVertexColorQuantityImpl (std::string name,
153+ const std::vector<glm::vec3>& colors);
154+ SimpleTriangleMeshFaceColorQuantity* addFaceColorQuantityImpl (std::string name, const std::vector<glm::vec3>& colors);
141155
142156 // == Picking related things
143157 size_t pickStart;
0 commit comments