File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
src/aliceVision/sfmDataIO Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -623,6 +623,25 @@ void AlembicExporter::addSurveys(const sfmData::SurveyPoints & points)
623
623
{
624
624
OPoints outPoints (_dataImpl->_mvgSurveys , " surveys" );
625
625
OPointsSchema& pSchema = outPoints.getSchema ();
626
+
627
+ // Build positions for abc visualisation
628
+ std::vector<V3f> positions;
629
+ for (const auto & [viewId, vsp] : points)
630
+ {
631
+ for (const auto & sp : vsp)
632
+ {
633
+ positions.emplace_back (sp.point3d [0 ], -sp.point3d [1 ], -sp.point3d [2 ]);
634
+ }
635
+ }
636
+
637
+ // Fake indices
638
+ std::vector<Alembic::Util::uint64_t > ids (positions.size ());
639
+ std::iota (begin (ids), end (ids), 0 );
640
+
641
+ OPointsSchema::Sample psamp (std::move (V3fArraySample (positions)), std::move (UInt64ArraySample (ids)));
642
+ pSchema.set (psamp);
643
+
644
+ // Now, store information useful for AliceVision
626
645
OCompoundProperty userProps = pSchema.getUserProperties ();
627
646
628
647
std::vector<IndexT> indices;
You can’t perform that action at this time.
0 commit comments