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

Add TriMeshModel::rotate

parent 17c392ed
No related branches found
No related tags found
No related merge requests found
......@@ -530,6 +530,20 @@ namespace VirtualRobot
return areas;
}
void TriMeshModel::rotate(const Eigen::Matrix3f& mx)
{
for (auto& vec3f : normals)
{
const Eigen::Vector3f old = vec3f;
vec3f = mx * old;
}
for (auto& vec3f : vertices)
{
const Eigen::Vector3f old = vec3f;
vec3f = mx * old;
}
}
void TriMeshModel::fattenShrink(float offset, bool updateNormals)
{
size_t i;
......
......@@ -122,6 +122,7 @@ namespace VirtualRobot
/// Get the areas of all faces.
std::vector<float> getFaceAreas() const;
void rotate(const Eigen::Matrix3f& mx);
// Overwrite all colors
void setColor(VisualizationFactory::Color color);
......
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