Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube :

Commit 6bc4d3b7 authored by Sylvain Thery's avatar Sylvain Thery
Browse files

Merge into develop

parents 145c0409 688e6976
......@@ -383,6 +383,14 @@ public:
template<typename MAP>
void drawColoredDarts(MAP& map);
* Get back middle position of drawn darts
* @param map the map
* @param posExpl the output positions
template<typename PFP>
void computeDartMiddlePositions(typename PFP::MAP& map, DartAttribute< typename PFP::VEC3, typename PFP::MAP>& posExpl);
......@@ -641,6 +641,23 @@ Dart TopoRender::raySelection(MAP& map, const Geom::Vec3f& rayA, const Geom::Vec
return dFinal;
template <typename PFP>
void TopoRender::computeDartMiddlePositions( typename PFP::MAP& map, DartAttribute< typename PFP::VEC3, typename PFP::MAP>& posExpl)
DartAttribute<unsigned int, typename PFP::MAP> attIndex = map.template getAttribute<unsigned int, DART, typename PFP::MAP>(m_nameIndex);
if (!attIndex.isValid())
attIndex = map.template addAttribute<unsigned int, DART, typename PFP::MAP>(m_nameIndex);
for (Dart d = map.begin(); d != map.end();
const Geom::Vec3f& P = m_bufferDartPosition[attIndex[d]];
const Geom::Vec3f& Q = m_bufferDartPosition[attIndex[d]+1];
posExpl[d] = (P + Q)*0.5f;
} // namespace GL2
} // namespace Algo
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment