qCC_db version 2.13.alpha (Qt) - 31 May 2022
CloudCompare 3D entities
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
ccCone Class Reference

Cone (primitive) More...

#include <ccCone.h>

Inheritance diagram for ccCone:
Inheritance graph
[legend]
Collaboration diagram for ccCone:
Collaboration graph
[legend]

Public Member Functions

 ccCone (PointCoordinateType bottomRadius, PointCoordinateType topRadius, PointCoordinateType height, PointCoordinateType xOff=0, PointCoordinateType yOff=0, const ccGLMatrix *transMat=nullptr, QString name=QString("Cone"), unsigned precision=DEFAULT_DRAWING_PRECISION, unsigned uniqueID=ccUniqueIDGenerator::InvalidUniqueID)
 Default constructor. More...
 
 ccCone (QString name=QString("Cone"))
 Simplified constructor. More...
 
virtual CC_CLASS_ENUM getClassID () const override
 Returns class ID. More...
 
PointCoordinateType getHeight () const
 Returns height.
 
void setHeight (PointCoordinateType height)
 Sets height. More...
 
PointCoordinateType getBottomRadius () const
 Returns bottom radius.
 
virtual void setBottomRadius (PointCoordinateType radius)
 Sets bottom radius. More...
 
PointCoordinateType getTopRadius () const
 Returns top radius.
 
virtual void setTopRadius (PointCoordinateType radius)
 Sets top radius. More...
 
virtual CCVector3 getBottomCenter () const
 Returns cone axis bottom end point after applying transformation.
 
virtual CCVector3 getTopCenter () const
 Returns cone axis top end point after applying transformation.
 
virtual CCVector3 getSmallCenter () const
 Returns cone axis end point associated with whichever radii is smaller.
 
virtual CCVector3 getLargeCenter () const
 Returns cone axis end point associated with whichever radii is larger.
 
virtual PointCoordinateType getSmallRadius () const
 Returns whichever cone radii is smaller.
 
virtual PointCoordinateType getLargeRadius () const
 Returns whichever cone radii is larger.
 
virtual bool isSnoutMode () const
 Returns true if the Cone was created in snout mode.
 
virtual QString getTypeName () const override
 Returns type name (sphere, cylinder, etc.) More...
 
virtual bool hasDrawingPrecision () const override
 Whether drawing is dependent on 'precision' parameter. More...
 
virtual ccGenericPrimitiveclone () const override
 Clones primitive. More...
 
- Public Member Functions inherited from ccGenericPrimitive
 ccGenericPrimitive (QString name=QString(), const ccGLMatrix *transMat=nullptr, unsigned uniqueID=ccUniqueIDGenerator::InvalidUniqueID)
 Default constructor. More...
 
virtual QString getTypeName () const =0
 Returns type name (sphere, cylinder, etc.) More...
 
virtual ccGenericPrimitiveclone () const =0
 Clones primitive. More...
 
CC_CLASS_ENUM getClassID () const override
 Returns class ID. More...
 
virtual void setColor (const ccColor::Rgb &col)
 Sets primitive color (shortcut) More...
 
const ccGenericPrimitiveoperator+= (const ccGenericPrimitive &prim)
 Add operator. More...
 
virtual bool hasDrawingPrecision () const
 Whether drawing is dependent on 'precision' parameter. More...
 
virtual bool setDrawingPrecision (unsigned steps)
 Sets drawing precision. More...
 
virtual unsigned getDrawingPrecision () const
 Returns drawing precision (or 0 if feature is not supported)
 
virtual ccGLMatrixgetTransformation ()
 Returns the transformation that is currently applied to the vertices.
 
virtual const ccGLMatrixgetTransformation () const
 Returns the transformation that is currently applied to the vertices (const version)
 
const ccGLMatrixgetGLTransformationHistory () const override
 Returns the transformation 'history' matrix. More...
 
- Public Member Functions inherited from ccMesh
 ccMesh (ccGenericPointCloud *vertices, unsigned uniqueID=ccUniqueIDGenerator::InvalidUniqueID)
 Default ccMesh constructor. More...
 
 ccMesh (CCCoreLib::GenericIndexedMesh *giMesh, ccGenericPointCloud *giVertices)
 ccMesh constructor (from a CCCoreLib::GenericIndexedMesh) More...
 
 ~ccMesh () override
 Default destructor.
 
CC_CLASS_ENUM getClassID () const override
 Returns class ID. More...
 
void setAssociatedCloud (ccGenericPointCloud *cloud)
 Sets the associated vertices cloud (warning)
 
ccMeshcloneMesh (ccGenericPointCloud *vertices=nullptr, ccMaterialSet *clonedMaterials=nullptr, NormsIndexesTableType *clonedNormsTable=nullptr, TextureCoordsContainer *cloneTexCoords=nullptr)
 Clones this entity. More...
 
bool merge (const ccMesh *mesh, bool createSubMesh)
 Merges another mesh into this one. More...
 
unsigned getUniqueIDForDisplay () const override
 Returns object unique ID used for display. More...
 
ccBBox getOwnBB (bool withGLFeatures=false) override
 Returns the entity's own bounding-box (with local/shifted coordinates) More...
 
bool isSerializable () const override
 Returns whether object is serializable of not. More...
 
const ccGLMatrixgetGLTransformationHistory () const override
 Returns the transformation 'history' matrix. More...
 
ccGenericPointCloudgetAssociatedCloud () const override
 Returns the vertices cloud. More...
 
void refreshBB () override
 Forces bounding-box update. More...
 
bool interpolateNormalsBC (unsigned triIndex, const CCVector3d &w, CCVector3 &N) override
 Interpolates normal(s) inside a given triangle. More...
 
bool interpolateColors (unsigned triIndex, const CCVector3 &P, ccColor::Rgb &C) override
 Interpolates RGB colors inside a given triangle. More...
 
bool interpolateColorsBC (unsigned triIndex, const CCVector3d &w, ccColor::Rgb &C) override
 Interpolates RGB colors inside a given triangle. More...
 
bool interpolateColors (unsigned triIndex, const CCVector3 &P, ccColor::Rgba &C) override
 Interpolates RGBA colors inside a given triangle. More...
 
bool interpolateColorsBC (unsigned triIndex, const CCVector3d &w, ccColor::Rgba &C) override
 Interpolates RGBA colors inside a given triangle. More...
 
void computeInterpolationWeights (unsigned triIndex, const CCVector3 &P, CCVector3d &weights) const override
 Returns the (barycentric) interpolation weights for a given triangle. More...
 
bool getColorFromMaterial (unsigned triIndex, const CCVector3 &P, ccColor::Rgba &C, bool interpolateColorIfNoTexture) override
 Returns RGB color fom a given triangle material/texture. More...
 
bool getVertexColorFromMaterial (unsigned triIndex, unsigned char vertIndex, ccColor::Rgba &color, bool returnColorIfNoTexture) override
 Returns RGB color of a vertex fom a given triangle material/texture. More...
 
unsigned capacity () const override
 Returns max capacity. More...
 
void forEach (genericTriangleAction action) override
 
void placeIteratorAtBeginning () override
 
CCCoreLib::GenericTriangle * _getNextTriangle () override
 
CCCoreLib::GenericTriangle * _getTriangle (unsigned triangleIndex) override
 
CCCoreLib::VerticesIndexes * getNextTriangleVertIndexes () override
 
CCCoreLib::VerticesIndexes * getTriangleVertIndexes (unsigned triangleIndex) override
 
void getTriangleVertices (unsigned triangleIndex, CCVector3 &A, CCVector3 &B, CCVector3 &C) const override
 
unsigned size () const override
 
void getBoundingBox (CCVector3 &bbMin, CCVector3 &bbMax) override
 
bool normalsAvailable () const override
 
bool interpolateNormals (unsigned triIndex, const CCVector3 &P, CCVector3 &N) override
 
virtual const CCCoreLib::VerticesIndexes * getTriangleVertIndexes (unsigned triangleIndex) const
 
bool hasColors () const override
 Returns whether colors are enabled or not. More...
 
bool hasNormals () const override
 Returns whether normals are enabled or not. More...
 
bool hasScalarFields () const override
 Returns whether one or more scalar fields are instantiated. More...
 
bool hasDisplayedScalarField () const override
 Returns whether an active scalar field is available or not. More...
 
bool normalsShown () const override
 Returns whether normals are shown or not. More...
 
void toggleMaterials () override
 Toggles material display state. More...
 
void invertNormals ()
 Inverts normals (if any) More...
 
void shiftTriangleIndexes (unsigned shift)
 Shifts all triangles indexes. More...
 
void flipTriangles ()
 Flips the triangle. More...
 
void addTriangle (unsigned i1, unsigned i2, unsigned i3)
 Adds a triangle to the mesh. More...
 
bool reserve (size_t n)
 Reserves the memory to store the vertex indexes (3 per triangle) More...
 
bool resize (size_t n)
 Resizes the array of vertex indexes (3 per triangle) More...
 
void shrinkToFit ()
 Removes unused capacity.
 
bool hasTriNormals () const override
 Returns whether the mesh has per-triangle normals. More...
 
void getTriangleNormalIndexes (unsigned triangleIndex, int &i1, int &i2, int &i3) const override
 Returns a triplet of normal indexes for a given triangle (if any) More...
 
bool getTriangleNormals (unsigned triangleIndex, CCVector3 &Na, CCVector3 &Nb, CCVector3 &Nc) const override
 Returns a given triangle normal. More...
 
NormsIndexesTableTypegetTriNormsTable () const override
 Returns per-triangle normals shared array. More...
 
void setTriNormsTable (NormsIndexesTableType *triNormsTable, bool autoReleaseOldTable=true)
 Sets per-triangle normals array (may be shared)
 
void clearTriNormals ()
 Removes per-triangle normals.
 
bool arePerTriangleNormalsEnabled () const
 Returns whether per triangle normals are enabled. More...
 
bool reservePerTriangleNormalIndexes ()
 Reserves memory to store per-triangle triplets of normal indexes. More...
 
void addTriangleNormalIndexes (int i1, int i2, int i3)
 Adds a triplet of normal indexes for next triangle. More...
 
void setTriangleNormalIndexes (unsigned triangleIndex, int i1, int i2, int i3)
 Sets a triplet of normal indexes for a given triangle. More...
 
void removePerTriangleNormalIndexes ()
 Removes any per-triangle triplets of normal indexes.
 
void invertPerTriangleNormals ()
 Invert per-triangle normals.
 
bool hasMaterials () const override
 Returns whether the mesh has materials/textures. More...
 
const ccMaterialSetgetMaterialSet () const override
 Returns associated material set. More...
 
int getTriangleMtlIndex (unsigned triangleIndex) const override
 Returns a given triangle material indexes. More...
 
bool convertMaterialsToVertexColors ()
 Converts materials to vertex colors. More...
 
bool hasPerTriangleMtlIndexes () const
 Returns whether this mesh as per-triangle material index.
 
bool reservePerTriangleMtlIndexes ()
 Reserves memory to store per-triangle material index. More...
 
void removePerTriangleMtlIndexes ()
 Removes any per-triangle material indexes.
 
void addTriangleMtlIndex (int mtlIndex)
 Adds triangle material index for next triangle. More...
 
void setTriangleMtlIndexesTable (triangleMaterialIndexesSet *matIndexesTable, bool autoReleaseOldTable=true)
 Sets per-triangle material indexes array.
 
const triangleMaterialIndexesSetgetTriangleMtlIndexesTable () const
 Returns the per-triangle material indexes array.
 
