 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
45 bool interpolateColorIfNoTexture)
override;
47 unsigned char vertIndex,
49 bool returnColorIfNoTexture)
override;
64 int& i3)
const override;
69 int& i3)
const override;
85 inline unsigned size()
const override {
86 return static_cast<unsigned>(m_triIndexes.size());
88 void forEach(genericTriangleAction action)
override;
93 unsigned index)
override;
96 unsigned triangleIndex)
override;
104 double C[3])
const override;
117 return m_triIndexes[localIndex];
122 assert(m_globalIterator <
size());
123 return m_triIndexes[m_globalIterator];
130 void clear(
bool releaseMemory);
136 bool addTriangleIndex(
unsigned globalIndex);
143 bool addTriangleIndex(
unsigned firstIndex,
unsigned lastIndex);
149 void setTriangleIndex(
unsigned localIndex,
unsigned globalIndex);
154 bool reserve(
size_t n);
159 bool resize(
size_t n);
172 void setAssociatedMesh(
ccMesh* mesh,
bool unlinkPreviousOne =
true);
185 ccSubMesh* createNewSubMeshFromSelection(
186 bool removeSelectedTriangles,
187 const std::vector<int>& selectedTriangleIndexes,
188 IndexMap* newRemainingTriangleIndexes =
nullptr);
203 ccSubMesh* createNewSubMeshFromSelection(
bool removeSelectedFaces,
208 bool toFile_MeOnly(QFile& out,
short dataVersion)
const override;
2D texture coordinates
Definition: ecvAdvancedTypes.h:138
A sub-mesh.
Definition: ecvSubMesh.h:19
std::vector< unsigned int > IndexMap
Indexes map for createNewSubMeshFromSelection.
Definition: ecvSubMesh.h:175
normal_z rgb
Definition: my_point_types.h:168
QMultiMap< unsigned, unsigned > LoadedIDMap
Map of loaded unique IDs (old ID --> new ID)
Definition: ecvSerializableObject.h:61
virtual void getTriangleTexCoordinatesIndexes(unsigned triangleIndex, int &i1, int &i2, int &i3) const =0
Returns the triplet of tex coords indexes for a given triangle.
unsigned size() const override
Returns the number of triangles.
Definition: ecvSubMesh.h:85
virtual bool getTriangleNormals(unsigned triangleIndex, CCVector3 &Na, CCVector3 &Nb, CCVector3 &Nc) const =0
Returns a given triangle normal.
unsigned m_globalIterator
Iterator on the triangles references container.
Definition: ecvSubMesh.h:226
virtual void onUpdateOf(ccHObject *obj)
This method is called when another object (geometry) is updated.
Definition: ecvHObject.h:706
virtual unsigned size() const =0
Returns the number of triangles.
virtual bool normalsShown() const
Returns whether normals are shown or not.
Definition: ecvDrawableObject.h:91
virtual bool hasTriNormals() const =0
Returns whether the mesh has per-triangle normals.
virtual int getTriangleMtlIndex(unsigned triangleIndex) const =0
Returns a given triangle material indexes.
Triangle described by the indexes of its 3 vertices.
Definition: GenericIndexedMesh.h:16
virtual bool hasPerTriangleTexCoordIndexes() const =0
Returns whether this mesh as per-triangle triplets of tex coords indexes.
virtual TextureCoordsContainer * getTexCoordinatesTable() const =0
Returns per-triangle texture coordinates array.
virtual const ccMaterialSet * getMaterialSet() const =0
Bounding box structure.
Definition: ecvBBox.h:25
virtual void getTexCoordinates(unsigned index, TexCoords2D *&tx) const =0
virtual ccGenericPointCloud * getAssociatedCloud() const =0
Returns the vertices cloud.
ccMesh * m_associatedMesh
Associated mesh.
Definition: ecvSubMesh.h:217
virtual void getTriangleTexCoordinates(unsigned triIndex, TexCoords2D *&tx1, TexCoords2D *&tx2, TexCoords2D *&tx3) const =0
Returns per-triangle texture coordinates (pointer to)
bool toFile_MeOnly(QFile &out, short dataVersion) const override
Save own object data.
Definition: ecvGenericMesh.cpp:253
virtual bool hasTextures() const =0
Returns whether textures are available for this mesh.
virtual bool hasMaterials() const =0
virtual bool hasScalarFields() const
Returns whether one or more scalar fields are instantiated.
Definition: ecvDrawableObject.h:105
virtual bool hasNormals() const
Returns whether normals are enabled or not.
Definition: ecvDrawableObject.h:89
Array of compressed 3D normals (single index)
Definition: ecvAdvancedTypes.h:21
int64_t CV_CLASS_ENUM
Type of object type flags (64 bits)
Definition: CVTypes.h:97
virtual void getTriangleVertices(unsigned triangleIndex, CCVector3 &A, CCVector3 &B, CCVector3 &C) const =0
Returns the vertices of a given triangle.
virtual bool interpolateNormalsBC(unsigned triIndex, const CCVector3d &w, CCVector3 &N)=0
Interpolates normal(s) inside a given triangle.
virtual void forEach(genericTriangleAction action)=0
Fast iteration mechanism.
std::vector< unsigned int > ReferencesContainer
Container of 3D triangles indexes.
Definition: ecvSubMesh.h:220
CV_CLASS_ENUM getClassID() const override
Returns class ID.
Definition: ecvSubMesh.h:27
A 3D cloud interface with associated features (color, normals, octree, etc.)
Definition: ecvGenericPointCloud.h:45
virtual VerticesIndexes * getNextTriangleVertIndexes()=0
void forwardIterator()
Forwards the local element iterator.
Definition: ecvSubMesh.h:127
virtual GenericTriangle * _getNextTriangle()=0
Returns the next triangle (relatively to the global iterator position)
virtual bool interpolateNormals(unsigned triIndex, const CCVector3 &P, CCVector3 &N)
Interpolates normal(s) inside a given triangle.
Definition: GenericIndexedMesh.h:89
virtual bool hasDisplayedScalarField() const
Returns whether an active scalar field is available or not.
Definition: ecvDrawableObject.h:99
short minimumFileVersion_MeOnly() const override
Definition: ecvGenericMesh.cpp:289
unsigned getTriGlobalIndex(unsigned localIndex) const
Definition: ecvSubMesh.h:116
Generic mesh interface.
Definition: ecvGenericMesh.h:28
ccBBox m_bBox
Bounding-box.
Definition: ecvSubMesh.h:229
Array of 2D texture coordinates.
Definition: ecvAdvancedTypes.h:151
virtual bool interpolateColors(unsigned triIndex, const CCVector3 &P, ecvColor::Rgb &C)=0
Interpolates RGB colors inside a given triangle.
bool isSerializable() const override
Returns whether object is serializable of not.
Definition: ecvSubMesh.h:31
bool fromFile_MeOnly(QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
Loads own object data.
Definition: ecvGenericMesh.cpp:294
virtual VerticesIndexes * getTriangleVertIndexes(unsigned triangleIndex)=0
Returns the indexes of the vertices of a given triangle.
ccMesh * getAssociatedMesh()
Returns the associated mesh.
Definition: ecvSubMesh.h:162
virtual void getBoundingBox(CCVector3 &bbMin, CCVector3 &bbMax)=0
Returns the mesh bounding-box.
virtual void refreshBB()=0
Forces bounding-box update.
const ccMesh * getAssociatedMesh() const
Returns the associated mesh (const version)
Definition: ecvSubMesh.h:165
virtual NormsIndexesTableType * getTriNormsTable() const =0
Returns per-triangle normals shared array.
@ SUB_MESH
Definition: CVTypes.h:106
virtual GenericTriangle * _getTriangle(unsigned triangleIndex)=0
Returns the ith triangle.
RGB color structure.
Definition: ecvColorTypes.h:49
Triangular mesh.
Definition: ecvMesh.h:35
virtual bool hasColors() const
Returns whether colors are enabled or not.
Definition: ecvDrawableObject.h:80
Mesh (triangle) material.
Definition: ecvMaterialSet.h:16
virtual unsigned capacity() const =0
Returns max capacity.
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
virtual ccBBox getOwnBB(bool withGLFeatures=false)
Returns the entity's own bounding-box.
Definition: ecvHObject.cpp:757
virtual void getTriangleNormalIndexes(unsigned triangleIndex, int &i1, int &i2, int &i3) const =0
Returns a triplet of normal indexes for a given triangle (if any)
#define CV_DB_LIB_API
Definition: CV_db.h:15
virtual bool getColorFromMaterial(unsigned triIndex, const CCVector3 &P, ecvColor::Rgb &C, bool interpolateColorIfNoTexture)=0
virtual bool getVertexColorFromMaterial(unsigned triIndex, unsigned char vertIndex, ecvColor::Rgb &C, bool returnColorIfNoTexture)=0
void placeIteratorAtBeginning() override
Places the mesh iterator at the beginning.
Definition: ecvSubMesh.h:89
unsigned getCurrentTriGlobalIndex() const
Returns the global index of the triangle pointed by the current element.
Definition: ecvSubMesh.h:121
A generic triangle interface.
Definition: GenericTriangle.h:18
ReferencesContainer m_triIndexes
Indexes of (some of) the associated mesh triangles.
Definition: ecvSubMesh.h:223