FlowEngine 7.530
Photogrammetry Software Development Kit
Loading...
Searching...
No Matches
StereoTexturedMeshInterface.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 FLOWENGINESTEREOTEXTUREDMESH_H
20#define FLOWENGINESTEREOTEXTUREDMESH_H
21
22#pragma once
23
24#include "CommonDef.h"
25
27
28namespace FlowEngine
29{
30 class StereoMeshInterface;
31
36 {
37 public:
38
40 FLE_DLL virtual ~StereoTexturedMeshInterface() = default;
41
42 public:
43
45 FLE_DLL virtual Index getPointCount() const = 0;
46
48 FLE_DLL virtual Index getTriangleCount() const = 0;
49
59 FLE_DLL virtual Result getPointPosition( Index idx, Point3 &outPosition ) const = 0;
60
69 FLE_DLL virtual Result getPointTexCoords( Index idx, TexCoords &outTexCoord ) const = 0;
70
80 FLE_DLL virtual Result getPointTexCoordData( Buffer< TexCoords > outTexCoordData, bool flipV = false ) const = 0;
81
90 FLE_DLL virtual Result getInputMeshIndexes( Buffer< Index > outIndexes ) const = 0;
91
101 FLE_DLL virtual Result getTriangle( Index idx, Triangle &outTriangle ) const = 0;
102
104 FLE_DLL virtual Index getTextureCount() const = 0;
105
110 FLE_DLL virtual Result getTextureDimensions( Index texIdx,
111 int &outWidth,
112 int &outHeight ) const = 0;
113
118 FLE_DLL virtual Result getTextureData( Index texIdx,
119 Buffer< PointColor32 > outData ) const = 0;
120
135 FLE_DLL virtual Result saveTextureToFile( Index texIdx, ConstStringBuffer filePath, Size textureSize = 0, Size channelBitDepth = 0 ) const = 0;
136
146 FLE_DLL virtual Result loadFromObj( ConstStringBuffer filePath, bool loadTextures ) = 0;
147
164 FLE_DLL virtual Result saveToObj( ConstStringBuffer filePath, bool saveTextures = true, ConstStringBuffer textureFileFormat = "png" ) const = 0;
165
176 FLE_DLL virtual Result extractStereoMesh( StereoMeshInterface &outStereoMesh, bool unifyDuplicatedVertices = true ) const = 0;
177
190 FLE_DLL virtual Result extractStereoMesh( StereoMeshInterface &outStereoMesh, Buffer< Index > inOutTextureToMeshVertexMapping ) const = 0;
191
192 public:
193
199 FLE_DLL virtual Result copyFrom( const StereoTexturedMeshInterface &inStereoTexturedMesh ) = 0;
200
204 FLE_DLL virtual Result setPointPosition( Index idx, const Point3 &position ) = 0;
205
209 FLE_DLL virtual Result setPointTexCoords( Index idx, const TexCoords &texCoords ) = 0;
210
214 FLE_DLL virtual Result setTriangle( Index idx, const Triangle &triangle ) = 0;
215
222
232 FLE_DLL virtual Result removePoint( Index index ) = 0;
233
245 FLE_DLL virtual Result removePoints( ConstBuffer< Index > indexes ) = 0;
246 };
247
251
255}
256
257#endif
#define FLOWENGINE_FACTORY
Definition: CommonDef.h:32
Interface for all FlowEngine objects with an editable name.
Definition: NamedObjectInterface.h:30
Stores a simple stereo mesh object for the FlowEngine interface.
Definition: StereoMeshInterface.h:38
Stores a simple textured mesh object for the FlowEngine interface.
Definition: StereoTexturedMeshInterface.h:36
virtual FLE_DLL Result getInputMeshIndexes(Buffer< Index > outIndexes) const =0
virtual FLE_DLL ~StereoTexturedMeshInterface()=default
Default virtual destructor.
virtual FLE_DLL Result extractStereoMesh(StereoMeshInterface &outStereoMesh, Buffer< Index > inOutTextureToMeshVertexMapping) const =0
virtual FLE_DLL Result getTextureData(Index texIdx, Buffer< PointColor32 > outData) const =0
virtual FLE_DLL Index getTriangleCount() const =0
virtual FLE_DLL Result setTriangle(Index idx, const Triangle &triangle)=0
virtual FLE_DLL Index getTextureCount() const =0
virtual FLE_DLL Result removePoints(ConstBuffer< Index > indexes)=0
virtual FLE_DLL Result copyFrom(const StereoTexturedMeshInterface &inStereoTexturedMesh)=0
virtual FLE_DLL Result getTriangle(Index idx, Triangle &outTriangle) const =0
virtual FLE_DLL Result setPointTexCoords(Index idx, const TexCoords &texCoords)=0
virtual FLE_DLL Result loadFromObj(ConstStringBuffer filePath, bool loadTextures)=0
virtual FLE_DLL Result getPointTexCoords(Index idx, TexCoords &outTexCoord) const =0
virtual FLE_DLL Result transform(ConstBuffer< double > transform)=0
virtual FLE_DLL Result extractStereoMesh(StereoMeshInterface &outStereoMesh, bool unifyDuplicatedVertices=true) const =0
virtual FLE_DLL Result getPointTexCoordData(Buffer< TexCoords > outTexCoordData, bool flipV=false) const =0
virtual FLE_DLL Result getPointPosition(Index idx, Point3 &outPosition) const =0
virtual FLE_DLL Result setPointPosition(Index idx, const Point3 &position)=0
virtual FLE_DLL Result getTextureDimensions(Index texIdx, int &outWidth, int &outHeight) const =0
virtual FLE_DLL Index getPointCount() const =0
virtual FLE_DLL Result saveTextureToFile(Index texIdx, ConstStringBuffer filePath, Size textureSize=0, Size channelBitDepth=0) const =0
virtual FLE_DLL Result removePoint(Index index)=0
virtual FLE_DLL Result saveToObj(ConstStringBuffer filePath, bool saveTextures=true, ConstStringBuffer textureFileFormat="png") const =0
Definition: BoundingBoxInterface.cpp:26
std::ptrdiff_t Index
Index type.
Definition: CommonDef.h:100
void DestroyStereoTexturedMesh(StereoTexturedMeshInterface *stereoTexturedMesh)
Definition: StereoTexturedMeshInterface.cpp:32
StereoTexturedMeshInterface * CreateStereoTexturedMesh()
Definition: StereoTexturedMeshInterface.cpp:27
std::size_t Size
Size type.
Definition: CommonDef.h:103
Result
Enumerates possible results generated by FlowEngine.
Definition: CommonDef.h:45
Holds a (mutable) non_owning pointer and a size Used to marshal memory buffers as arguments in a safe...
Definition: CommonDef.h:118
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 texture coordinate Holds a couple of floats representing texture coordinates
Definition: CommonDef.h:456
a triangle. Holds 3 indexes to points. Triangles are specified in counter-clockwise order
Definition: CommonDef.h:442