void setTriangleMtlIndex (unsigned triangleIndex, int mtlIndex)
 Sets triangle material indexes. More...
 
void setMaterialSet (ccMaterialSet *materialSet, bool autoReleaseOldMaterialSet=true)
 Sets associated material set (may be shared)
 
bool hasTextures () const override
 Returns whether textures are available for this mesh. More...
 
TextureCoordsContainergetTexCoordinatesTable () const override
 Returns per-triangle texture coordinates array. More...
 
void getTriangleTexCoordinates (unsigned triIndex, TexCoords2D *&tx1, TexCoords2D *&tx2, TexCoords2D *&tx3) const override
 Returns per-triangle texture coordinates (pointer to) More...
 
bool hasPerTriangleTexCoordIndexes () const override
 Returns whether this mesh as per-triangle triplets of tex coords indexes. More...
 
void getTriangleTexCoordinatesIndexes (unsigned triangleIndex, int &i1, int &i2, int &i3) const override
 Returns the triplet of tex coords indexes for a given triangle. More...
 
void setTexCoordinatesTable (TextureCoordsContainer *texCoordsTable, bool autoReleaseOldTable=true)
 Sets per-triangle texture coordinates array (may be shared)
 
bool reservePerTriangleTexCoordIndexes ()
 Reserves memory to store per-triangle triplets of tex coords indexes. More...
 
void removePerTriangleTexCoordIndexes ()
 Remove per-triangle tex coords indexes.
 
void addTriangleTexCoordIndexes (int i1, int i2, int i3)
 Adds a triplet of tex coords indexes for next triangle. More...
 
void setTriangleTexCoordIndexes (unsigned triangleIndex, int i1, int i2, int i3)
 Sets a triplet of tex coords indexes for a given triangle. More...
 
bool computeNormals (bool perVertex)
 Computes normals. More...
 
bool computePerVertexNormals ()
 Computes per-vertex normals. More...
 
bool computePerTriangleNormals ()
 Computes per-triangle normals.
 
bool laplacianSmooth (unsigned nbIteration=100, PointCoordinateType factor=static_cast< PointCoordinateType >(0.01), ccProgressDialog *progressCb=nullptr)
 Laplacian smoothing. More...
 
bool processScalarField (MESH_SCALAR_FIELD_PROCESS process)
 Applies process to the mesh scalar field (the one associated to its vertices in fact) More...
 
ccMeshsubdivide (PointCoordinateType maxArea) const
 Subdivides mesh (so as to ensure that all triangles are falls below 'maxArea') More...
 
ccMeshcreateNewMeshFromSelection (bool removeSelectedFaces)
 Creates a new mesh with the selected vertices only. More...
 
void swapTriangles (unsigned index1, unsigned index2)
 Swaps two triangles. More...
 
void transformTriNormals (const ccGLMatrix &trans)
 Transforms the mesh per-triangle normals.
 
bool mergeDuplicatedVertices (unsigned char octreeLevel=DefaultMergeDuplicateVerticesLevel, QWidget *parentWidget=nullptr)
 Merges duplicated vertices.
 
- Public Member Functions inherited from ccGenericMesh
 ccGenericMesh (QString name=QString(), unsigned uniqueID=ccUniqueIDGenerator::InvalidUniqueID)
 Default constructor. More...
 
 ~ccGenericMesh () override=default
 Destructor.
 
void showNormals (bool state) override
 Sets normals visibility. More...
 
bool isSerializable () const override
 Returns whether object is serializable of not. More...
 
virtual ccGenericPointCloudgetAssociatedCloud () 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
 Returns whether the mesh has materials/textures. More...
 
virtual const ccMaterialSetgetMaterialSet () const =0
 Returns associated material set. More...
 
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 TextureCoordsContainergetTexCoordinatesTable () 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 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 NormsIndexesTableTypegetTriNormsTable () 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, ccColor::Rgb &color)=0
 Interpolates RGB colors inside a given triangle. More...
 
virtual bool interpolateColorsBC (unsigned triIndex, const CCVector3d &w, ccColor::Rgb &color)=0
 Interpolates RGB colors inside a given triangle. More...
 
virtual bool interpolateColors (unsigned triIndex, const CCVector3 &P, ccColor::Rgba &color)=0
 Interpolates RGBA colors inside a given triangle. More...
 
virtual bool interpolateColorsBC (unsigned triIndex, const CCVector3d &w, ccColor::Rgba &color)=0
 Interpolates RGBA colors inside a given triangle. More...
 
virtual bool getColorFromMaterial (unsigned triIndex, const CCVector3 &P, ccColor::Rgba &color, bool interpolateColorIfNoTexture)=0
 Returns RGB color fom a given triangle material/texture. More...
 
virtual bool getVertexColorFromMaterial (unsigned triIndex, unsigned char vertIndex, ccColor::Rgba &color, bool returnColorIfNoTexture)=0
 Returns RGB color of a vertex fom a given triangle material/texture. More...
 
virtual bool isShownAsWire () const
 Returns whether the mesh is displayed as wired or with plain facets.
 
virtual void showWired (bool state)
 Sets whether mesh should be displayed as a wire or with plain facets.
 
virtual bool triNormsShown () const
 Returns whether per-triangle normals are shown or not.
 
virtual void showTriNorms (bool state)
 Sets whether to show or not per-triangle normals.
 
virtual bool materialsShown () const
 Sets whether textures/material should be displayed or not.
 
virtual void showMaterials (bool state)
 Sets whether textures should be displayed or not.
 
virtual bool stipplingEnabled () const
 Returns whether polygon stippling is enabled or not.
 
void enableStippling (bool state)
 Enables polygon stippling.
 
ccPointCloudsamplePoints (bool densityBased, double samplingParameter, bool withNormals, bool withRGB, bool withTexture, CCCoreLib::GenericProgressCallback *pDlg=nullptr)
 Samples points on a mesh.
 
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)
 
