FlowEngine 7.530
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
28namespace FlowEngine
29{
30 class CameraInterface;
31 class StereoPointCloudInterface;
32 class SettingsInterface;
33
38 {
39 public:
40
42 FLE_DLL virtual ~StereoMeshInterface() = default;
43
44 public:
45
47 FLE_DLL virtual Index getPointCount() const = 0;
48
50 FLE_DLL virtual Index getTriangleCount() const = 0;
51
57 FLE_DLL virtual Result getPointPosition( Index idx, Point3 &outPosition ) const = 0;
58
64 FLE_DLL virtual Result getPointColor( Index idx, Color &outColor ) const = 0;
65
72 FLE_DLL virtual Result getTriangle( Index idx, Triangle &outTriangle ) const = 0;
73
78 FLE_DLL virtual Index getPointVisibilityCount( Index pointIndex ) const = 0;
79
94 FLE_DLL virtual Result getPointVisibility( Index pointIndex,
95 Index visibilityIndex,
96 CameraInterface &outCamera ) const = 0;
97
98 public:
99
105 FLE_DLL virtual Result copyFrom( const StereoMeshInterface &inStereoMesh ) = 0;
106
122 FLE_DLL virtual Result reset( Size vertexCount, Size triangleCount ) = 0;
123
142 FLE_DLL virtual Result reset( ConstBuffer< Point3 > vertexData,
143 ConstBuffer< Triangle > triangleData,
144 ConstBuffer< Color > colorData ) = 0;
145
158
162 FLE_DLL virtual Result setPointPosition( Index idx, const Point3 &position ) = 0;
163
167 FLE_DLL virtual Result setPointColor( Index idx, const Color &color ) = 0;
168
172 FLE_DLL virtual Result setTriangle( Index idx, const Triangle &triangle ) = 0;
173
180
181 public:
182
192 FLE_DLL virtual Result removePoint( Index index ) = 0;
193
205 FLE_DLL virtual Result removePoints( ConstBuffer< Index > indexes ) = 0;
206
217 FLE_DLL virtual Result decimate( Size targetVertices, bool preserveBoundaries = false, SettingsInterface *settings = nullptr ) = 0;
218
228 FLE_DLL virtual Result densify( Size targetVertices, SettingsInterface *settings = nullptr ) = 0;
229
244 FLE_DLL virtual Result remesh( double factor, int iterations, SettingsInterface *settings = nullptr ) = 0;
245
255 FLE_DLL virtual Result laplacianSmoothing( int iterations, SettingsInterface *settings = nullptr ) = 0;
256
269 FLE_DLL virtual Result bilateralSmoothing( int iterations, double sigma, SettingsInterface *settings = nullptr ) = 0;
270
277 FLE_DLL virtual Result computeWatertightMesh( SettingsInterface *settings = nullptr ) = 0;
278
281 FLE_DLL virtual Result computeVolume( double &outVolume ) const = 0;
282
285 FLE_DLL virtual Result computeArea( double &outArea ) const = 0;
286
287 public:
288
297 FLE_DLL virtual Result loadFromPly( ConstStringBuffer filePath ) = 0;
298
309 FLE_DLL virtual Result saveToPly( ConstStringBuffer filePath, bool useBinaryEncoding = true ) const = 0;
310
319 FLE_DLL virtual Result loadFromObj( ConstStringBuffer filePath ) = 0;
320
336 FLE_DLL virtual Result saveToObj( ConstStringBuffer filePath, bool saveColor = false ) const = 0;
337
339 FLE_DLL virtual Result extractStereoMesh( StereoPointCloudInterface &outStereoPoints ) const = 0;
340
348 FLE_DLL virtual Result extractStereoPointCloud( StereoPointCloudInterface &outStereoPoints ) const = 0;
349 };
350
354
358}
359
360#endif
#define FLOWENGINE_FACTORY
Definition: CommonDef.h:32
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:38
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 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, bool preserveBoundaries=false, 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 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:38
Definition: BoundingBoxInterface.cpp:26
std::ptrdiff_t Index
Index type.
Definition: CommonDef.h:100
void DestroyStereoMesh(StereoMeshInterface *stereoMesh)
Definition: StereoMeshInterface.cpp:32
std::size_t Size
Size type.
Definition: CommonDef.h:103
StereoMeshInterface * CreateStereoMesh()
Definition: StereoMeshInterface.cpp:27
Result
Enumerates possible results generated by FlowEngine.
Definition: CommonDef.h:45
a packed RGB color
Definition: CommonDef.h:411
Specialization for a const buffer characters.
Definition: CommonDef.h:296
Holds a (non mutable) non_owning pointer and a count Used to marshal memory buffers as arguments in a...
Definition: CommonDef.h:191
a three dimensional point
Definition: CommonDef.h:375
a triangle. Holds 3 indexes to points. Triangles are specified in counter-clockwise order
Definition: CommonDef.h:442