FlowEngine 7.530
Photogrammetry Software Development Kit
Loading...
Searching...
No Matches
FlowEngine::StereoTexturedMeshInterface Class Referenceabstract

Stores a simple textured mesh object for the FlowEngine interface. More...

#include <StereoTexturedMeshInterface.h>

Inheritance diagram for FlowEngine::StereoTexturedMeshInterface:
FlowEngine::NamedObjectInterface

Public Member Functions

virtual FLE_DLL ~StereoTexturedMeshInterface ()=default
 Default virtual destructor.
 
virtual FLE_DLL Index getPointCount () const =0
 
virtual FLE_DLL Index getTriangleCount () const =0
 
virtual FLE_DLL Result getPointPosition (Index idx, Point3 &outPosition) const =0
 
virtual FLE_DLL Result getPointTexCoords (Index idx, TexCoords &outTexCoord) const =0
 
virtual FLE_DLL Result getPointTexCoordData (Buffer< TexCoords > outTexCoordData, bool flipV=false) const =0
 
virtual FLE_DLL Result getInputMeshIndexes (Buffer< Index > outIndexes) const =0
 
virtual FLE_DLL Result getTriangle (Index idx, Triangle &outTriangle) const =0
 
virtual FLE_DLL Index getTextureCount () const =0
 
virtual FLE_DLL Result getTextureDimensions (Index texIdx, int &outWidth, int &outHeight) const =0
 
virtual FLE_DLL Result getTextureData (Index texIdx, Buffer< PointColor32 > outData) const =0
 
virtual FLE_DLL Result saveTextureToFile (Index texIdx, ConstStringBuffer filePath, Size textureSize=0, Size channelBitDepth=0) const =0
 
virtual FLE_DLL Result loadFromObj (ConstStringBuffer filePath, bool loadTextures)=0
 
virtual FLE_DLL Result saveToObj (ConstStringBuffer filePath, bool saveTextures=true, ConstStringBuffer textureFileFormat="png") const =0
 
virtual FLE_DLL Result extractStereoMesh (StereoMeshInterface &outStereoMesh, bool unifyDuplicatedVertices=true) const =0
 
virtual FLE_DLL Result extractStereoMesh (StereoMeshInterface &outStereoMesh, Buffer< Index > inOutTextureToMeshVertexMapping) const =0
 
virtual FLE_DLL Result copyFrom (const StereoTexturedMeshInterface &inStereoTexturedMesh)=0
 
virtual FLE_DLL Result setPointPosition (Index idx, const Point3 &position)=0
 
virtual FLE_DLL Result setPointTexCoords (Index idx, const TexCoords &texCoords)=0
 
virtual FLE_DLL Result setTriangle (Index idx, const Triangle &triangle)=0
 
virtual FLE_DLL Result transform (ConstBuffer< double > transform)=0
 
virtual FLE_DLL Result removePoint (Index index)=0
 
virtual FLE_DLL Result removePoints (ConstBuffer< Index > indexes)=0
 
- Public Member Functions inherited from FlowEngine::NamedObjectInterface
virtual FLE_DLL ~NamedObjectInterface ()=default
 Default virtual destructor.
 
virtual FLE_DLL Size getNameLength () const =0
 
virtual FLE_DLL Result getName (StringBuffer outName) const =0
 
virtual FLE_DLL Result setName (ConstStringBuffer name)=0
 

Detailed Description

Stores a simple textured mesh object for the FlowEngine interface.

Nothing needed in input. Everything will be filled by FlowEngine during MVS Computation.

Constructor & Destructor Documentation

◆ ~StereoTexturedMeshInterface()

virtual FLE_DLL FlowEngine::StereoTexturedMeshInterface::~StereoTexturedMeshInterface ( )
virtualdefault

Default virtual destructor.

Member Function Documentation

◆ copyFrom()

virtual FLE_DLL Result FlowEngine::StereoTexturedMeshInterface::copyFrom ( const StereoTexturedMeshInterface inStereoTexturedMesh)
pure virtual

Copy data from another Stereo Textured Mesh.

Parameters
[in]inStereoTexturedMeshthe stereo textured mesh in input
Returns
One of the following result codes:

◆ extractStereoMesh() [1/2]

virtual FLE_DLL Result FlowEngine::StereoTexturedMeshInterface::extractStereoMesh ( StereoMeshInterface outStereoMesh,
bool  unifyDuplicatedVertices = true 
) const
pure virtual

Extract a stereo mesh from this stereo textured mesh.

