Skip to content
Snippets Groups Projects
Commit cc9d7225 authored by Raphael Grimm's avatar Raphael Grimm
Browse files

Add add{Vertex, Normal, Color} variants taking floats to TriMeshModel

parent 760f18cd
No related branches found
No related tags found
No related merge requests found
......@@ -67,9 +67,21 @@ namespace VirtualRobot
static Eigen::Vector3f CreateNormal(const Eigen::Vector3f& vertex1, const Eigen::Vector3f& vertex2, const Eigen::Vector3f& vertex3);
void addFace(const MathTools::TriangleFace& face);
int addVertex(const Eigen::Vector3f& vertex);
int addVertex(float x, float y, float z)
{
return addVertex({x, y, z});
}
unsigned int addNormal(const Eigen::Vector3f& normal);
unsigned int addNormal(float x, float y, float z)
{
return addNormal({x, y, z});
}
unsigned int addColor(const VisualizationFactory::Color& color);
unsigned int addColor(const Eigen::Vector4f& color);
unsigned int addColor(float r, float g, float b, float a)
{
return addColor(Eigen::Vector4f{r, g, b, a});
}
unsigned int addMaterial(const VisualizationFactory::PhongMaterial& material);
void addFace(unsigned int id0, unsigned int id1, unsigned int id2);
void clear();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment