47 bool interpolateColorIfNoTexture)
override {
51 unsigned char vertIndex,
53 bool returnColorIfNoTexture)
override {
70 tx1 = tx2 = tx3 =
nullptr;
76 int& i3)
const override {
83 int& i3)
const override {
93 unsigned capacity()
const override {
return 0; }
98 double& nearestSquareDist,
100 CCVector3d* barycentricCoords =
nullptr)
const override {
114 virtual unsigned size()
const override {
return 0; }
121 unsigned index)
override {
129 unsigned triangleIndex)
override {
139 double C[3])
const override {}
int64_t CV_CLASS_ENUM
Type of object type flags (64 bits)
Array of compressed 3D normals (single index)
Array of 2D texture coordinates.
A 3D cloud interface with associated features (color, normals, octree, etc.)
Mesh (triangle) material.
bool fromFile_MeOnly(QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
Loads own object data.
virtual void forEach(genericTriangleAction action) override
Fast iteration mechanism.
ccGenericPointCloud * getAssociatedCloud() const override
Returns the vertices cloud.
void getTriangleTexCoordinates(unsigned triIndex, TexCoords2D *&tx1, TexCoords2D *&tx2, TexCoords2D *&tx3) const override
Returns per-triangle texture coordinates (pointer to)
virtual cloudViewer::GenericTriangle * _getTriangle(unsigned index) override
Returns the ith triangle.
virtual cloudViewer::VerticesIndexes * getTriangleVertIndexes(unsigned triangleIndex) override
Returns the indexes of the vertices of a given triangle.
bool hasPerTriangleTexCoordIndexes() const override
Returns whether this mesh as per-triangle triplets of tex coords indexes.
virtual cloudViewer::GenericTriangle * _getNextTriangle() override
Returns the next triangle (relatively to the global iterator position)
bool interpolateNormals(unsigned triIndex, const CCVector3 &P, CCVector3 &N) override
Interpolates normal(s) inside a given triangle.
bool getTriangleNormals(unsigned triangleIndex, CCVector3 &Na, CCVector3 &Nb, CCVector3 &Nc) const override
Returns a given triangle normal.
virtual unsigned size() const override
Returns the number of triangles.
bool interpolateNormalsBC(unsigned triIndex, const CCVector3d &w, CCVector3 &N) override
Interpolates normal(s) inside a given triangle.
void getTriangleNormalIndexes(unsigned triangleIndex, int &i1, int &i2, int &i3) const override
Returns a triplet of normal indexes for a given triangle (if any)
ccMeshGroup()
Default constructor.
NormsIndexesTableType * getTriNormsTable() const override
Returns per-triangle normals shared array.
short minimumFileVersion_MeOnly() const override
bool getVertexColorFromMaterial(unsigned triIndex, unsigned char vertIndex, ecvColor::Rgb &rgb, bool returnColorIfNoTexture) override
virtual void getTriangleVertices(unsigned triangleIndex, double A[3], double B[3], double C[3]) const override
virtual void placeIteratorAtBeginning() override
Places the mesh iterator at the beginning.
TextureCoordsContainer * getTexCoordinatesTable() const override
Returns per-triangle texture coordinates array.
bool hasTextures() const override
Returns whether textures are available for this mesh.
virtual void getTriangleVertices(unsigned triangleIndex, CCVector3 &A, CCVector3 &B, CCVector3 &C) const override
Returns the vertices of a given triangle.
virtual void getBoundingBox(CCVector3 &bbMin, CCVector3 &bbMax) override
Returns the mesh bounding-box.
bool toFile_MeOnly(QFile &out, short dataVersion) const override
Save own object data.
bool interpolateColors(unsigned triIndex, const CCVector3 &P, ecvColor::Rgb &rgb) override
Interpolates RGB colors inside a given triangle.
virtual bool isSerializable() const override
Returns whether object is serializable of not.
virtual cloudViewer::VerticesIndexes * getNextTriangleVertIndexes() override
bool hasTriNormals() const override
Returns whether the mesh has per-triangle normals.
bool trianglePicking(const CCVector2d &clickPos, const ccGLCameraParameters &camera, int &nearestTriIndex, double &nearestSquareDist, CCVector3d &nearestPoint, CCVector3d *barycentricCoords=nullptr) const override
Brute force triangle picking.
void refreshBB() override
Forces bounding-box update.
unsigned capacity() const override
Returns max capacity.
const ccMaterialSet * getMaterialSet() const override
void getTexCoordinates(unsigned index, TexCoords2D *&tx) const
int getTriangleMtlIndex(unsigned triangleIndex) const override
Returns a given triangle material indexes.
bool hasMaterials() const override
virtual void drawMeOnly(CC_DRAW_CONTEXT &context) override
Enables (OpenGL) stipple mask.
void getTriangleTexCoordinatesIndexes(unsigned triangleIndex, int &i1, int &i2, int &i3) const override
Returns the triplet of tex coords indexes for a given triangle.
CV_CLASS_ENUM getClassID() const override
Returns class ID.
bool getColorFromMaterial(unsigned triIndex, const CCVector3 &P, ecvColor::Rgb &rgb, bool interpolateColorIfNoTexture) override
QMultiMap< unsigned, unsigned > LoadedIDMap
Map of loaded unique IDs (old ID --> new ID)
std::function< void(GenericTriangle &)> genericTriangleAction
Generic function to apply to a triangle (used by foreach)
A generic triangle interface.
OpenGL camera parameters.
Triangle described by the indexes of its 3 vertices.