Parameters
[in]outStereoMesha stereo mesh object that will be filled with the requested data
[in]unifyDuplicatedVerticeswhen set to true, the procedure will merge duplicated vertices and discard non-manifold triangles
Returns
One of the following result codes:
Note
  1. The created stereo mesh will not have a valid visibility. You can recompute the visibility using FlowEngineInterface.

◆ extractStereoMesh() [2/2]

virtual FLE_DLL Result FlowEngine::StereoTexturedMeshInterface::extractStereoMesh ( StereoMeshInterface outStereoMesh,
Buffer< Index inOutTextureToMeshVertexMapping 
) const
pure virtual

Extract a stereo mesh from this stereo textured mesh. Always unify duplicated vertices and discard non manifold triangles.

Parameters
[in]outStereoMesha stereo mesh object that will be filled with the requested data
[in,out]inOutTextureToMeshVertexMappinga buffer that will receive data to map this textured mesh vertex indices to the mesh ones. Must be at least 'getPointCount()' big.
Returns
One of the following result codes:
Note
  1. The created stereo mesh will not have a valid visibility. You can recompute the visibility using FlowEngineInterface.

◆ getInputMeshIndexes()

virtual FLE_DLL Result FlowEngine::StereoTexturedMeshInterface::getInputMeshIndexes ( Buffer< Index outIndexes) const
pure virtual

Return the indexes of each textured point, related to the input mesh used.

Parameters
[out]outIndexesa buffer of Indexes, at least getPointCount() big.
Note
  1. This function has an undefined behaviour if the original mesh has duplicated vertices.
  2. Duplicated vertices are never generate by FlowEngine itself, but can be present if the mesh has been imported

◆ getPointCount()

virtual FLE_DLL Index FlowEngine::StereoTexturedMeshInterface::getPointCount ( ) const
pure virtual
Returns
the number of points in this mesh

◆ getPointPosition()

virtual FLE_DLL Result FlowEngine::StereoTexturedMeshInterface::getPointPosition ( Index  idx,
Point3 outPosition 
) const
pure virtual

Returns the position of the point at index idx.

Parameters
[in]idxthe index of the position to retrieve. Must be in the range [0, getPointCount())
[out]outPositionthe point position.
Returns
One of the following result codes:
Note
This function is not available in the free version of the SDK.

◆ getPointTexCoordData()

virtual FLE_DLL Result FlowEngine::StereoTexturedMeshInterface::getPointTexCoordData ( Buffer< TexCoords outTexCoordData,
bool  flipV = false 
) const
pure virtual

Returns the texture coordinates of all points.

Parameters
[out]outTexCoordDataa buffer of TexCoords, at least getPointCount() big.
[in]flipV(optional) when true, this will return texture coordinates with the vertical coordinate flipped.
Returns
One of the following result codes:
Note
This function is not available in the free version of the SDK.

◆ getPointTexCoords()

virtual FLE_DLL Result FlowEngine::StereoTexturedMeshInterface::getPointTexCoords ( Index  idx,
TexCoords outTexCoord 
) const
pure virtual

Returns the texture coordinates of the point at index idx.

Parameters
[in]idxthe index of the point. Must be in the range [0, getPointCount())
[out]outTexCoordthe retrieved point texture coordinate
Returns
One of the following result codes:
Note
This function is not available in the free version of the SDK.

◆ getTextureCount()

virtual FLE_DLL Index FlowEngine::StereoTexturedMeshInterface::getTextureCount ( ) const
pure virtual
Returns
the number of textures in this StereoTexturedMesh object

◆ getTextureData()

virtual FLE_DLL Result FlowEngine::StereoTexturedMeshInterface::getTextureData ( Index  texIdx,
Buffer< PointColor32 outData 
) const
pure virtual

Copy texture data. This function is not available in the free version of the SDK.

Parameters
[in]texIdxthe index of the texture. Must be in the range [0, getTextureCount())
[out]outDataa buffer of PackedColor elements big enough to store the entire texture data

◆ getTextureDimensions()

virtual FLE_DLL Result FlowEngine::StereoTexturedMeshInterface::getTextureDimensions ( Index  texIdx,
int &  outWidth,
int &  outHeight 
) const
pure virtual

Returns a texture dimensions

Parameters
[in]texIdxthe index of the texture. Must be in the range [0, getTextureCount())
[out]outWidththe width of the texture in pixels
[out]outHeightthe height of the texture in pixels

◆ getTriangle()

virtual FLE_DLL Result FlowEngine::StereoTexturedMeshInterface::getTriangle ( Index  idx,
Triangle outTriangle 
) const
pure virtual

Returns the triangle at index idx.

Parameters
[in]idxthe index of the triangle to retrieve Must be in the range [0, getTriangleCount())
[out]outTrianglethe triangle at specified index
Returns
One of the following result codes:
Note
This function is not available in the free version of the SDK.