bool computePointPosition (unsigned triIndex, const CCVector2d &uv, CCVector3 &P, bool warningIfOutside=true) const
 Computes the point that corresponds to the given uv (barycentric) coordinates.
 
void setGlobalShift (const CCVector3d &shift) override
 Sets shift applied to original coordinates (information storage only) More...
 
void setGlobalScale (double scale) override
 Sets the scale applied to original coordinates (information storage only) More...
 
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
 
- Public Member Functions inherited from ccShiftedObject
 ccShiftedObject (QString name=QString(), unsigned uniqueID=ccUniqueIDGenerator::InvalidUniqueID)
 Default constructor. More...
 
 ccShiftedObject (const ccShiftedObject &s)=default
 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...
 
virtual void setGlobalShift (const CCVector3d &shift)
 Sets shift applied to original coordinates (information storage only) More...
 
virtual const CCVector3d & getGlobalShift () const
 Returns the shift applied to original coordinates. More...
 
virtual void setGlobalScale (double scale)
 Sets the scale applied to original coordinates (information storage only) More...
 
virtual double getGlobalScale () const
 Returns the scale applied to original coordinates. More...
 
bool isShifted () const
 Returns whether the cloud is shifted or not.
 
template<typename T >
CCVector3d toGlobal3d (const Vector3Tpl< T > &Plocal) const
 Returns the point back-projected into the original coordinates system.
 
template<typename T >
CCVector3d toLocal3d (const Vector3Tpl< T > &Pglobal) const
 Returns the point projected into the local (shifted) coordinates system.
 
template<typename T >
CCVector3 toLocal3pc (const Vector3Tpl< T > &Pglobal) const
 Returns the point projected into the local (shifted) coordinates system.
 
bool getOwnGlobalBB (CCVector3d &minCorner, CCVector3d &maxCorner) override
 Returns the entity's own global bounding-box (with global/non-shifted coordinates - if relevant) More...
 
GlobalBoundingBox getOwnGlobalBB (bool withGLFeatures=false) override
 Returns the entity's own global bounding-box (with global/non-shifted coordinates - if relevant) More...
 
- Public Member Functions inherited from ccHObject
 ccHObject (const QString &name=QString(), unsigned uniqueID=ccUniqueIDGenerator::InvalidUniqueID)
 Default constructor. More...
 
 ccHObject (const ccHObject &object)
 Copy constructor.
 
 ~ccHObject () override
 Default destructor.
 
CC_CLASS_ENUM getClassID () const override
 Returns class ID. More...
 
bool isGroup () const
 Returns whether the instance is a group.
 
ccHObjectgetParent () 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) const
 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...
 
ccHObjectgetChild (unsigned childPos) const
 Returns the ith child. More...
 
ccHObjectfind (unsigned uniqueID) const
 Finds an entity in this object hierarchy. More...
 
unsigned filterChildren (Container &filteredChildren, bool recursive=false, CC_CLASS_ENUM filter=CC_TYPES::OBJECT, bool strict=false, ccGenericGLDisplay *inDisplay=nullptr) 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 removeChild (ccHObject *child)
 
void removeChild (int pos)
 Removes a specific child given its index. More...
 
void removeAllChildren ()
 Removes all children.
 
int getChildIndex (const ccHObject *aChild) const
 Returns child index.
 
void swapChildren (unsigned firstChildIndex, unsigned secondChildIndex)
 Swaps two children.
 
int getIndex () const
 Returns index relatively to its parent or -1 if no parent.
 
void transferChild (ccHObject *child, ccHObject &newParent)
 Transfer a given child to another parent.
 
void transferChildren (ccHObject &newParent, bool forceFatherDependent=false)
 Transfer all children to another parent.
 
ccHObjectgetFirstChild () const
 Shortcut: returns first child.
 
ccHObjectgetLastChild () const
 Shortcut: returns last child.
 
bool isAncestorOf (const ccHObject *anObject) const
 Returns true if the current object is an ancestor of the specified one.
 
virtual ccBBox getOwnBB (bool withGLFeatures=false)
 Returns the entity's own bounding-box (with local/shifted coordinates) More...
 
virtual ccBBox getBB_recursive (bool withGLFeatures=false, bool onlyEnabledChildren=true)
 Returns the local bounding-box of this entity and it's children. More...
 
virtual GlobalBoundingBox getOwnGlobalBB (bool withGLFeatures=false)
 Returns the entity's own global bounding-box (with global/non-shifted coordinates - if relevant) More...
 
virtual bool getOwnGlobalBB (CCVector3d &minCorner, CCVector3d &maxCorner)
 Returns the entity's own global bounding-box (with global/non-shifted coordinates - if relevant) 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, const ccGenericGLDisplay *display=nullptr)
 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 ccColor::Rgb &col)
 Draws the entity (and its children) bounding-box. More...
 
void draw (CC_DRAW_CONTEXT &context) override
 Draws entity and its children. More...
 
bool getAbsoluteGLTransformation (ccGLMatrix &trans) const
 Returns the absolute transformation (i.e. the actual displayed GL transformation) of an entity. More...
 
virtual bool isDisplayed () const
 Returns whether the object is actually displayed (visible) or not.
 
virtual bool isDisplayedIn (const ccGenericGLDisplay *display) const
 Returns whether the object is actually displayed (visible) in a given display or not.
 
