Skip to content
Snippets Groups Projects
Commit 8e09bdbb authored by Fabian Paus's avatar Fabian Paus
Browse files

Fix circle arrow visu

parent 12c192db
No related branches found
No related tags found
No related merge requests found
...@@ -35,14 +35,14 @@ namespace armarx::viz::coin ...@@ -35,14 +35,14 @@ namespace armarx::viz::coin
} }
auto color = element.color; auto color = element.color;
const float conv = 1.0f / 255.0f; const float conv = 1.0f / 255.0f;
color.r *= conv; float r = color.r * conv;
color.g *= conv; float g = color.g * conv;
color.b *= conv; float b = color.b * conv;
color.a *= conv; float a = color.a * conv;
// This does not play well with
auto torusNode = VirtualRobot::CoinVisualizationFactory().createTorus( auto torusNode = VirtualRobot::CoinVisualizationFactory().createTorus(
element.radius, element.width, torusCompletion, element.radius, element.width, torusCompletion,
color.r, color.g, color.b, 0.0f, r, g, b, 1.0f - a,
8, rings); 8, rings);
SoNode* torus = dynamic_cast<VirtualRobot::CoinVisualizationNode&>(*torusNode).getCoinVisualization(); SoNode* torus = dynamic_cast<VirtualRobot::CoinVisualizationNode&>(*torusNode).getCoinVisualization();
...@@ -59,7 +59,9 @@ namespace armarx::viz::coin ...@@ -59,7 +59,9 @@ namespace armarx::viz::coin
tr->rotation.setValue(SbVec3f(0, 0, 1), angle1); tr->rotation.setValue(SbVec3f(0, 0, 1), angle1);
subSep->addChild(tr); subSep->addChild(tr);
//subSep->addChild(CreateArrow(Eigen::Vector3f::UnitY()*sign, 0, element.width, Color(1.0f, 1.0f, 1.0f))); subSep->addChild(VirtualRobot::CoinVisualizationFactory::CreateArrow(
Eigen::Vector3f::UnitY()*sign, 0, element.width,
VirtualRobot::VisualizationFactory::Color(r, g, b, 1.0f - a)));
node->removeAllChildren(); node->removeAllChildren();
node->addChild(torus); node->addChild(torus);
......
...@@ -196,7 +196,7 @@ void ArVizExample::update() ...@@ -196,7 +196,7 @@ void ArVizExample::update()
Eigen::Vector3f pos = Eigen::Vector3f::Zero(); Eigen::Vector3f pos = Eigen::Vector3f::Zero();
pos.z() = +300.0f; pos.z() = +300.0f;
circle->pose = makeGlobalPose(pos, Eigen::Quaternionf::Identity()); circle->pose = makeGlobalPose(pos, Eigen::Quaternionf::Identity());
circle->color = armarx::viz::Color{255, 255, 0, 255}; circle->color = armarx::viz::Color{200, 255, 0, 255};
layer.elements.push_back(circle); layer.elements.push_back(circle);
} }
......
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