◆ getTriangleCount()

virtual FLE_DLL Index FlowEngine::StereoTexturedMeshInterface::getTriangleCount ( ) const
pure virtual
Returns
the number of triangle in this mesh

◆ loadFromObj()

virtual FLE_DLL Result FlowEngine::StereoTexturedMeshInterface::loadFromObj ( ConstStringBuffer  filePath,
bool  loadTextures 
)
pure virtual

Load the textured mesh from a OBJ file

Parameters
[in]filePatha string buffer containing the UTF-8 encoded path to the OBJ file.
[in]loadTextureswhen set to true, the method will try to load also the texture images.
Returns
One of the following result codes:

◆ removePoint()

virtual FLE_DLL Result FlowEngine::StereoTexturedMeshInterface::removePoint ( Index  index)
pure virtual

Removes one point from this stereo textured mesh. Triangles will be updated automatically.

Parameters
[in]indexthe index of the point to be removed. Must be in the range [0, getPointCount()).
Note
This method is not available in the free version of the SDK.
Returns
One of the following result codes:

◆ removePoints()

virtual FLE_DLL Result FlowEngine::StereoTexturedMeshInterface::removePoints ( ConstBuffer< Index indexes)
pure virtual

Removes one or more points from this stereo textured mesh. Triangles will be updated automatically.

Parameters
[in]indexesa buffer of point indexes to be removed. Each index must be in the range [0, getPointCount()).
Note
This method is not available in the free version of the SDK.
Returns
One of the following result codes:

◆ saveTextureToFile()

virtual FLE_DLL Result FlowEngine::StereoTexturedMeshInterface::saveTextureToFile ( Index  texIdx,
ConstStringBuffer  filePath,
Size  textureSize = 0,
Size  channelBitDepth = 0 
) const
pure virtual

Saves a texture in this textured mesh to a specified file. Supports any format available in your system installation (8, 16 or 32 bit).

Parameters
[in]texIdxthe index of the texture. Must be in the range [0, getTextureCount())
[in]filePathstring buffer that contains the UTF-8 file path where the mesh will be saved to.
[in]textureSizethe output texture size. If set to 0, the texture image will keep the original dimensions.
[in]channelBitDepth(optional) the output image bitdepth. When left to default (zero), it will be automatically choosen from the format.
Returns
One of the following result codes:
Note
This function is not available in the free version of the SDK.

◆ saveToObj()

virtual FLE_DLL Result FlowEngine::StereoTexturedMeshInterface::saveToObj ( ConstStringBuffer  filePath,
bool  saveTextures = true,
ConstStringBuffer  textureFileFormat = "png" 
) const
pure virtual

Saves this textured mesh to a file in OBJ+Materials+Textures format.

Parameters
[in]filePathstring buffer that contains the UTF-8 file path where the mesh will be saved to.
[in]saveTextures(default=true)specify to save or not also the texture image files.
[in]textureFileFormat(default="png") when saveTextures is true, specifies the texture file format.
Returns
One of the following result codes:
Note
  1. This function is not available in the free version of the SDK.
  2. More than 1 file will be produced by this method in order to store OBJ materials and textures.

◆ setPointPosition()

virtual FLE_DLL Result FlowEngine::StereoTexturedMeshInterface::setPointPosition ( Index  idx,
const Point3 position 
)
pure virtual

Change the position of a point

Parameters
[in]idxthe point index. Must be in the range [0, getPointCount())
[in]positionthe new point position

◆ setPointTexCoords()

virtual FLE_DLL Result FlowEngine::StereoTexturedMeshInterface::setPointTexCoords ( Index  idx,
const TexCoords texCoords 
)
pure virtual

Change the uv tex coords of a point

Parameters
[in]idxthe point index. Must be in the range [0, getPointCount())
[in]texCoordsthe new point texture coordinates

◆ setTriangle()

virtual FLE_DLL Result FlowEngine::StereoTexturedMeshInterface::setTriangle ( Index  idx,
const Triangle triangle 
)
pure virtual

Change the triangle indexes of a triangle

Parameters
[in]idxthe triangle index. Must be in the range [0, getTriangleCount())
[in]trianglethe triangle indexes. Indexes must be in range [0, getPointCount())

◆ transform()

virtual FLE_DLL Result FlowEngine::StereoTexturedMeshInterface::transform ( ConstBuffer< double >  transform)
pure virtual

Transforms every vertex in the textured mesh with a SRT matrix.

Parameters
[in]transforma buffer of doubles representing the 4x4 transform matrix that will be applied to every point.
Returns
One of the following result codes: