FlowEngine 9.000
Photogrammetry Software Development Kit
Loading...
Searching...
No Matches
StereoMeshInterface.h
Go to the documentation of this file.
1/*
2 *
3 * C@@o ____ _____ __ _
4 * oC8@@@@@@@o |___ \| __ \ / _| |
5 * o@@@@@@@@@@@@O __) | | | | |_| | _____ __
6 * O@O 8@@@@@@@@@O |__ <| | | | _| |/ _ \ \ /\ / /
7 * o@@@@@@@O OOOOOCo ___) | |__| | | | | (_) \ V V /
8 * C@@@@@@@@@@@@Oo |____/|_____/|_| |_|\___/ \_/\_/
9 * o8@@@@@@@@@@@@@@@@8OOCCCC
10 * oO@@@@@@@@@@@@@@@@@@@o 3Dflow s.r.l. - www.3dflow.net
11 * oO8@@@@@@@@@@@@o Copyright 2022
12 * oO88@@@@@@@@8OCo All Rights Reserved
13 * O@@@@@@@@@@@@@@@@@@@@@@@@@8OCCoooooooCCo
14 * @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O
15 * @@@Oo oO8@@@@@@@@@@@@@@@@8
16 *
17 */
18
19#ifndef FLOWENGINESTEREOMESH_H
20#define FLOWENGINESTEREOMESH_H
21
22#pragma once
23
24#include "CommonDef.h"
25
27#include "BulkAccessInterface.h"
28
29namespace FlowEngine
30{
31 class CameraInterface;
32 class StereoPointCloudInterface;
33 class SettingsInterface;
34
40 {
41 public:
42
44 FLE_DLL virtual ~StereoMeshInterface() = default;
45
46 public:
47
49 FLE_DLL virtual Index getPointCount() const = 0;
50
52 FLE_DLL virtual Index getTriangleCount() const = 0;
53
59 FLE_DLL virtual Result getPointPosition( Index idx, Point3 &outPosition ) const = 0;
60
66 FLE_DLL virtual Result getPointColor( Index idx, Color &outColor ) const = 0;
67
74 FLE_DLL virtual Result getTriangle( Index idx, Triangle &outTriangle ) const = 0;
75
80 FLE_DLL virtual Index getPointVisibilityCount( Index pointIndex ) const = 0;
81
96 FLE_DLL virtual Result getPointVisibility( Index pointIndex,
97 Index visibilityIndex,
98 CameraInterface &outCamera ) const = 0;
99
100 public:
101
107 FLE_DLL virtual Result copyFrom( const StereoMeshInterface &inStereoMesh ) = 0;
108
124 FLE_DLL virtual Result reset( Size vertexCount, Size triangleCount ) = 0;
125
144 FLE_DLL virtual Result reset( ConstBuffer< Point3 > vertexData,
145 ConstBuffer< Triangle > triangleData,
146 ConstBuffer< Color > colorData ) = 0;
147
160
164 FLE_DLL virtual Result setPointPosition( Index idx, const Point3 &position ) = 0;
165
169 FLE_DLL virtual Result setPointColor( Index idx, const Color &color ) = 0;
170
174 FLE_DLL virtual Result setTriangle( Index idx, const Triangle &triangle ) = 0;
175
182
183 public:
184
194 FLE_DLL virtual Result removePoint( Index index ) = 0;
195
207 FLE_DLL virtual Result removePoints( ConstBuffer< Index > indexes ) = 0;
208
218 FLE_DLL virtual Result decimate( Size targetVertices, SettingsInterface *settings = nullptr ) = 0;
219
230 FLE_DLL virtual Result decimate( Size targetVertices, bool preserveBoundaries, SettingsInterface *settings = nullptr ) = 0;
231
241 FLE_DLL virtual Result densify( Size targetVertices, SettingsInterface *settings = nullptr ) = 0;
242
253 FLE_DLL virtual Result densify( Size targetVertices, bool preserveBoundaries, SettingsInterface *settings = nullptr ) = 0;
254
269 FLE_DLL virtual Result remesh( double factor, int iterations, SettingsInterface *settings = nullptr ) = 0;
270
280 FLE_DLL virtual Result laplacianSmoothing( int iterations, SettingsInterface *settings = nullptr ) = 0;
281
294 FLE_DLL virtual Result bilateralSmoothing( int iterations, double sigma, SettingsInterface *settings = nullptr ) = 0;
295
302 FLE_DLL virtual Result computeWatertightMesh( SettingsInterface *settings = nullptr ) = 0;
303
306 FLE_DLL virtual Result computeVolume( double &outVolume ) const = 0;
307
310 FLE_DLL virtual Result computeArea( double &outArea ) const = 0;
311
312 public:
313
322 FLE_DLL virtual Result loadFromPly( ConstStringBuffer filePath ) = 0;
323
334 FLE_DLL virtual Result saveToPly( ConstStringBuffer filePath, bool useBinaryEncoding = true ) const = 0;
335
344 FLE_DLL virtual Result loadFromObj( ConstStringBuffer filePath ) = 0;
345
361 FLE_DLL virtual Result saveToObj( ConstStringBuffer filePath, bool saveColor = false ) const = 0;
362
364 FLE_DLL virtual Result extractStereoMesh( StereoPointCloudInterface &outStereoPoints ) const = 0;
365
373 FLE_DLL virtual Result extractStereoPointCloud( StereoPointCloudInterface &outStereoPoints ) const = 0;
374 };
375
379
383}
384
385#endif
#define FLOWENGINE_FACTORY
Definition: CommonDef.h:32
Interface for all FlowEngine objects with functions to access data in bulk.
Definition: BulkAccessInterface.h:30
Stores a camera object to feed the Structure from Motion parameters.
Definition: CameraInterface.h:38
Interface for all FlowEngine objects with an editable name.
Definition: NamedObjectInterface.h:30
Stores the processing settings.
Definition: SettingsInterface.h:32
Stores a simple stereo mesh object for the FlowEngine interface.
Definition: StereoMeshInterface.h:40
virtual FLE_DLL Result extractStereoMesh(StereoPointCloudInterface &outStereoPoints) const =0
Kept for compatibility. See extractStereoPointCloud.
virtual FLE_DLL Result loadFromPly(ConstStringBuffer filePath)=0
virtual FLE_DLL Result removePoint(Index index)=0
virtual FLE_DLL ~StereoMeshInterface()=default
Default virtual destructor.
virtual FLE_DLL Result remesh(double factor, int iterations, SettingsInterface *settings=nullptr)=0
virtual FLE_DLL Result bilateralSmoothing(int iterations, double sigma, SettingsInterface *settings=nullptr)=0
virtual FLE_DLL Result computeVolume(double &outVolume) const =0
virtual FLE_DLL Result setPointColor(Index idx, const Color &color)=0
virtual FLE_DLL Index getPointCount() const =0
virtual FLE_DLL Result setTriangle(Index idx, const Triangle &triangle)=0
virtual FLE_DLL Result extractStereoPointCloud(StereoPointCloudInterface &outStereoPoints) const =0
virtual FLE_DLL Result copyFrom(const StereoMeshInterface &inStereoMesh)=0
virtual FLE_DLL Result loadFromObj(ConstStringBuffer filePath)=0
virtual FLE_DLL Result decimate(Size targetVertices, bool preserveBoundaries, SettingsInterface *settings=nullptr)=0
virtual FLE_DLL Result laplacianSmoothing(int iterations, SettingsInterface *settings=nullptr)=0
virtual FLE_DLL Result saveToPly(ConstStringBuffer filePath, bool useBinaryEncoding=true) const =0
virtual FLE_DLL Result reset(Size vertexCount, Size triangleCount)=0
virtual FLE_DLL Result decimate(Size targetVertices, SettingsInterface *settings=nullptr)=0
virtual FLE_DLL Result setPointPosition(Index idx, const Point3 &position)=0
virtual FLE_DLL Result saveToObj(ConstStringBuffer filePath, bool saveColor=false) const =0
virtual FLE_DLL Result densify(Size targetVertices, SettingsInterface *settings=nullptr)=0
virtual FLE_DLL Result replaceVisibility(ConstBuffer< CameraInterface * > cameras)=0
virtual FLE_DLL Index getTriangleCount() const =0
virtual FLE_DLL Result computeWatertightMesh(SettingsInterface *settings=nullptr)=0
virtual FLE_DLL Result getPointVisibility(Index pointIndex, Index visibilityIndex, CameraInterface &outCamera) const =0
virtual FLE_DLL Result getPointPosition(Index idx, Point3 &outPosition) const =0
virtual FLE_DLL Result getTriangle(Index idx, Triangle &outTriangle) const =0
virtual FLE_DLL Result densify(Size targetVertices, bool preserveBoundaries, SettingsInterface *settings=nullptr)=0
virtual FLE_DLL Result removePoints(ConstBuffer< Index > indexes)=0
virtual FLE_DLL Result reset(ConstBuffer< Point3 > vertexData, ConstBuffer< Triangle > triangleData, ConstBuffer< Color > colorData)=0
virtual FLE_DLL Result computeArea(double &outArea) const =0
virtual FLE_DLL Index getPointVisibilityCount(Index pointIndex) const =0
virtual FLE_DLL Result transform(ConstBuffer< double > transform)=0
virtual FLE_DLL Result getPointColor(Index idx, Color &outColor) const =0
Stores a simple Dense Point Cloud object for the FlowEngine interface.
Definition: StereoPointCloudInterface.h:40
Definition: BoundingBoxInterface.cpp:26
std::ptrdiff_t Index
Index type.
Definition: CommonDef.h:103
void DestroyStereoMesh(StereoMeshInterface *stereoMesh)
Definition: StereoMeshInterface.cpp:32
std::size_t Size
Size type.
Definition: CommonDef.h:106
StereoMeshInterface * CreateStereoMesh()
Definition: StereoMeshInterface.cpp:27
Result
Enumerates possible results generated by FlowEngine.
Definition: CommonDef.h:48
a packed RGB color
Definition: CommonDef.h:495
Specialization for a const buffer characters.
Definition: CommonDef.h:305
Holds a (non mutable) non_owning pointer and a count Used to marshal memory buffers as arguments in a...
Definition: CommonDef.h:200
a three dimensional point
Definition: CommonDef.h:459
a triangle. Holds 3 indexes to points. Triangles are specified in counter-clockwise order
Definition: CommonDef.h:526