virtual bool isBranchEnabled () const
 Returns whether the object and all its ancestors are enabled.
 
 ccHObject_recursive_call1 (setSelected, bool, setSelected_recursive) ccHObject_recursive_call1(setDisplay
 
ccGenericGLDisplay setDisplay_recursive ccHObject_recursive_call1 (removeFromDisplay, ccGenericGLDisplay *, removeFromDisplay_recursive) ccHObject_recursive_call0(prepareDisplayForRefresh
 
ccGenericGLDisplay setDisplay_recursive prepareDisplayForRefresh_recursive ccHObject_recursive_call1 (refreshDisplay, bool, refreshDisplay_recursive) ccHObject_recursive_call0(resetGLTransformationHistory
 
ccGenericGLDisplay setDisplay_recursive prepareDisplayForRefresh_recursive resetGLTransformationHistory_recursive ccHObject_recursive_call0 (toggleActivation, toggleActivation_recursive) ccHObject_recursive_call0(toggleVisibility
 
ccGenericGLDisplay setDisplay_recursive prepareDisplayForRefresh_recursive resetGLTransformationHistory_recursive toggleVisibility_recursive ccHObject_recursive_call0 (toggleColors, toggleColors_recursive) ccHObject_recursive_call0(toggleNormals
 
ccGenericGLDisplay setDisplay_recursive prepareDisplayForRefresh_recursive resetGLTransformationHistory_recursive toggleVisibility_recursive toggleNormals_recursive ccHObject_recursive_call0 (toggleSF, toggleSF_recursive) ccHObject_recursive_call0(toggleShowName
 
ccGenericGLDisplay setDisplay_recursive prepareDisplayForRefresh_recursive resetGLTransformationHistory_recursive toggleVisibility_recursive toggleNormals_recursive toggleShowName_recursive ccHObject_recursive_call0 (toggleMaterials, toggleMaterials_recursive) inline virtual void transferDisplay(ccGenericGLDisplay *oldDisplay
 Transfers the entity from one display to the other.
 
void applyGLTransformation_recursive (const ccGLMatrix *trans=nullptr)
 Applies the active OpenGL transformation to the entity (recursive) More...
 
virtual void notifyGeometryUpdate ()
 Notifies all dependent entities that the geometry of this entity has changed.
 
bool isSerializable () const override
 Returns whether object is serializable of not. More...
 
bool toFile (QFile &out) 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...
 
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.
 
virtual unsigned getUniqueIDForDisplay () const
 Returns object unique ID used for display. More...
 
virtual const ccGLMatrixgetGLTransformationHistory () const
 Returns the transformation 'history' matrix. More...
 
virtual void setGLTransformationHistory (const ccGLMatrix &mat)
 Sets the transformation 'history' matrix (handle with care!)
 
virtual void resetGLTransformationHistory ()
 Resets the transformation 'history' matrix.
 
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 (const QString &name=QString(), unsigned uniqueID=ccUniqueIDGenerator::InvalidUniqueID)
 Default constructor. More...
 
 ccObject (const ccObject &object)
 Copy constructor.
 
virtual CC_CLASS_ENUM getClassID () const =0
 Returns class ID. More...
 
virtual QString getName () const
 Returns object name. More...
 
virtual void setName (const QString &name)
 Sets object name.
 
virtual unsigned getUniqueID () const
 Returns object unique ID.
 
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.
 
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 (CC_CLASS_ENUM type) const
 
bool isA (CC_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)
 
- Public Member Functions inherited from ccSerializableObject
virtual ~ccSerializableObject ()=default
 Destructor.
 
virtual bool isSerializable () const
 Returns whether object is serializable of not. More...
 
virtual bool toFile (QFile &out) const
 Saves data to binary stream. More...
 
virtual bool fromFile (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap)
 Loads data from binary stream. More...
 
- Public Member Functions inherited from ccDrawableObject
 ccDrawableObject ()
 Default constructor.
 
 ccDrawableObject (const ccDrawableObject &object)
 Copy constructor.
 
virtual void draw (CC_DRAW_CONTEXT &context)=0
 Draws entity and its children. More...
 
virtual bool isVisible () const
 Returns whether entity is visible or not.
 
virtual void setVisible (bool state)
 Sets entity visibility.
 
virtual void toggleVisibility ()
 Toggles visibility.
 
virtual bool isVisibilityLocked () const
 Returns whether visibility is locked or not.
 
virtual void lockVisibility (bool state)
 Locks/unlocks visibility. More...
 
virtual bool isSelected () const
 Returns whether entity is selected or not.
 
virtual void setSelected (bool state)
 Selects/unselects entity.
 
virtual void getDrawingParameters (glDrawParams &params) 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.
 
virtual void showColors (bool state)
 Sets colors visibility.
 
virtual void toggleColors ()
 Toggles colors display state.
 
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 showNormals (bool state)
 Sets normals visibility. More...
 
virtual void toggleNormals ()
 Toggles normals display state.
 
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.
 
virtual void toggleSF ()
 Toggles SF display state.
 
virtual bool sfShown () const
 Returns whether active scalar field is visible.
 
virtual void toggleMaterials ()
 Toggles material display state. More...
 
virtual void showNameIn3D (bool state)
 Sets whether name should be displayed in 3D or not.
 
virtual bool nameShownIn3D () const
 Returns whether name is displayed in 3D or not.
 
virtual void toggleShowName ()
 Toggles name in 3D display state.
 
virtual bool isColorOverridden () const
 Returns whether colors are currently overridden by a temporary (unique) color. More...
 
virtual const ccColor::RgbagetTempColor () const
 Returns current temporary (unique) color.
 
virtual void setTempColor (const ccColor::Rgba &col, bool autoActivate=true)
 Sets current temporary (unique) More...
 
virtual void setTempColor (const ccColor::Rgb &col, bool autoActivate=true)
 Sets current temporary (unique) More...
 
virtual void enableTempColor (bool state)
 Set temporary color activation state.
 
virtual void removeFromDisplay (const ccGenericGLDisplay *win)
 Unlinks entity from a GL display (only if it belongs to it of course)
 
virtual void setDisplay (ccGenericGLDisplay *win)
 Sets associated GL display.
 
virtual ccGenericGLDisplaygetDisplay () const
 Returns associated GL display.
 
virtual void redrawDisplay ()
 Redraws associated GL display.
 
virtual void prepareDisplayForRefresh ()
 Sets associated GL display 'refreshable' before global refresh. More...
 
virtual void refreshDisplay (bool only2D=false)
 Refreshes associated GL display. 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.
 
virtual const ccGLMatrixgetGLTransformation () 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)
 
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 bool pushDisplayState ()
 Pushes the current display state. More...
 
virtual void popDisplayState (bool apply=true)
 Pops the last pushed display state. More...
 
virtual void applyDisplayState (const DisplayState &state)
 Applies a display state.
 

Static Public Attributes

static const unsigned DEFAULT_DRAWING_PRECISION = 24
 Default drawing precision. More...
 
- Static Public Attributes inherited from ccGenericPrimitive
static const int MIN_DRAWING_PRECISION = 4
 Minimum drawing precision. More...
 
- Static Public Attributes inherited from ccMesh
static const unsigned char DefaultMergeDuplicateVerticesLevel = 10
 Default octree level for the 'mergeDuplicatedVertices' algorithm.
 

Protected Member Functions

virtual bool toFile_MeOnly (QFile &out) const override
 Save own object data. More...
 
virtual bool fromFile_MeOnly (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
 Loads own object data. More...
 
virtual bool buildUp () override
 Builds primitive. More...
 
- Protected Member Functions inherited from ccGenericPrimitive
void applyGLTransformation (const ccGLMatrix &trans) override
 Inherited from ccGenericMesh. More...
 
bool toFile_MeOnly (QFile &out) const override
 Save own object data. More...
 
bool fromFile_MeOnly (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
 Loads own object data. More...
 
virtual bool buildUp ()=0
 Builds primitive. More...
 
virtual bool updateRepresentation ()
 Updates internal representation (as a mesh) More...
 
bool init (unsigned vertCount, bool vertNormals, unsigned faceCount, unsigned faceNormCount)
 Inits internal structures. More...
 
void applyTransformationToVertices ()
 Applies associated transformation to vertices. More...
 
ccGenericPrimitivefinishCloneJob (ccGenericPrimitive *primitive) const
 Finished 'clone' job (vertices color, etc.) More...
 
ccPointCloudvertices ()
 Returns vertices.
 
- Protected Member Functions inherited from ccMesh
void drawMeOnly (CC_DRAW_CONTEXT &context) override
 Draws the entity only (not its children) More...
 
bool toFile_MeOnly (QFile &out) const override
 Save own object data. More...
 
bool fromFile_MeOnly (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
 Loads own object data. More...
 
void applyGLTransformation (const ccGLMatrix &trans) override
 Applies a GL transformation to the entity. More...
 
void onUpdateOf (ccHObject *obj) override
 This method is called when another object (geometry) is updated. More...
 
void onDeletionOf (const ccHObject *obj) override
 This method is called when another object is deleted. More...
 
void computeInterpolationWeights (const CCCoreLib::VerticesIndexes &vertIndexes, const CCVector3 &P, CCVector3d &weights) const
 Same as other 'computeInterpolationWeights' method with a set of 3 vertices indexes.
 
bool interpolateNormals (const CCCoreLib::VerticesIndexes &vertIndexes, const CCVector3d &w, CCVector3 &N, const Tuple3i *triNormIndexes=nullptr)
 Same as other 'interpolateNormals' method with a set of 3 vertices indexes.
 
bool interpolateColors (const CCCoreLib::VerticesIndexes &vertIndexes, const CCVector3d &w, ccColor::Rgb &C)
 Same as other 'interpolateColors' method with a set of 3 vertices indexes.
 
bool interpolateColors (const CCCoreLib::VerticesIndexes &vertIndexes, const CCVector3d &w, ccColor::Rgba &C)
 Same as other 'interpolateColors' method with a set of 3 vertices indexes.
 
bool pushSubdivide (unsigned indexA, unsigned indexB, unsigned indexC)
 Used internally by 'subdivide'.
 
- Protected Member Functions inherited from ccGenericMesh
bool toFile_MeOnly (QFile &out) const override
 Save own object data. More...
 
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, QPainter *painter=nullptr) const
 Triangle picking (single triangle)
 
void drawMeOnly (CC_DRAW_CONTEXT &context) override
 Draws the entity only (not its children) More...
 
void handleColorRamp (CC_DRAW_CONTEXT &context)
 Handles the color ramp display.
 
- Protected Member Functions inherited from ccShiftedObject
bool saveShiftInfoToFile (QFile &out) const
 Serialization helper (output)
 
bool loadShiftInfoFromFile (QFile &in)
 Serialization helper (input)
 
- Protected Member Functions inherited from ccHObject
virtual void setParent (ccHObject *anObject)
 Sets parent object.
 
virtual void drawMeOnly (CC_DRAW_CONTEXT &context)
 Draws the entity only (not its children) More...
 
virtual void applyGLTransformation (const ccGLMatrix &trans)
 Applies a GL transformation to the entity. More...
 
virtual bool toFile_MeOnly (QFile &out) const
 Save own object data. More...
 
virtual bool fromFile_MeOnly (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap)
 Loads own object data. More...
 
virtual void drawNameIn3D (CC_DRAW_CONTEXT &context)
 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 (CC_OBJECT_FLAG flag) const
 Returns flag state.
 
virtual void setFlagState (CC_OBJECT_FLAG flag, bool state)
 Sets flag state. More...
 
bool toFile (QFile &out) const override
 Saves data to binary stream. More...
 
bool fromFile (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
 Reimplemented from ccSerializableObject::fromFile. More...
 

Protected Attributes

PointCoordinateType m_bottomRadius
 Bottom radius.
 
PointCoordinateType m_topRadius
 Top radius.
 
PointCoordinateType m_xOff
 Displacement of axes along X-axis (Snout mode)
 
PointCoordinateType m_yOff
 Displacement of axes along Y-axis (Snout mode)
 
PointCoordinateType m_height
 Height.
 
- Protected Attributes inherited from ccGenericPrimitive
ccGLMatrix m_transformation
 Associated transformation (applied to vertices) More...
 
unsigned m_drawPrecision
 Drawing precision (for primitives that support this feature)
 
- Protected Attributes inherited from ccMesh
ccMesh_extended_call1(showNormals, bool, showNormals_extended) protected NormsIndexesTableTypem_triNormals
 Per-triangle normals.
 
TextureCoordsContainerm_texCoords
 Texture coordinates.
 
ccMaterialSetm_materials
 Materials.
 
triangleIndexesContainerm_triVertIndexes
 Triangles' vertices indexes (3 per triangle)
 
unsigned m_globalIterator
 Iterator on the list of triangles.
 
CCCoreLib::SimpleRefTriangle m_currentTriangle
 Dump triangle structure to transmit temporary data.
 
ccBBox m_bBox
 Bounding-box.
 
triangleMaterialIndexesSetm_triMtlIndexes
 Per-triangle material indexes.
 
triangleTexCoordIndexesSetm_texCoordIndexes
 Mesh tex coords indexes (per-triangle)
 
triangleNormalsIndexesSetm_triNormalIndexes
 Mesh normals indexes (per-triangle)
 
- Protected Attributes inherited from ccGenericMesh
bool m_triNormsShown
 Per-triangle normals display flag.
 
bool m_materialsShown
 Texture/material display flag.
 
bool m_showWired
 Wireframe display mode.
 
bool m_stippling
 Polygon stippling state.
 
- Protected Attributes inherited from ccShiftedObject
CCVector3d m_globalShift
 Global shift (typically applied at loading time)
 
double m_globalScale
 Global scale (typically applied at loading time)
 
- Protected Attributes inherited from ccHObject
ccHObjectm_parent
 Parent.
 
Container m_children
 Children.
 
SelectionBehavior m_selectionBehavior
 Selection behavior.
 
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.
 
- Protected Attributes inherited from ccObject
QString m_name
 Object name.
 
unsigned m_flags
 Object flags.
 
QVariantMap m_metaData
 Associated meta-data.
 
- Protected Attributes inherited from ccDrawableObject
bool m_visible
 Specifies whether the object is visible or not. More...
 
bool m_selected
 Specifies whether the object is selected or not.
 
bool m_lockedVisibility
 Specifies whether the visibility can be changed by user or not.
 
bool m_colorsDisplayed
 Specifies whether colors should be displayed.
 
bool m_normalsDisplayed
 Specifies whether normals should be displayed.
 
bool m_sfDisplayed
 Specifies whether scalar field should be displayed.
 
ccColor::Rgba m_tempColor
 Temporary (unique) color.
 
bool m_colorIsOverridden
 Temporary (unique) color activation state.
 
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.
 
CCVector3d m_nameIn3DPos
 Last 2D position of the '3D' name.
 
bool m_nameIn3DPosIsValid
 Whether the last 2D position of the '3D' name is valid or not.
 
ccGenericGLDisplaym_currentDisplay
 Currently associated GL display.
 
ccClipPlaneSet m_clipPlanes
 Active clipping planes (used for display only)
 
std::vector< DisplayState::Shared > m_displayStateStack
 The stack of pushed display states.
 

Additional Inherited Members

- Public Types inherited from ccMesh
enum  MESH_SCALAR_FIELD_PROCESS { SMOOTH_MESH_SF , ENHANCE_MESH_SF }
 Mesh scalar field processes. More...
 
using triangleMaterialIndexesSet = ccArray< int, 1, int >
 Container of per-triangle material descriptors.
 
- Public Types inherited from ccHObject
enum  DEPENDENCY_FLAGS {
  DP_NONE = 0 , DP_NOTIFY_OTHER_ON_DELETE = 1 , DP_NOTIFY_OTHER_ON_UPDATE = 2 , 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.
 
using Container = std::vector< ccHObject * >
 Standard instances container (for children, etc.)
 
using Shared = QSharedPointer< ccHObject >
 Shared pointer.
 
using SharedContainer = std::vector< Shared >
 Shared instances container (for children, etc.)
 
using GlobalBoundingBox = CCCoreLib::BoundingBoxTpl< double >
 Global (non-shifted) bounding-box.
 
- Public Types inherited from ccSerializableObject
enum  DeserializationFlags { DF_POINT_COORDS_64_BITS = 1 , 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)
 
- Static Public Member Functions inherited from ccMesh
static ccMeshTriangulate (ccGenericPointCloud *cloud, CCCoreLib::TRIANGULATION_TYPES type, bool updateNormals=false, PointCoordinateType maxEdgeLength=0, unsigned char dim=2)
 Creates a Delaunay 2.5D mesh from a point cloud. More...
 
static ccMeshTriangulateTwoPolylines (ccPolyline *p1, ccPolyline *p2, CCVector3 *projectionDir=nullptr)
 Creates a Delaunay 2.5D mesh from two polylines.
 
- Static Public Member Functions inherited from ccGenericMesh
static bool IsCloudVerticesOfMesh (ccGenericPointCloud *cloud, ccGenericMesh **mesh=nullptr)
 Helper to determine if the input cloud acts as vertices of a mesh.
 
- Static Public Member Functions inherited from ccHObject
static ccHObjectNew (CC_CLASS_ENUM objectType, const char *name=nullptr)
 Static factory. More...
 
static ccHObjectNew (const QString &pluginId, const QString &classId, const char *name=nullptr)
 Static factory (version to be used by external plugin factories) More...
 
- Static Public Member Functions inherited from ccObject
static unsigned GetCurrentDBVersion ()
 Returns current database version.
 
static void SetUniqueIDGenerator (ccUniqueIDGenerator::Shared generator)
 Sets the unique ID generator.
 
static ccUniqueIDGenerator::Shared GetUniqueIDGenerator ()
 Returns the unique ID generator.
 
static unsigned GetNextUniqueID ()
 Returns a new unassigned unique ID. More...
 
static unsigned GetLastUniqueID ()
 Returns last assigned unique ID. More...
 
static CC_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...
 
- Public Attributes inherited from ccHObject
ccGenericGLDisplay setDisplay_recursive prepareDisplayForRefresh_recursive resetGLTransformationHistory_recursive toggleVisibility_recursive toggleNormals_recursive toggleShowName_recursive ccGenericGLDisplaynewDisplay
 
- Protected Types inherited from ccMesh
using triangleIndexesContainer = ccArray< CCCoreLib::VerticesIndexes, 3, unsigned >
 Container of per-triangle vertices indexes (3)
 
using triangleTexCoordIndexesSet = ccArray< Tuple3i, 3, int >
 Set of triplets of indexes referring to mesh texture coordinates.
 
using triangleNormalsIndexesSet = ccArray< Tuple3i, 3, int >
 Set of triplets of indexes referring to mesh normals.
 
- Static Protected Member Functions inherited from ccGenericMesh
static CCVector3 * GetVertexBuffer ()
 
static CCVector3 * GetNormalsBuffer ()
 
static ColorCompType * GetColorsBuffer ()
 
static unsigned * GetWireVertexIndexes ()
 Returns a pre-initialized array of vertex indexes for wired display. More...
 
static void EnableGLStippleMask (const QOpenGLContext *context, bool state)
 Enables (OpenGL) stipple mask.
 

Detailed Description

Cone (primitive)

3D cone primitive

Constructor & Destructor Documentation

◆ ccCone() [1/2]

ccCone::ccCone ( PointCoordinateType  bottomRadius,
PointCoordinateType  topRadius,
PointCoordinateType  height,
PointCoordinateType  xOff = 0,
PointCoordinateType  yOff = 0,
const ccGLMatrix transMat = nullptr,
QString  name = QString("Cone"),
unsigned  precision = DEFAULT_DRAWING_PRECISION,
unsigned  uniqueID = ccUniqueIDGenerator::InvalidUniqueID 
)

Default constructor.

Cone axis corresponds to the 'Z' dimension by default

Parameters
bottomRadiuscone bottom radius
topRadiuscone top radius
heightcone height (transformation should point to the axis center)
xOffdisplacement of axes along X-axis (Snout mode)
yOffdisplacement of axes along Y-axis (Snout mode)
transMatoptional 3D transformation (can be set afterwards with ccDrawableObject::setGLTransformation)
namename
precisiondrawing precision (angular step = 360/precision)
uniqueIDunique ID (handle with care)

◆ ccCone() [2/2]

ccCone::ccCone ( QString  name = QString("Cone"))

Simplified constructor.

For ccHObject factory only!

Member Function Documentation

◆ buildUp()

bool ccCone::buildUp ( )
overrideprotectedvirtual

Builds primitive.

Transformation will be applied afterwards!

Returns
success

Implements ccGenericPrimitive.

◆ clone()

ccGenericPrimitive * ccCone::clone ( ) const
overridevirtual

Clones primitive.

Implements ccGenericPrimitive.

Reimplemented in ccCylinder.

◆ fromFile_MeOnly()

bool ccCone::fromFile_MeOnly ( QFile &  in,
short  dataVersion,
int  flags,
LoadedIDMap oldToNewIDMap 
)
overrideprotectedvirtual

Loads own object data.

Called by 'fromFile' (recursive scheme) To be overloaded (but still called;) by subclass.

Parameters
ininput file
dataVersionfile version
flagsdeserialization flags (see ccSerializableObject::DeserializationFlags)
oldToNewIDMapmap to link old IDs with new IDs

Reimplemented from ccHObject.

◆ getClassID()

virtual CC_CLASS_ENUM ccCone::getClassID ( ) const
inlineoverridevirtual

Returns class ID.

Implements ccObject.

Reimplemented in ccCylinder.

◆ getTypeName()

virtual QString ccCone::getTypeName ( ) const
inlineoverridevirtual

Returns type name (sphere, cylinder, etc.)

Implements ccGenericPrimitive.

Reimplemented in ccCylinder.

◆ hasDrawingPrecision()

virtual bool ccCone::hasDrawingPrecision ( ) const
inlineoverridevirtual

Whether drawing is dependent on 'precision' parameter.

Reimplemented from ccGenericPrimitive.

◆ setBottomRadius()

void ccCone::setBottomRadius ( PointCoordinateType  radius)
virtual

Sets bottom radius.

Warning
changes primitive content (calls ccGenericPrimitive::updateRepresentation)

Reimplemented in ccCylinder.

◆ setHeight()

void ccCone::setHeight ( PointCoordinateType  height)

Sets height.

Warning
changes primitive content (calls ccGenericPrimitive::updateRepresentation)

◆ setTopRadius()

void ccCone::setTopRadius ( PointCoordinateType  radius)
virtual

Sets top radius.

Warning
changes primitive content (calls ccGenericPrimitive::updateRepresentation)

Reimplemented in ccCylinder.

◆ toFile_MeOnly()

bool ccCone::toFile_MeOnly ( QFile &  out) const
overrideprotectedvirtual

Save own object data.

Called by 'toFile' (recursive scheme) To be overloaded (but still called;) by subclass.

Reimplemented from ccHObject.

Member Data Documentation

◆ DEFAULT_DRAWING_PRECISION

const unsigned ccCone::DEFAULT_DRAWING_PRECISION = 24
static

Default drawing precision.

Warning
Never pass a 'constant initializer' by reference

The documentation for this class was generated from the following files: