Stores a simple textured mesh object for the FlowEngine interface.
More...
#include <StereoTexturedMeshInterface.h>
|
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 |
|
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 |
|
Stores a simple textured mesh object for the FlowEngine interface.
Nothing needed in input. Everything will be filled by FlowEngine during MVS Computation.
◆ ~StereoTexturedMeshInterface()
virtual FLE_DLL FlowEngine::StereoTexturedMeshInterface::~StereoTexturedMeshInterface |
( |
| ) |
|
|
virtualdefault |
Default virtual destructor.
◆ copyFrom()
Copy data from another Stereo Textured Mesh.
- Parameters
-
[in] | inStereoTexturedMesh | the 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] | outStereoMesh | a stereo mesh object that will be filled with the requested data |
[in] | unifyDuplicatedVertices | when set to true, the procedure will merge duplicated vertices and discard non-manifold triangles |
- Returns
- One of the following result codes:
- Note
- The created stereo mesh will not have a valid visibility. You can recompute the visibility using FlowEngineInterface.
◆ extractStereoMesh() [2/2]
Extract a stereo mesh from this stereo textured mesh. Always unify duplicated vertices and discard non manifold triangles.
- Parameters
-
[in] | outStereoMesh | a stereo mesh object that will be filled with the requested data |
[in,out] | inOutTextureToMeshVertexMapping | a 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
- 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
-
- Note
- This function has an undefined behaviour if the original mesh has duplicated vertices.
- 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] | idx | the index of the position to retrieve. Must be in the range [0, getPointCount()) |
[out] | outPosition | the 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] | outTexCoordData | a 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] | idx | the index of the point. Must be in the range [0, getPointCount()) |
[out] | outTexCoord | the 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()
Copy texture data. This function is not available in the free version of the SDK.
- Parameters
-
[in] | texIdx | the index of the texture. Must be in the range [0, getTextureCount()) |
[out] | outData | a 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] | texIdx | the index of the texture. Must be in the range [0, getTextureCount()) |
[out] | outWidth | the width of the texture in pixels |
[out] | outHeight | the 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] | idx | the index of the triangle to retrieve Must be in the range [0, getTriangleCount()) |
[out] | outTriangle | the 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] | filePath | a string buffer containing the UTF-8 encoded path to the OBJ file. |
[in] | loadTextures | when 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] | index | the 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()
Removes one or more points from this stereo textured mesh. Triangles will be updated automatically.
- Parameters
-
[in] | indexes | a 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] | texIdx | the index of the texture. Must be in the range [0, getTextureCount()) |
[in] | filePath | string buffer that contains the UTF-8 file path where the mesh will be saved to. |
[in] | textureSize | the 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()
Saves this textured mesh to a file in OBJ+Materials+Textures format.
- Parameters
-
[in] | filePath | string 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
- This function is not available in the free version of the SDK.
- 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] | idx | the point index. Must be in the range [0, getPointCount()) |
[in] | position | the 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] | idx | the point index. Must be in the range [0, getPointCount()) |
[in] | texCoords | the 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
-
◆ 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] | transform | a buffer of doubles representing the 4x4 transform matrix that will be applied to every point. |
- Returns
- One of the following result codes: