![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Generic mesh interface. More...
#include <ecvGenericMesh.h>


Public Member Functions | |
| ccGenericMesh (QString name=QString()) | |
| Default constructor. More... | |
| ~ccGenericMesh () override=default | |
| Destructor. More... | |
| void | showNormals (bool state) override |
| Sets normals visibility. More... | |
| bool | isSerializable () const override |
| Returns whether object is serializable of not. More... | |
| virtual ccGenericPointCloud * | getAssociatedCloud () const =0 |
| Returns the vertices cloud. More... | |
| virtual void | refreshBB ()=0 |
| Forces bounding-box update. More... | |
| virtual unsigned | capacity () const =0 |
| Returns max capacity. More... | |
| virtual bool | hasMaterials () const =0 |
| virtual const ccMaterialSet * | getMaterialSet () const =0 |
| virtual int | getTriangleMtlIndex (unsigned triangleIndex) const =0 |
| Returns a given triangle material indexes. More... | |
| virtual bool | hasTextures () const =0 |
| Returns whether textures are available for this mesh. More... | |
| virtual TextureCoordsContainer * | getTexCoordinatesTable () const =0 |
| Returns per-triangle texture coordinates array. More... | |
| virtual void | getTriangleTexCoordinates (unsigned triIndex, TexCoords2D *&tx1, TexCoords2D *&tx2, TexCoords2D *&tx3) const =0 |
| Returns per-triangle texture coordinates (pointer to) More... | |
| virtual void | getTexCoordinates (unsigned index, TexCoords2D *&tx) const =0 |
| virtual bool | hasPerTriangleTexCoordIndexes () const =0 |
| Returns whether this mesh as per-triangle triplets of tex coords indexes. More... | |
| virtual void | getTriangleTexCoordinatesIndexes (unsigned triangleIndex, int &i1, int &i2, int &i3) const =0 |
| Returns the triplet of tex coords indexes for a given triangle. More... | |
| virtual bool | hasTriNormals () const =0 |
| Returns whether the mesh has per-triangle normals. More... | |
| 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) More... | |
| virtual bool | getTriangleNormals (unsigned triangleIndex, CCVector3 &Na, CCVector3 &Nb, CCVector3 &Nc) const =0 |
| Returns a given triangle normal. More... | |
| virtual bool | getTriangleNormals (unsigned triangleIndex, double Na[3], double Nb[3], double Nc[3]) const |
| virtual bool | getTriangleNormals (unsigned triangleIndex, Eigen::Vector3d &Na, Eigen::Vector3d &Nb, Eigen::Vector3d &Nc) const |
| virtual NormsIndexesTableType * | getTriNormsTable () const =0 |
| Returns per-triangle normals shared array. More... | |
| virtual void | computeInterpolationWeights (unsigned triIndex, const CCVector3 &P, CCVector3d &weights) const |
| Returns the (barycentric) interpolation weights for a given triangle. More... | |
| virtual bool | interpolateNormalsBC (unsigned triIndex, const CCVector3d &w, CCVector3 &N)=0 |
| Interpolates normal(s) inside a given triangle. More... | |
| virtual bool | interpolateColors (unsigned triIndex, const CCVector3 &P, ecvColor::Rgb &C)=0 |
| Interpolates RGB colors inside a given triangle. More... | |
| 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 |
| virtual bool | isShownAsWire () const |
| Returns whether the mesh is displayed as wired or with plain facets. More... | |
| virtual void | showWired (bool state) |
| Sets whether mesh should be displayed as a wire or with plain facets. More... | |
| virtual bool | isShownAsPoints () const |
| Returns whether the mesh is displayed as wired or with plain facets. More... | |
| virtual void | showPoints (bool state) |
| virtual bool | triNormsShown () const |
| Returns whether per-triangle normals are shown or not. More... | |
| virtual void | showTriNorms (bool state) |
| Sets whether to show or not per-triangle normals. More... | |
| virtual bool | materialsShown () const |
| Sets whether textures/material should be displayed or not. More... | |
| virtual void | showMaterials (bool state) |
| Sets whether textures should be displayed or not. More... | |
| virtual bool | stipplingEnabled () const |
| Returns whether polygon stippling is enabled or not. More... | |
| void | enableStippling (bool state) |
| Enables polygon stippling. More... | |
| ccPointCloud * | samplePoints (bool densityBased, double samplingParameter, bool withNormals, bool withRGB, bool withTexture, cloudViewer::GenericProgressCallback *pDlg=nullptr) |
| Samples points on a mesh. More... | |
| void | importParametersFrom (const ccGenericMesh *mesh) |
| Imports the parameters from another mesh. More... | |
| virtual bool | trianglePicking (const CCVector2d &clickPos, const ccGLCameraParameters &camera, int &nearestTriIndex, double &nearestSquareDist, CCVector3d &nearestPoint, CCVector3d *barycentricCoords=nullptr) const |
| Brute force triangle picking. More... | |
| virtual bool | trianglePicking (unsigned triIndex, const CCVector2d &clickPos, const ccGLCameraParameters &camera, CCVector3d &point, CCVector3d *barycentricCoords=nullptr) const |
| Triangle picking (single triangle) More... | |
| bool | computePointPosition (unsigned triIndex, const CCVector2d &uv, CCVector3 &P, bool warningIfOutside=true) const |
| void | setGlobalShift (const CCVector3d &shift) override |
| Sets shift applied to original coordinates (information storage only) More... | |
| void | setGlobalScale (double scale) override |
| const CCVector3d & | getGlobalShift () const override |
| Returns the shift applied to original coordinates. More... | |
| double | getGlobalScale () const override |
| Returns the scale applied to original coordinates. More... | |
| bool | normalsAvailable () const override |
| Returns whether normals are available. More... | |
| bool | updateTextures (const std::string &texture_file) |
| bool | updateTextures (const std::vector< std::string > &texture_files) |
Public Member Functions inherited from cloudViewer::GenericIndexedMesh | |
| GenericIndexedMesh ()=default | |
| ~GenericIndexedMesh () override=default | |
| Default destructor. More... | |
| virtual GenericTriangle * | _getTriangle (unsigned triangleIndex)=0 |
| Returns the ith triangle. More... | |
| virtual VerticesIndexes * | getTriangleVertIndexes (unsigned triangleIndex)=0 |
| Returns the indexes of the vertices of a given triangle. More... | |
| virtual void | getTriangleVertices (unsigned triangleIndex, CCVector3 &A, CCVector3 &B, CCVector3 &C) const =0 |
| Returns the vertices of a given triangle. More... | |
| virtual void | getTriangleVertices (unsigned triangleIndex, double A[3], double B[3], double C[3]) const =0 |
| virtual VerticesIndexes * | getNextTriangleVertIndexes ()=0 |
| virtual bool | interpolateNormals (unsigned triIndex, const CCVector3 &P, CCVector3 &N) |
| Interpolates normal(s) inside a given triangle. More... | |
Public Member Functions inherited from cloudViewer::GenericMesh | |
| GenericMesh ()=default | |
| virtual | ~GenericMesh ()=default |
| Default destructor. More... | |
| virtual unsigned | size () const =0 |
| Returns the number of triangles. More... | |
| virtual bool | hasTriangles () const |
| virtual void | forEach (genericTriangleAction action)=0 |
| Fast iteration mechanism. More... | |
| virtual void | getBoundingBox (CCVector3 &bbMin, CCVector3 &bbMax)=0 |
| Returns the mesh bounding-box. More... | |
| virtual void | placeIteratorAtBeginning ()=0 |
| Places the mesh iterator at the beginning. More... | |
| virtual GenericTriangle * | _getNextTriangle ()=0 |
| Returns the next triangle (relatively to the global iterator position) More... | |
Public Member Functions inherited from ccShiftedObject | |
| ccShiftedObject (QString name=QString()) | |
| Default constructor. More... | |
| ccShiftedObject (const ccShiftedObject &s) | |
| Copy constructor. More... | |
| void | copyGlobalShiftAndScale (const ccShiftedObject &s) |
| Copies the Global Shift and Scale from another entity. More... | |
| virtual void | setGlobalShift (double x, double y, double z) |
| Sets shift applied to original coordinates (information storage only) More... | |
| bool | isShifted () const |
| Returns whether the cloud is shifted or not. More... | |
| template<typename T > | |
| CCVector3d | toGlobal3d (const Vector3Tpl< T > &Plocal) const |
| Returns the point back-projected into the original coordinates system. More... | |
| template<typename T > | |
| CCVector3d | toLocal3d (const Vector3Tpl< T > &Pglobal) const |
| Returns the point projected into the local (shifted) coordinates system. More... | |
| template<typename T > | |
| CCVector3 | toLocal3pc (const Vector3Tpl< T > &Pglobal) const |
| Returns the point projected into the local (shifted) coordinates system. More... | |
| bool | getOwnGlobalBB (CCVector3d &minCorner, CCVector3d &maxCorner) override |
| GlobalBoundingBox | getOwnGlobalBB (bool withGLFeatures=false) override |
Public Member Functions inherited from ccHObject | |
| ccHObject (QString name=QString()) | |
| Default constructor. More... | |
| ccHObject (const ccHObject &object) | |
| Copy constructor. More... | |
| virtual | ~ccHObject () override |
| Default destructor. More... | |
| virtual bool | IsEmpty () const |
| virtual Eigen::Vector3d | GetMinBound () const |
| Returns min bounds for geometry coordinates. More... | |
| virtual Eigen::Vector2d | GetMin2DBound () const |
| virtual Eigen::Vector3d | GetMaxBound () const |
| Returns max bounds for geometry coordinates. More... | |
| virtual Eigen::Vector2d | GetMax2DBound () const |
| virtual Eigen::Vector3d | GetCenter () const |
| Returns the center of the geometry coordinates. More... | |
| virtual ccBBox | GetAxisAlignedBoundingBox () const |
| Returns an axis-aligned bounding box of the geometry. More... | |
| virtual ecvOrientedBBox | GetOrientedBoundingBox () const |
| virtual ccHObject & | Transform (const Eigen::Matrix4d &transformation) |
| Apply transformation (4x4 matrix) to the geometry coordinates. More... | |
| virtual ccHObject & | Translate (const Eigen::Vector3d &translation, bool relative=true) |
| Apply translation to the geometry coordinates. More... | |
| virtual ccHObject & | Scale (const double s, const Eigen::Vector3d ¢er) |
Apply scaling to the geometry coordinates. Given a scaling factor , and center , a given point is transformed according to . More... | |
| virtual ccHObject & | Scale (const double s) |
| virtual ccHObject & | Rotate (const Eigen::Matrix3d &R, const Eigen::Vector3d ¢er) |
Apply rotation to the geometry coordinates and normals. Given a rotation matrix , and center , a given point is transformed according to . More... | |
| virtual ccHObject & | Rotate (const Eigen::Matrix3d &R) |
| QString | getViewId () const |
| CV_CLASS_ENUM | getClassID () const override |
| Returns class ID. More... | |
| bool | isGroup () const |
| Returns whether the instance is a group. More... | |
| ccHObject * | getParent () const |
| Returns parent object. More... | |
| virtual QIcon | getIcon () const |
| Returns the icon associated to this entity. More... | |
| void | addDependency (ccHObject *otherObject, int flags, bool additive=true) |
| Adds a new dependence (additive or not) More... | |
| int | getDependencyFlagsWith (const ccHObject *otherObject) |
| Returns the dependency flags with a given object. More... | |
| void | removeDependencyWith (ccHObject *otherObject) |
| Removes any dependency flags with a given object. More... | |
| void | removeDependencyFlag (ccHObject *otherObject, DEPENDENCY_FLAGS flag) |
| Removes a given dependency flag. More... | |
| virtual bool | addChild (ccHObject *child, int dependencyFlags=DP_PARENT_OF_OTHER, int insertIndex=-1) |
| Adds a child. More... | |
| unsigned | getChildrenNumber () const |
| Returns the number of children. More... | |
| unsigned int | getChildCountRecursive () const |
| Returns the total number of children under this object recursively. More... | |
| ccHObject * | getChild (unsigned childPos) const |
| Returns the ith child. More... | |
| ccHObject * | find (unsigned uniqueID) |
| Finds an entity in this object hierarchy. More... | |
| unsigned | filterChildren (Container &filteredChildren, bool recursive=false, CV_CLASS_ENUM filter=CV_TYPES::OBJECT, bool strict=false) const |
| Collects the children corresponding to a certain pattern. More... | |
| void | detachChild (ccHObject *child) |
| Detaches a specific child. More... | |
| void | detachAllChildren () |
| Removes a specific child. More... | |
| void | getTypeID_recursive (std::vector< removeInfo > &rmInfos, bool relative) |
| void | getTypeID_recursive (std::vector< hideInfo > &hdInfos, bool relative) |
| void | removeChild (ccHObject *child) |
| void | removeChild (int pos) |
| Removes a specific child given its index. More... | |
| void | removeAllChildren () |
| Removes all children. More... | |
| int | getChildIndex (const ccHObject *aChild) const |
| Returns child index. More... | |
| void | swapChildren (unsigned firstChildIndex, unsigned secondChildIndex) |
| Swaps two children. More... | |
| int | getIndex () const |
| Returns index relatively to its parent or -1 if no parent. More... | |
| void | transferChild (ccHObject *child, ccHObject &newParent) |
| Transfer a given child to another parent. More... | |
| void | transferChildren (ccHObject &newParent, bool forceFatherDependent=false) |
| Transfer all children to another parent. More... | |
| ccHObject * | getFirstChild () const |
| Shortcut: returns first child. More... | |
| ccHObject * | getLastChild () const |
| Shortcut: returns last child. More... | |
| bool | isAncestorOf (const ccHObject *anObject) const |
| Returns true if the current object is an ancestor of the specified one. More... | |
| void | removeFromRenderScreen (bool recursive=true) |
| void | hideObject_recursive (bool recursive) |
| void | hideBB (CC_DRAW_CONTEXT context) |
| void | showBB (CC_DRAW_CONTEXT context) |
| virtual ccBBox | getOwnBB (bool withGLFeatures=false) |
| Returns the entity's own bounding-box. More... | |
| void | setRedrawFlagRecursive (bool redraw=false) |
| void | setForceRedrawRecursive (bool redraw=false) |
| void | setPointSizeRecursive (int pSize) |
| void | setLineWidthRecursive (PointCoordinateType width) |
| virtual ccBBox | getBB_recursive (bool withGLFeatures=false, bool onlyEnabledChildren=true) |
| Returns the bounding-box of this entity and it's children. More... | |
| virtual GlobalBoundingBox | getGlobalBB_recursive (bool withGLFeatures=false, bool onlyEnabledChildren=true) |
| Returns the global bounding-box of this entity and it's children. More... | |
| virtual ccBBox | getDisplayBB_recursive (bool relative) |
| Returns the bounding-box of this entity and it's children WHEN DISPLAYED. More... | |
| virtual ccBBox | getOwnFitBB (ccGLMatrix &trans) |
| Returns best-fit bounding-box (if available) More... | |
| virtual void | drawBB (CC_DRAW_CONTEXT &context, const ecvColor::Rgb &col) |
| Draws the entity (and its children) bounding-box. More... | |
| void | draw (CC_DRAW_CONTEXT &context) override |
| Draws entity and its children. More... | |
| void | updateNameIn3DRecursive () |
| void | setHideShowType (CC_DRAW_CONTEXT &context) |
| void | setRemoveType (CC_DRAW_CONTEXT &context) |
| ENTITY_TYPE | getEntityType () const |
| virtual void | redrawDisplay (bool forceRedraw=true, bool only2D=false) |
| Redraws associated display. More... | |
| bool | getAbsoluteGLTransformation (ccGLMatrix &trans) const |
| virtual bool | isDisplayed () const |
| Returns whether the object is actually displayed (visible) or not. More... | |
| virtual bool | isBranchEnabled () const |
| Returns whether the object and all its ancestors are enabled. More... | |
| virtual void | redrawDisplay_recursive (bool p) |
| virtual void | refreshDisplay_recursive (bool p) |
| virtual void | setSelected_recursive (bool p) |
| virtual void | toggleActivation_recursive () |
| virtual void | toggleVisibility_recursive () |
| virtual void | toggleColors_recursive () |
| virtual void | resetGLTransformationHistory_recursive () |
| virtual void | toggleNormals_recursive () |
| virtual void | toggleSF_recursive () |
| virtual void | toggleShowName_recursive () |
| unsigned | findMaxUniqueID_recursive () const |
| Returns the max 'unique ID' of this entity and its siblings. More... | |
| void | applyGLTransformation_recursive (const ccGLMatrix *trans=nullptr) |
| Applies the active OpenGL transformation to the entity (recursive) More... | |
| virtual void | notifyGeometryUpdate () |
| bool | isSerializable () const override |
| Returns whether object is serializable of not. More... | |
| bool | toFile (QFile &out, short dataVersion) const override |
| Saves data to binary stream. More... | |
| bool | fromFile (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override |
| Loads data from binary stream. More... | |
| short | minimumFileVersion () const override |
| Returns the minimum file version required to save this instance. More... | |
| bool | fromFileNoChildren (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) |
| Custom version of ccSerializableObject::fromFile. More... | |
| virtual bool | isShareable () const |
| Returns whether object is shareable or not. More... | |
| virtual void | setSelectionBehavior (SelectionBehavior mode) |
| Sets selection behavior (when displayed) More... | |
| virtual SelectionBehavior | getSelectionBehavior () const |
| Returns selection behavior. More... | |
| virtual unsigned | getUniqueIDForDisplay () const |
| Returns object unqiue ID used for display. More... | |
| virtual const ccGLMatrix & | getGLTransformationHistory () const |
| Returns the transformation 'history' matrix. More... | |
| virtual void | setGLTransformationHistory (const ccGLMatrix &mat) |
| Sets the transformation 'history' matrix (handle with care!) More... | |
| virtual void | resetGLTransformationHistory () |
| Resets the transformation 'history' matrix. More... | |
| bool | pushDisplayState () override |
| Pushes the current display state (overridden) More... | |
| void | popDisplayState (bool apply=true) override |
| Pops the last pushed display state (overridden) More... | |
Public Member Functions inherited from ccObject | |
| ccObject (QString name=QString()) | |
| Default constructor. More... | |
| ccObject (const ccObject &object) | |
| Copy constructor. More... | |
| virtual QString | getName () const |
| Returns object name. More... | |
| virtual void | setName (const QString &name) |
| Sets object name. More... | |
| virtual void | setRemoveFlag (bool removeFlag) |
| Sets removeFlag. More... | |
| virtual bool | getRemoveFlag () |
| Returns removeFlag. More... | |
| virtual unsigned | getUniqueID () const |
| Returns object unique ID. More... | |
| virtual void | setUniqueID (unsigned ID) |
| Changes unique ID. More... | |
| virtual bool | isEnabled () const |
| Returns whether the object is enabled or not. More... | |
| virtual void | setEnabled (bool state) |
| Sets the "enabled" property. More... | |
| virtual void | toggleActivation () |
| Toggles the "enabled" property. More... | |
| virtual bool | isLocked () const |
| Returns whether the object is locked or not. More... | |
| virtual void | setLocked (bool state) |
| Sets the "enabled" property. More... | |
| bool | isLeaf () const |
| bool | isCustom () const |
| bool | isHierarchy () const |
| bool | isKindOf (CV_CLASS_ENUM type) const |
| bool | isA (CV_CLASS_ENUM type) const |
| QVariant | getMetaData (const QString &key) const |
| Returns a given associated meta data. More... | |
| bool | removeMetaData (const QString &key) |
| Removes a given associated meta-data. More... | |
| void | setMetaData (const QString &key, const QVariant &data) |
| Sets a meta-data element. More... | |
| void | setMetaData (const QVariantMap &dataset, bool overwrite=false) |
| Sets several meta-data elements at a time. More... | |
| bool | hasMetaData (const QString &key) const |
| Returns whether a meta-data element with the given key exists or not. More... | |
| const QVariantMap & | metaData () const |
| Returns meta-data map (const only) More... | |
| void | setBaseName (const QString &baseName) |
| QString | getBaseName () const |
| void | setFullPath (const QString &fullPaht) |
| QString | getFullPath () const |
Public Member Functions inherited from ccSerializableObject | |
| virtual | ~ccSerializableObject ()=default |
| Destructor. More... | |
Public Member Functions inherited from ccDrawableObject | |
| ccDrawableObject () | |
| Default constructor. More... | |
| ccDrawableObject (const ccDrawableObject &object) | |
| Copy constructor. More... | |
| virtual | ~ccDrawableObject ()=default |
| virtual bool | isVisible () const |
| Returns whether entity is visible or not. More... | |
| virtual void | setVisible (bool state) |
| Sets entity visibility. More... | |
| virtual void | toggleVisibility () |
| Toggles visibility. More... | |
| virtual bool | isRedraw () const |
| Returns whether entity is to be redraw. More... | |
| virtual void | setRedraw (bool state) |
| Sets entity redraw mode. More... | |
| virtual void | setForceRedraw (bool state) |
| Sets force redraw. More... | |
| virtual void | setFixedId (bool state) |
| virtual bool | isFixedId () |
| virtual bool | isVisibilityLocked () const |
| Returns whether visibility is locked or not. More... | |
| virtual void | lockVisibility (bool state) |
| Locks/unlocks visibility. More... | |
| virtual bool | isSelected () const |
| Returns whether entity is selected or not. More... | |
| virtual void | setSelected (bool state) |
| Selects/Unselects entity. More... | |
| virtual void | getDrawingParameters (glDrawParams ¶ms) const |
| Returns main OpenGL parameters for this entity. More... | |
| virtual bool | hasColors () const |
| Returns whether colors are enabled or not. More... | |
| virtual bool | colorsShown () const |
| Returns whether colors are shown or not. More... | |
| virtual void | showColors (bool state) |
| Sets colors visibility. More... | |
| virtual void | toggleColors () |
| Toggles colors display state. More... | |
| virtual bool | hasNormals () const |
| Returns whether normals are enabled or not. More... | |
| virtual bool | normalsShown () const |
| Returns whether normals are shown or not. More... | |
| virtual void | toggleNormals () |
| Toggles normals display state. More... | |
| virtual bool | hasDisplayedScalarField () const |
| Returns whether an active scalar field is available or not. More... | |
| virtual bool | hasScalarFields () const |
| Returns whether one or more scalar fields are instantiated. More... | |
| virtual void | showSF (bool state) |
| Sets active scalarfield visibility. More... | |
| virtual void | toggleSF () |
| Toggles SF display state. More... | |
| virtual bool | sfShown () const |
| Returns whether active scalar field is visible. More... | |
| virtual void | toggleMaterials () |
| Toggles material display state. More... | |
| virtual void | showNameIn3D (bool state) |
| Sets whether name should be displayed in 3D. More... | |
| virtual bool | nameShownIn3D () const |
| Returns whether name is displayed in 3D or not. More... | |
| virtual void | toggleShowName () |
| Toggles name in 3D display state. More... | |
| virtual bool | isColorOverridden () const |
| virtual const ecvColor::Rgb & | getTempColor () const |
| Returns current temporary (unique) color. More... | |
| virtual void | setTempColor (const ecvColor::Rgb &col, bool autoActivate=true) |
| Sets current temporary (unique) More... | |
| virtual void | enableTempColor (bool state) |
| Set temporary color activation state. More... | |
| virtual float | getOpacity () const |
| virtual void | setOpacity (float opacity) |
| Set opacity activation state. More... | |
| virtual void | setGLTransformation (const ccGLMatrix &trans) |
| Associates entity with a GL transformation (rotation + translation) More... | |
| virtual void | enableGLTransformation (bool state) |
| Enables/disables associated GL transformation. More... | |
| virtual bool | isGLTransEnabled () const |
| Returns whether a GL transformation is enabled or not. More... | |
| virtual const ccGLMatrix & | getGLTransformation () const |
| Returns associated GL transformation. More... | |
| virtual void | resetGLTransformation () |
| Resets associated GL transformation. More... | |
| virtual void | rotateGL (const ccGLMatrix &rotMat) |
| Multiplies (left) current GL transformation by a rotation matrix. More... | |
| virtual void | translateGL (const CCVector3 &trans) |
| Translates current GL transformation by a rotation matrix. More... | |
| virtual void | removeAllClipPlanes () |
| Removes all clipping planes (if any) More... | |
| virtual bool | addClipPlanes (const ccClipPlane &plane) |
| Registers a new clipping plane. More... | |
| virtual void | toggleClipPlanes (CC_DRAW_CONTEXT &context, bool enable) |
| Enables or disables clipping planes (OpenGL) More... | |
| virtual void | applyDisplayState (const DisplayState &state) |
| Applies a display state. More... | |
Static Public Member Functions | |
| static bool | IsCloudVerticesOfMesh (ccGenericPointCloud *cloud, ccGenericMesh **mesh=nullptr) |
| Helper to determine if the input cloud acts as vertices of a mesh. More... | |
Static Public Member Functions inherited from ccHObject | |
| static ccHObject * | New (CV_CLASS_ENUM objectType, const char *name=nullptr) |
| Static factory. More... | |
| static ccHObject * | New (const QString &pluginId, const QString &classId, const char *name=nullptr) |
| Static factory (version to be used by external plugin factories) More... | |
| static Eigen::Vector3d | ComputeMinBound (const std::vector< Eigen::Vector3d > &points) |
| Compute min bound of a list points. More... | |
| static Eigen::Vector3d | ComputeMaxBound (const std::vector< Eigen::Vector3d > &points) |
| Compute max bound of a list points. More... | |
| static Eigen::Vector3d | ComputeCenter (const std::vector< Eigen::Vector3d > &points) |
| Computer center of a list of points. More... | |
| static void | ResizeAndPaintUniformColor (std::vector< Eigen::Vector3d > &colors, std::size_t size, const Eigen::Vector3d &color) |
| Resizes the colors vector and paints a uniform color. More... | |
| static void | TransformPoints (const Eigen::Matrix4d &transformation, std::vector< Eigen::Vector3d > &points) |
| Transforms all points with the transformation matrix. More... | |
| static void | TransformNormals (const Eigen::Matrix4d &transformation, std::vector< Eigen::Vector3d > &normals) |
| Transforms the normals with the transformation matrix. More... | |
| static void | TransformCovariances (const Eigen::Matrix4d &transformation, std::vector< Eigen::Matrix3d > &covariances) |
| Transforms all covariance matrices with the transformation. More... | |
| static void | TranslatePoints (const Eigen::Vector3d &translation, std::vector< Eigen::Vector3d > &points, bool relative) |
| Apply translation to the geometry coordinates. More... | |
| static void | ScalePoints (const double scale, std::vector< Eigen::Vector3d > &points, const Eigen::Vector3d ¢er) |
Scale the coordinates of all points by the scaling factor scale. More... | |
| static void | RotatePoints (const Eigen::Matrix3d &R, std::vector< Eigen::Vector3d > &points, const Eigen::Vector3d ¢er) |
Rotate all points with the rotation matrix R. More... | |
| static void | RotateNormals (const Eigen::Matrix3d &R, std::vector< Eigen::Vector3d > &normals) |
Rotate all normals with the rotation matrix R. More... | |
| static void | RotateCovariances (const Eigen::Matrix3d &R, std::vector< Eigen::Matrix3d > &covariances) |
Rotate all covariance matrices with the rotation matrix R. More... | |
| static Eigen::Matrix3d | GetRotationMatrixFromXYZ (const Eigen::Vector3d &rotation) |
| Get Rotation Matrix from XYZ RotationType. More... | |
| static Eigen::Matrix3d | GetRotationMatrixFromYZX (const Eigen::Vector3d &rotation) |
| Get Rotation Matrix from YZX RotationType. More... | |
| static Eigen::Matrix3d | GetRotationMatrixFromZXY (const Eigen::Vector3d &rotation) |
| Get Rotation Matrix from ZXY RotationType. More... | |
| static Eigen::Matrix3d | GetRotationMatrixFromXZY (const Eigen::Vector3d &rotation) |
| Get Rotation Matrix from XZY RotationType. More... | |
| static Eigen::Matrix3d | GetRotationMatrixFromZYX (const Eigen::Vector3d &rotation) |
| Get Rotation Matrix from ZYX RotationType. More... | |
| static Eigen::Matrix3d | GetRotationMatrixFromYXZ (const Eigen::Vector3d &rotation) |
| Get Rotation Matrix from YXZ RotationType. More... | |
| static Eigen::Matrix3d | GetRotationMatrixFromAxisAngle (const Eigen::Vector3d &rotation) |
| Get Rotation Matrix from AxisAngle RotationType. More... | |
| static Eigen::Matrix3d | GetRotationMatrixFromQuaternion (const Eigen::Vector4d &rotation) |
| Get Rotation Matrix from Quaternion. More... | |
| static Eigen::Matrix3d | GetRotationMatrixFromEulerAngle (const Eigen::Vector3d &rotation) |
| Get Rotation Matrix from Euler angle. More... | |
Static Public Member Functions inherited from ccObject | |
| static unsigned | GetCurrentDBVersion () |
| Returns current database version. More... | |
| static void | SetUniqueIDGenerator (ccUniqueIDGenerator::Shared generator) |
| Sets the unique ID generator. More... | |
| static ccUniqueIDGenerator::Shared | GetUniqueIDGenerator () |
| Returns the unique ID generator. More... | |
| static unsigned | GetNextUniqueID () |
| Returns a new unassigned unique ID. More... | |
| static unsigned | GetLastUniqueID () |
| Returns last assigned unique ID. More... | |
| static CV_CLASS_ENUM | ReadClassIDFromFile (QFile &in, short dataVersion) |
| Helper: reads out class ID from a binary stream. More... | |
Static Public Member Functions inherited from ccSerializableObject | |
| static bool | WriteError () |
| Sends a custom error message (write error) and returns 'false'. More... | |
| static bool | ReadError () |
| Sends a custom error message (read error) and returns 'false'. More... | |
| static bool | MemoryError () |
| Sends a custom error message (not enough memory) and returns 'false'. More... | |
| static bool | CorruptError () |
| Sends a custom error message (corrupted file) and returns 'false'. More... | |
Protected Member Functions | |
| bool | toFile_MeOnly (QFile &out, short dataVersion) const override |
| Save own object data. More... | |
| short | minimumFileVersion_MeOnly () const override |
| bool | fromFile_MeOnly (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override |
| Loads own object data. More... | |
| virtual bool | trianglePicking (unsigned triIndex, const CCVector2d &clickPos, const ccGLMatrix &trans, bool noGLTrans, const ccGenericPointCloud &vertices, const ccGLCameraParameters &camera, CCVector3d &point, CCVector3d *barycentricCoords=nullptr) const |
| Triangle picking (single triangle) More... | |
| void | drawMeOnly (CC_DRAW_CONTEXT &context) override |
| Enables (OpenGL) stipple mask. More... | |
| void | handleColorRamp (CC_DRAW_CONTEXT &context) |
| Handles the color ramp display. More... | |
Protected Member Functions inherited from ccShiftedObject | |
| bool | saveShiftInfoToFile (QFile &out) const |
| Serialization helper (output) More... | |
| bool | loadShiftInfoFromFile (QFile &in) |
| Serialization helper (input) More... | |
Protected Member Functions inherited from ccHObject | |
| virtual void | setParent (ccHObject *anObject) |
| Sets parent object. More... | |
| virtual void | applyGLTransformation (const ccGLMatrix &trans) |
| Applies a GL transformation to the entity. More... | |
| virtual void | drawNameIn3D () |
| Draws the entity name in 3D. More... | |
| virtual void | onDeletionOf (const ccHObject *obj) |
| This method is called when another object is deleted. More... | |
| virtual void | onUpdateOf (ccHObject *obj) |
| This method is called when another object (geometry) is updated. More... | |
Protected Member Functions inherited from ccObject | |
| virtual bool | getFlagState (CV_OBJECT_FLAG flag) const |
| Returns flag state. More... | |
| virtual void | setFlagState (CV_OBJECT_FLAG flag, bool state) |
| Sets flag state. More... | |
| bool | toFile (QFile &out, short dataVersion) const override |
| Saves data to binary stream. More... | |
| short | minimumFileVersion () const override |
| Returns the minimum file version required to save this instance. More... | |
| bool | fromFile (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override |
| Reimplemented from ccSerializableObject::fromFile. More... | |
Static Protected Member Functions | |
| static CCVector3 * | GetVertexBuffer () |
| static CCVector3 * | GetNormalsBuffer () |
| static ecvColor::Rgb * | GetColorsBuffer () |
| static unsigned * | GetWireVertexIndexes () |
| Returns a pre-initialized array of vertex indexes for wired display. More... | |
Protected Attributes | |
| bool | m_triNormsShown |
| Per-triangle normals display flag. More... | |
| bool | m_materialsShown |
| Texture/material display flag. More... | |
| bool | m_showWired |
| Wireframe display mode. More... | |
| bool | m_showPoints |
| points display mode More... | |
| bool | m_stippling |
| Polygon stippling state. More... | |
Protected Attributes inherited from ccShiftedObject | |
| CCVector3d | m_globalShift |
| Global shift (typically applied at loading time) More... | |
| double | m_globalScale |
| Global scale (typically applied at loading time) More... | |
Protected Attributes inherited from ccHObject | |
| ccHObject * | m_parent |
| Parent. More... | |
| Container | m_children |
| Children. More... | |
| SelectionBehavior | m_selectionBehavior |
| Selection behavior. More... | |
| std::map< ccHObject *, int > | m_dependencies |
| Dependencies map. More... | |
| ccGLMatrix | m_glTransHistory |
| Cumulative GL transformation. More... | |
| bool | m_isDeleting |
| Flag to safely handle dependencies when the object is being deleted. More... | |
Protected Attributes inherited from ccObject | |
| QString | m_name |
| Object name. More... | |
| QString | m_baseName |
| QString | m_filePath |
| bool | m_removeFlag |
| unsigned | m_flags |
| Object flags. More... | |
| QVariantMap | m_metaData |
| Associated meta-data. More... | |
Protected Attributes inherited from ccDrawableObject | |
| bool | m_fixedId |
| bool | m_modelRedraw |
| bool | m_forceRedraw |
| float | m_opacity |
| bool | m_visible |
| Specifies whether the object is visible or not. More... | |
| bool | m_selected |
| Specifies whether the object is selected or not. More... | |
| bool | m_lockedVisibility |
| Specifies whether the visibility can be changed by user or not. More... | |
| bool | m_colorsDisplayed |
| Specifies whether colors should be displayed. More... | |
| bool | m_normalsDisplayed |
| Specifies whether normals should be displayed. More... | |
| bool | m_sfDisplayed |
| Specifies whether scalar field should be displayed. More... | |
| ecvColor::Rgb | m_tempColor |
| Temporary (unique) color. More... | |
| bool | m_colorIsOverridden |
| Temporary (unique) color activation state. More... | |
| ccGLMatrix | m_glTrans |
| Current GL transformation. More... | |
| bool | m_glTransEnabled |
| Current GL transformation activation state. More... | |
| bool | m_showNameIn3D |
| Whether name is displayed in 3D or not. More... | |
| CCVector3d | m_nameIn3DPos |
| Last 2D position of the '3D' name. More... | |
| ccClipPlaneSet | m_clipPlanes |
| Active clipping planes (used for display only) More... | |
| std::vector< DisplayState::Shared > | m_displayStateStack |
| The stack of pushed display states. More... | |
Additional Inherited Members | |
Public Types inherited from cloudViewer::GenericMesh | |
| enum class | SimplificationContraction { Average , Quadric } |
| Indicates the method that is used for mesh simplification if multiple vertices are combined to a single one. More... | |
| enum class | FilterScope { All , Color , Normal , Vertex } |
| Indicates the scope of filter operations. More... | |
| enum class | DeformAsRigidAsPossibleEnergy { Spokes , Smoothed } |
| using | genericTriangleAction = std::function< void(GenericTriangle &)> |
| Generic function to apply to a triangle (used by foreach) More... | |
Public Types inherited from ccHObject | |
| enum | DEPENDENCY_FLAGS { DP_NONE = 0 , DP_NOTIFY_OTHER_ON_DELETE = 1 , DP_NOTIFY_OTHER_ON_UPDATE , DP_DELETE_OTHER = 8 , DP_PARENT_OF_OTHER = 24 } |
| Dependency flags. More... | |
| enum | SelectionBehavior { SELECTION_AA_BBOX , SELECTION_FIT_BBOX , SELECTION_IGNORED } |
| Behavior when selected. More... | |
| using | Container = std::vector< ccHObject * > |
| Standard instances container (for children, etc.) More... | |
| using | Shared = QSharedPointer< ccHObject > |
| Shared pointer. More... | |
| using | SharedContainer = std::vector< Shared > |
| Shared instances container (for children, etc.) More... | |
| using | GlobalBoundingBox = cloudViewer::BoundingBoxTpl< double > |
| Global (non-shifted) bounding-box. More... | |
Public Types inherited from ccSerializableObject | |
| enum | DeserializationFlags { DF_POINT_COORDS_64_BITS , DF_SCALAR_VAL_32_BITS = 2 } |
| Deserialization flags (bit-field) More... | |
| typedef QMultiMap< unsigned, unsigned > | LoadedIDMap |
| Map of loaded unique IDs (old ID --> new ID) More... | |
Generic mesh interface.
Definition at line 28 of file ecvGenericMesh.h.
| ccGenericMesh::ccGenericMesh | ( | QString | name = QString() | ) |
Default constructor.
| name | object name |
Definition at line 32 of file ecvGenericMesh.cpp.
References ccDrawableObject::lockVisibility(), and ccDrawableObject::setVisible().
|
overridedefault |
Destructor.
|
pure virtual |
Returns max capacity.
Implemented in ccSubMesh, ccMeshGroup, and ccMesh.
Referenced by define_ccGenericMesh(), and ccMesh::shrinkToFit().
|
virtual |
Returns the (barycentric) interpolation weights for a given triangle.
Reimplemented in ccMesh.
Definition at line 476 of file ecvGenericMesh.cpp.
References cloudViewer::GenericTriangle::_getA(), cloudViewer::GenericTriangle::_getB(), cloudViewer::GenericTriangle::_getC(), cloudViewer::GenericIndexedMesh::_getTriangle(), Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by ccCropTool::Crop().
| bool ccGenericMesh::computePointPosition | ( | unsigned | triIndex, |
| const CCVector2d & | uv, | ||
| CCVector3 & | P, | ||
| bool | warningIfOutside = true |
||
| ) | const |
Computes the point that corresponds to the given uv (barycentric) coordinates
Definition at line 656 of file ecvGenericMesh.cpp.
References cloudViewer::GenericIndexedMesh::getTriangleVertices(), cloudViewer::GenericMesh::size(), uv, CVLog::Warning(), Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, Tuple3Tpl< Type >::z, and z.
|
overrideprotectedvirtual |
Enables (OpenGL) stipple mask.
Reimplemented from ccHObject.
Reimplemented in ccPlane, ccMeshGroup, and ccMesh.
Definition at line 138 of file ecvGenericMesh.cpp.
References ccScalarField::areNaNValuesShownInGrey(), cloudViewer::utility::ceil(), context, ecvDisplayTools::Draw(), ECV_POINTS_MODE, ECV_SURFACE_MODE, ECV_WIREFRAME_MODE, getAssociatedCloud(), ccPointCloud::getCurrentDisplayedScalarField(), ccDrawableObject::getDrawingParameters(), ecvDisplayTools::GetMainWindow(), ccGenericPointCloud::getTheVisibilityArray(), handleColorRamp(), hasMaterials(), ccDrawableObject::hasNormals(), hasTextures(), hasTriNormals(), ccObject::isA(), ccDrawableObject::isColorOverridden(), isShownAsPoints(), isShownAsWire(), ecvColor::lightGrey(), ccDrawableObject::m_normalsDisplayed, ccDrawableObject::m_tempColor, MACRO_Draw3D, MACRO_EntityPicking, MACRO_FastEntityPicking, MACRO_LightIsEnabled, MACRO_LODActivated, materialsShown(), CV_TYPES::POINT_CLOUD, glDrawParams::showColors, glDrawParams::showNorms, glDrawParams::showSF, showWired(), cloudViewer::GenericCloud::size(), cloudViewer::GenericMesh::size(), and triNormsShown().
|
inline |
Enables polygon stippling.
Definition at line 207 of file ecvGenericMesh.h.
Referenced by ccFitPlane::ccFitPlane(), qFacets::createFacets(), ccSubMesh::createNewSubMeshFromSelection(), ccCameraSensor::drawMeOnly(), importParametersFrom(), ccMesh::merge(), ccCompass::recurseStipple(), and qCanupo2DViewDialog::trainClassifier().
|
overrideprotectedvirtual |
Loads own object data.
Called by 'fromFile' (recursive scheme) To be overloaded (but still called ;) by subclass.
| in | input file |
| dataVersion | file version |
| flags | deserialization flags (see ccSerializableObject::DeserializationFlags) |
| oldToNewIDMap | map to link old IDs with new IDs |
Reimplemented from ccHObject.
Reimplemented in ccTorus, ccSubMesh, ccSphere, ccQuadric, ccPlane, ccMeshGroup, ccMesh, and ccGenericPrimitive.
Definition at line 294 of file ecvGenericMesh.cpp.
|
pure virtual |
Returns the vertices cloud.
Implemented in ccSubMesh, ccMeshGroup, and ccMesh.
Referenced by ccGraphicalSegmentationTool::addEntity(), PclUtils::PCLVis::addTextureMeshFromCCMesh(), ccGraphicalSegmentationTool::applySegmentation(), PclUtils::renders::MeshTextureApplier::ApplyTexturesFromCCMesh(), CanDetachCloud(), ccCropTool::Crop(), define_ccGenericMesh(), ccDBRoot::deleteSelectedEntities(), qPCV::doAction(), drawMeOnly(), ccDBRoot::dropMimeData(), ccCommandLineParser::exportEntity(), ccPropertiesTreeDelegate::fillWithMesh(), getGlobalScale(), getGlobalShift(), cvDistanceTool::getOutput(), cvProtractorTool::getOutput(), cc2smReader::getPclCloud2(), cc2smReader::getPclMesh(), cc2smReader::getPclTextureMesh(), cc2smReader::getVtkPolyDataFromMeshCloud(), cc2smReader::getVtkPolyDataWithTextures(), handleColorRamp(), ccRegistrationTools::ICP(), ccCommandLineParser::importFile(), IsCloudVerticesOfMesh(), ccComparisonDlg::prepareEntitiesForComparison(), CommandExtractVertices::process(), PCVCommand::Process(), ecvDisplayTools::ProcessPickingResult(), STLFilter::saveToASCIIFile(), STLFilter::saveToBINFile(), DxfFilter::saveToFile(), ObjFilter::saveToFile(), OFFFilter::saveToFile(), MAFilter::saveToFile(), setGlobalScale(), setGlobalShift(), ecvDisplayTools::StartCPUBasedPointPicking(), ToFbxMesh(), and trianglePicking().
|
pure virtual |
! Returns RGB color from a given triangle material/texture **
| triIndex | triangle index |
Implemented in ccSubMesh, ccMeshGroup, and ccMesh.
Referenced by samplePoints().
|
staticprotected |
Definition at line 83 of file ecvGenericMesh.cpp.
References ccChunk::SIZE.
|
overridevirtual |
Returns the scale applied to original coordinates.
Reimplemented from ccShiftedObject.
Definition at line 715 of file ecvGenericMesh.cpp.
References getAssociatedCloud(), and ccShiftedObject::getGlobalScale().
|
overridevirtual |
Returns the shift applied to original coordinates.
See ccGenericPointCloud::setOriginalShift
Reimplemented from ccShiftedObject.
Definition at line 710 of file ecvGenericMesh.cpp.
References getAssociatedCloud(), and ccShiftedObject::getGlobalShift().
|
pure virtual |
Implemented in ccSubMesh, ccMeshGroup, and ccMesh.
Referenced by PclUtils::PCLVis::addTextureMeshFromCCMesh(), PclUtils::renders::MeshTextureApplier::ApplyTexturesFromCCMesh(), ccCropTool::Crop(), define_ccGenericMesh(), cc2smReader::getPclCloud2(), cc2smReader::getPclTextureMesh(), cc2smReader::getVtkPolyDataWithTextures(), ObjFilter::saveToFile(), ccPropertiesTreeDelegate::setEditorData(), PCLDisplayTools::updateMeshTextures(), and updateTextures().
|
staticprotected |
Definition at line 77 of file ecvGenericMesh.cpp.
References ccChunk::SIZE.
|
pure virtual |
Implemented in ccSubMesh, ccMesh, and ccMeshGroup.
|
pure virtual |
Returns per-triangle texture coordinates array.
Implemented in ccSubMesh, ccMeshGroup, and ccMesh.
Referenced by define_ccGenericMesh(), and ObjFilter::saveToFile().
|
pure virtual |
Returns a given triangle material indexes.
Implemented in ccSubMesh, ccMeshGroup, and ccMesh.
Referenced by ccCropTool::Crop(), define_ccGenericMesh(), cc2smReader::getPclTextureMesh(), cc2smReader::getVtkPolyDataWithTextures(), and ObjFilter::saveToFile().
|
pure virtual |
Returns a triplet of normal indexes for a given triangle (if any)
| [in] | triangleIndex | triangle index |
| [out] | i1 | first vertex normal index (or -1 if none) |
| [out] | i2 | second vertex normal index (or -1 if none) |
| [out] | i3 | third vertex normal index (or -1 if none) |
Implemented in ccSubMesh, ccMeshGroup, and ccMesh.
Referenced by cc2smReader::getPclCloud2(), cc2smReader::getVtkPolyDataFromMeshCloud(), and ObjFilter::saveToFile().
|
pure virtual |
Returns a given triangle normal.
Mesh must have triangle normals associated (see hasTriNormals)
Implemented in ccSubMesh, ccMeshGroup, and ccMesh.
Referenced by ToFbxMesh().
|
inlinevirtual |
Reimplemented in ccMesh.
Definition at line 111 of file ecvGenericMesh.h.
|
inlinevirtual |
Reimplemented in ccMesh.
Definition at line 117 of file ecvGenericMesh.h.
|
pure virtual |
Returns per-triangle texture coordinates (pointer to)
Implemented in ccSubMesh, ccMeshGroup, and ccMesh.
Referenced by ccCropTool::Crop(), cc2smReader::getPclTextureMesh(), and cc2smReader::getVtkPolyDataWithTextures().
|
pure virtual |
Returns the triplet of tex coords indexes for a given triangle.
| triangleIndex | triangle index |
| i1 | first vertex tex coords index |
| i2 | second vertex tex coords index |
| i3 | third vertex tex coords index |
Implemented in ccSubMesh, ccMeshGroup, and ccMesh.
Referenced by ObjFilter::saveToFile().
|
pure virtual |
Returns per-triangle normals shared array.
Implemented in ccSubMesh, ccMeshGroup, and ccMesh.
Referenced by cc2smReader::getPclCloud2(), cc2smReader::getVtkPolyDataFromMeshCloud(), and ObjFilter::saveToFile().
|
staticprotected |
Definition at line 71 of file ecvGenericMesh.cpp.
References ccChunk::SIZE.
|
pure virtual |
! Returns RGB color of a vertex from a given triangle material/texture **
| triIndex | triangle index |
Implemented in ccSubMesh, ccMeshGroup, and ccMesh.
|
staticprotected |
Returns a pre-initialized array of vertex indexes for wired display.
Array size is MAX_NUMBER_OF_ELEMENTS_PER_CHUNK*6 by default
Definition at line 91 of file ecvGenericMesh.cpp.
References s_vertIndexesInitialized, s_vertWireIndexes, and ccChunk::SIZE.
|
protected |
Handles the color ramp display.
Definition at line 105 of file ecvGenericMesh.cpp.
References ccPointCloud::addColorRampInfo(), context, getAssociatedCloud(), ccHObject::getParent(), ccObject::isA(), ccObject::isEnabled(), ccObject::isKindOf(), ccDrawableObject::isVisible(), MACRO_Draw2D, MACRO_Foreground, CV_TYPES::MESH, CV_TYPES::POINT_CLOUD, ccPointCloud::sfColorScaleShown(), ccDrawableObject::sfShown(), and ccHObjectCaster::ToGenericMesh().
Referenced by drawMeOnly(), and ccMesh::drawMeOnly().
|
pure virtual |
Implemented in ccSubMesh, ccMeshGroup, and ccMesh.
Referenced by ccCropTool::Crop(), define_ccGenericMesh(), drawMeOnly(), ccPropertiesTreeDelegate::fillWithMesh(), cc2smReader::getPclTextureMesh(), cc2smReader::getVtkPolyDataWithTextures(), samplePoints(), ObjFilter::saveToFile(), PCLDisplayTools::updateMeshTextures(), and updateTextures().
|
pure virtual |
Returns whether this mesh as per-triangle triplets of tex coords indexes.
Implemented in ccSubMesh, ccMeshGroup, and ccMesh.
Referenced by ccCropTool::Crop(), define_ccGenericMesh(), and ObjFilter::saveToFile().
|
pure virtual |
Returns whether textures are available for this mesh.
Implemented in ccSubMesh, ccMeshGroup, and ccMesh.
Referenced by define_ccGenericMesh(), drawMeOnly(), cc2smReader::getPclTextureMesh(), cc2smReader::getVtkPolyDataWithTextures(), PCLDisplayTools::updateMeshTextures(), and updateTextures().
|
pure virtual |
Returns whether the mesh has per-triangle normals.
Implemented in ccSubMesh, ccMeshGroup, and ccMesh.
Referenced by ccCropTool::Crop(), define_ccGenericMesh(), drawMeOnly(), cc2smReader::getPclCloud2(), cc2smReader::getVtkPolyDataFromMeshCloud(), ccMesh::HasTriangleNormals(), ObjFilter::saveToFile(), and ToFbxMesh().
| void ccGenericMesh::importParametersFrom | ( | const ccGenericMesh * | mesh | ) |
Imports the parameters from another mesh.
Only the specific parameters are imported.
Definition at line 452 of file ecvGenericMesh.cpp.
References ccShiftedObject::copyGlobalShiftAndScale(), enableStippling(), ccHObject::getGLTransformationHistory(), isShownAsPoints(), isShownAsWire(), ccObject::metaData(), ccHObject::setGLTransformationHistory(), ccObject::setMetaData(), showPoints(), showWired(), and stipplingEnabled().
Referenced by ccMesh::cloneMesh(), ccMesh::createNewMeshFromSelection(), ccCropTool::Crop(), ccGenericPrimitive::finishCloneJob(), and ccMesh::partialClone().
|
pure virtual |
Interpolates RGB colors inside a given triangle.
| triIndex | triangle index | |
| P | point where to interpolate (should be inside the triangle!) | |
| [out] | C | interpolated color |
Implemented in ccSubMesh, ccMeshGroup, and ccMesh.
Referenced by ccCropTool::Crop(), and samplePoints().
|
pure virtual |
Interpolates normal(s) inside a given triangle.
| triIndex | triangle index | |
| w | barycentric coordinates | |
| [out] | N | interpolated normal |
Implemented in ccSubMesh, ccMeshGroup, and ccMesh.
|
static |
Helper to determine if the input cloud acts as vertices of a mesh.
Definition at line 800 of file ecvGenericMesh.cpp.
References getAssociatedCloud(), ccHObject::getChild(), ccHObject::getChildrenNumber(), ccHObject::getParent(), ccObject::isKindOf(), and CV_TYPES::MESH.
Referenced by ccGraphicalSegmentationTool::addEntity(), ccGraphicalSegmentationTool::applySegmentation(), and ccGraphicalSegmentationTool::prepareEntityForRemoval().
|
inlineoverridevirtual |
Returns whether object is serializable of not.
Reimplemented from ccSerializableObject.
Reimplemented in ccSubMesh, ccMeshGroup, and ccMesh.
Definition at line 43 of file ecvGenericMesh.h.
|
inlinevirtual |
Returns whether the mesh is displayed as wired or with plain facets.
Definition at line 185 of file ecvGenericMesh.h.
Referenced by drawMeOnly(), ccMesh::drawMeOnly(), ccPropertiesTreeDelegate::fillWithMesh(), importParametersFrom(), and ccMesh::merge().
|
inlinevirtual |
Returns whether the mesh is displayed as wired or with plain facets.
Definition at line 179 of file ecvGenericMesh.h.
Referenced by ccSubMesh::createNewSubMeshFromSelection(), drawMeOnly(), ccMesh::drawMeOnly(), ccPropertiesTreeDelegate::fillWithMesh(), importParametersFrom(), ccMesh::merge(), and ecvDisplayTools::StartCPUBasedPointPicking().
|
inlinevirtual |
Sets whether textures/material should be displayed or not.
Definition at line 198 of file ecvGenericMesh.h.
Referenced by ccMesh::cloneMesh(), ccMesh::createNewMeshFromSelection(), ccSubMesh::createNewSubMeshFromSelection(), ccCropTool::Crop(), drawMeOnly(), ccMesh::drawMeOnly(), cvSelectionExporter::exportFromSourceMesh(), ccPropertiesTreeDelegate::fillWithMesh(), cc2smReader::getPclTextureMesh(), cc2smReader::getVtkPolyDataWithTextures(), ObjFilter::loadFile(), ccMesh::merge(), ccMesh::partialClone(), ccMesh::toggleMaterials(), PCLDisplayTools::updateMeshTextures(), and updateTextures().
|
overrideprotectedvirtual |
Returns the minimum file version required to save this instance's own data To be overloaded (but still called ;) by subclass. Used internally by minimumFileVersion() to compute the overall minimum.
Reimplemented from ccHObject.
Reimplemented in ccTorus, ccSubMesh, ccSphere, ccQuadric, ccPlane, ccMeshGroup, ccMesh, and ccGenericPrimitive.
Definition at line 289 of file ecvGenericMesh.cpp.
References ccHObject::minimumFileVersion_MeOnly().
Referenced by ccMesh::minimumFileVersion_MeOnly(), ccMeshGroup::minimumFileVersion_MeOnly(), and ccSubMesh::minimumFileVersion_MeOnly().
|
inlineoverridevirtual |
Returns whether normals are available.
Reimplemented from cloudViewer::GenericIndexedMesh.
Reimplemented in ccMesh.
Definition at line 256 of file ecvGenericMesh.h.
References ccDrawableObject::hasNormals().
|
pure virtual |
Forces bounding-box update.
Implemented in ccSubMesh, ccMeshGroup, and ccMesh.
Referenced by define_ccGenericMesh().
| ccPointCloud * ccGenericMesh::samplePoints | ( | bool | densityBased, |
| double | samplingParameter, | ||
| bool | withNormals, | ||
| bool | withRGB, | ||
| bool | withTexture, | ||
| cloudViewer::GenericProgressCallback * | pDlg = nullptr |
||
| ) |
Samples points on a mesh.
Definition at line 328 of file ecvGenericMesh.cpp.
References ccPointCloud::addNorm(), ccPointCloud::addRGBColor(), ccShiftedObject::copyGlobalShiftAndScale(), ccPointCloud::From(), getColorFromMaterial(), ccHObject::getGLTransformationHistory(), ccObject::getName(), cloudViewer::PointCloudTpl< T >::getPoint(), ccDrawableObject::hasColors(), hasMaterials(), ccDrawableObject::hasNormals(), interpolateColors(), cloudViewer::GenericIndexedMesh::interpolateNormals(), ccPointCloud::reserveTheNormsTable(), ccPointCloud::reserveTheRGBTable(), cloudViewer::MeshSamplingTools::samplePointsOnMesh(), ccHObject::setGLTransformationHistory(), ccObject::setName(), ccDrawableObject::showColors(), ccDrawableObject::showNormals(), cloudViewer::PointCloudTpl< T >::size(), and CVLog::Warning().
|
overridevirtual |
Sets the scale applied to original coordinates (information storage only)
Reimplemented from ccShiftedObject.
Definition at line 698 of file ecvGenericMesh.cpp.
References getAssociatedCloud(), and ccShiftedObject::setGlobalScale().
|
overridevirtual |
Sets shift applied to original coordinates (information storage only)
Such a shift can typically be applied at loading time. Original coordinates are equal to '(P/scale - shift)'
Reimplemented from ccShiftedObject.
Definition at line 686 of file ecvGenericMesh.cpp.
References getAssociatedCloud(), and ccShiftedObject::setGlobalShift().
|
inlinevirtual |
Sets whether textures should be displayed or not.
Definition at line 201 of file ecvGenericMesh.h.
Referenced by ccMesh::cloneMesh(), DistanceMapGenerationTool::ConvertConicalMapToMesh(), DistanceMapGenerationTool::ConvertProfileToMesh(), ccEntityAction::convertTextureToColor(), ccMesh::createNewMeshFromSelection(), ccSubMesh::createNewSubMeshFromSelection(), ccCropTool::Crop(), FromFbxMesh(), CSVMatrixFilter::loadFile(), ObjFilter::loadFile(), DRCFilter::loadFile(), PlyFilter::loadFile(), ccMesh::merge(), ccMesh::partialClone(), ccPlane::SetQuadTexture(), ccMesh::toggleMaterials(), and GrainsAsEllipsoids::updateMeshAndLineSet().
|
overridevirtual |
Sets normals visibility.
Reimplemented from ccDrawableObject.
Definition at line 44 of file ecvGenericMesh.cpp.
References ccDrawableObject::showNormals(), and showTriNorms().
Referenced by ccDish::buildUp(), ccSphere::buildUp(), ccGenericPrimitive::ccGenericPrimitive(), ccMesh::ccMesh(), ccSubMesh::ccSubMesh(), ccEntityAction::clearProperty(), ccMesh::cloneMesh(), qFacets::createFacets(), ccMesh::createNewMeshFromSelection(), ccSubMesh::createNewSubMeshFromSelection(), ccCropTool::Crop(), qCork::doAction(), qCSF::doAction(), ccGenericPrimitive::finishCloneJob(), ccTraceTool::finishCurrentTrace(), FromFbxMesh(), STEPFilter::importStepFile(), ccEntityAction::invertNormals(), CSVMatrixFilter::loadFile(), ObjFilter::loadFile(), STLFilter::loadFile(), VTKFilter::loadFile(), DRCFilter::loadFile(), PlyFilter::loadFile(), ccMesh::merge(), ccMesh::partialClone(), CommandRemoveNormals::process(), ccMesh::subdivide(), ccMesh::Triangulate(), ccPointCloud::triangulateGrid(), and DistanceMapGenerationDlg::update().
|
inlinevirtual |
Sets whether mesh should be displayed as a point cloud or with plain facets
Definition at line 189 of file ecvGenericMesh.h.
Referenced by importParametersFrom(), and ccMesh::merge().
|
inlinevirtual |
Sets whether to show or not per-triangle normals.
Definition at line 195 of file ecvGenericMesh.h.
Referenced by ccCone::buildUp(), ccDisc::buildUp(), ccTorus::buildUp(), ObjFilter::loadFile(), VTKFilter::loadFile(), ccMesh::merge(), and showNormals().
|
inlinevirtual |
Sets whether mesh should be displayed as a wire or with plain facets.
Definition at line 182 of file ecvGenericMesh.h.
Referenced by ccSubMesh::createNewSubMeshFromSelection(), ccCameraSensor::drawMeOnly(), drawMeOnly(), ccMesh::drawMeOnly(), ccCompass::estimateStrain(), importParametersFrom(), and ccMesh::merge().
|
inlinevirtual |
Returns whether polygon stippling is enabled or not.
Definition at line 204 of file ecvGenericMesh.h.
Referenced by ccSubMesh::createNewSubMeshFromSelection(), importParametersFrom(), and ccMesh::merge().
|
overrideprotectedvirtual |
Save own object data.
Called by 'toFile' (recursive scheme) To be overloaded (but still called ;) by subclass.
| out | output file |
| dataVersion | target file version for compatibility control |
Reimplemented from ccHObject.
Reimplemented in ccTorus, ccSubMesh, ccSphere, ccQuadric, ccPlane, ccMeshGroup, ccMesh, and ccGenericPrimitive.
Definition at line 253 of file ecvGenericMesh.cpp.
|
virtual |
Brute force triangle picking.
Reimplemented in ccMeshGroup.
Definition at line 582 of file ecvGenericMesh.cpp.
References ccHObject::getAbsoluteGLTransformation(), getAssociatedCloud(), cloudViewer::GenericMesh::size(), ccGLCameraParameters::unproject(), Vector2Tpl< Type >::x, X, and Vector2Tpl< Type >::y.
Referenced by ccTracePolylineTool::polylineOverSampling(), ecvDisplayTools::StartCPUBasedPointPicking(), and trianglePicking().
|
virtual |
Triangle picking (single triangle)
Definition at line 632 of file ecvGenericMesh.cpp.
References ccHObject::getAbsoluteGLTransformation(), getAssociatedCloud(), cloudViewer::GenericMesh::size(), and trianglePicking().
|
protectedvirtual |
Triangle picking (single triangle)
Definition at line 495 of file ecvGenericMesh.cpp.
References cloudViewer::GenericIndexedMesh::getTriangleVertices(), cloudViewer::LessThanEpsilon(), ccGLCameraParameters::project(), cloudViewer::GenericMesh::size(), Vector2Tpl< Type >::x, Tuple3Tpl< Type >::x, Vector2Tpl< Type >::y, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
|
inlinevirtual |
Returns whether per-triangle normals are shown or not.
Definition at line 192 of file ecvGenericMesh.h.
Referenced by drawMeOnly(), ccMesh::drawMeOnly(), cc2smReader::getPclCloud2(), cc2smReader::getVtkPolyDataFromMeshCloud(), ObjFilter::loadFile(), ccMesh::merge(), ccMesh::normalsShown(), and ccSubMesh::normalsShown().
| bool ccGenericMesh::updateTextures | ( | const std::string & | texture_file | ) |
Definition at line 720 of file ecvGenericMesh.cpp.
| bool ccGenericMesh::updateTextures | ( | const std::vector< std::string > & | texture_files | ) |
Definition at line 725 of file ecvGenericMesh.cpp.
References ccHObject::addChild(), ecvColor::bright(), context, ecvColor::darker(), ccHObject::getChildIndex(), getMaterialSet(), ccMaterial::getTexture(), ccHObject::getViewId(), hasMaterials(), hasTextures(), ecvColor::light(), ccMaterial::loadAndSetTexture(), materialsShown(), CVLog::Print(), ecvDisplayTools::UpdateMeshTextures(), and CVLog::Warning().
|
protected |
Texture/material display flag.
Definition at line 304 of file ecvGenericMesh.h.
|
protected |
points display mode
Definition at line 310 of file ecvGenericMesh.h.
|
protected |
Wireframe display mode.
Definition at line 307 of file ecvGenericMesh.h.
|
protected |
Polygon stippling state.
Definition at line 313 of file ecvGenericMesh.h.
|
protected |
Per-triangle normals display flag.
Definition at line 301 of file ecvGenericMesh.h.