qCC_db  version 2.5.4 (Qt) - 19 Apr 2014
 All Classes Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ccSphere Class Reference

Sphere (primitive) More...

#include <ccSphere.h>

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

Public Member Functions

 ccSphere (PointCoordinateType radius, const ccGLMatrix *transMat=0, QString name=QString("Sphere"), unsigned precision=24)
 Default constructor. More...
 
 ccSphere (QString name=QString("Sphere"))
 Simplified constructor. More...
 
virtual CC_CLASS_ENUM getClassID () const
 Returns class ID.
 
virtual QString getTypeName () const
 Returns type name (sphere, cylinder, etc.)
 
virtual bool hasDrawingPrecision () const
 Whether drawing is dependent on 'precision' parameter.
 
virtual ccGenericPrimitiveclone () const
 Clones primitive.
 
PointCoordinateType getRadius () const
 Returns radius.
 
- Public Member Functions inherited from ccGenericPrimitive
 ccGenericPrimitive (QString name=QString(), const ccGLMatrix *transMat=0)
 Default constructor. More...
 
virtual void setColor (const colorType *col)
 Sets primitive color (shortcut) More...
 
const ccGenericPrimitiveoperator+= (const ccGenericPrimitive &prim)
 Add operator. 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)
 
- Public Member Functions inherited from ccMesh
 ccMesh (ccGenericPointCloud *vertices)
 Default ccMesh constructor. More...
 
 ccMesh (CCLib::GenericIndexedMesh *giMesh, ccGenericPointCloud *giVertices)
 ccMesh constructor (from a CCLib::GenericIndexedMesh) More...
 
virtual ~ccMesh ()
 Default destructor.
 
virtual void setAssociatedCloud (ccGenericPointCloud *cloud)
 Sets the associated vertices cloud (warning)
 
virtual ccMeshclone (ccGenericPointCloud *vertices=0, ccMaterialSet *clonedMaterials=0, NormsIndexesTableType *clonedNormsTable=0, TextureCoordsContainer *cloneTexCoords=0)
 Clones this entity. More...
 
virtual unsigned getUniqueIDForDisplay () const
 Returns object unqiue ID used for display.
 
virtual ccGenericPointCloudgetAssociatedCloud () const
 Returns the vertices cloud.
 
virtual void refreshBB ()
 Forces bounding-box update.
 
virtual bool interpolateNormals (unsigned triIndex, const CCVector3 &P, CCVector3 &N)
 Interpolates normal(s) inside a given triangle. More...
 
virtual bool interpolateColors (unsigned triIndex, const CCVector3 &P, colorType rgb[])
 Interpolates RGB colors inside a given triangle. More...
 
virtual bool getColorFromMaterial (unsigned triIndex, const CCVector3 &P, colorType rgb[], bool interpolateColorIfNoTexture)
 Returns RGB color fom a given triangle material/texture. More...
 
virtual bool getVertexColorFromMaterial (unsigned triIndex, unsigned char vertIndex, colorType rgb[], bool returnColorIfNoTexture)
 Returns RGB color of a vertex fom a given triangle material/texture. More...
 
virtual unsigned maxSize () const
 Returns max capacity.
 
virtual void forEach (genericTriangleAction &anAction)
 
virtual void placeIteratorAtBegining ()
 
virtual CCLib::GenericTriangle * _getNextTriangle ()
 
virtual CCLib::GenericTriangle * _getTriangle (unsigned triangleIndex)
 
virtual
CCLib::TriangleSummitsIndexes * 
getNextTriangleIndexes ()
 
virtual
CCLib::TriangleSummitsIndexes * 
getTriangleIndexes (unsigned triangleIndex)
 
virtual void getTriangleSummits (unsigned triangleIndex, CCVector3 &A, CCVector3 &B, CCVector3 &C)
 
virtual unsigned size () const
 
virtual void getBoundingBox (PointCoordinateType bbMin[], PointCoordinateType bbMax[])
 
virtual const
CCLib::TriangleSummitsIndexes * 
getTriangleIndexes (unsigned triangleIndex) const
 
virtual ccBBox getMyOwnBB ()
 Returns the entity bounding-box only. More...
 
virtual bool isSerializable () const
 Returns whether object is serializable of not.
 
virtual bool hasColors () const
 Returns whether colors are enabled or not.
 
virtual bool hasNormals () const
 Returns whether normals are enabled or not.
 
virtual bool hasScalarFields () const
 Returns whether one or more scalar fields are instantiated. More...
 
virtual bool hasDisplayedScalarField () const
 Returns whether an active scalar field is available or not.
 
virtual bool normalsShown () const
 Returns whether normals are shown or not.
 
virtual void setDisplay (ccGenericGLDisplay *win)
 Sets associated GL display.
 
virtual void toggleMaterials ()
 Toggles material display state.
 
virtual void shiftTriangleIndexes (unsigned shift)
 Shifts all triangles indexes. More...
 
void addTriangle (unsigned i1, unsigned i2, unsigned i3)
 Adds a triangle to the mesh. More...
 
bool reserve (unsigned n)
 Reserves the memory to store the vertex indexes (3 per triangle) More...
 
bool resize (unsigned n)
 Resizes the array of vertex indexes (3 per triangle) More...
 
virtual bool hasTriNormals () const
 Returns whether the mesh has per-triangle normals.
 
virtual void getTriangleNormalIndexes (unsigned triangleIndex, int &i1, int &i2, int &i3) const
 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
 Returns a given triangle normal. More...
 
virtual NormsIndexesTableTypegetTriNormsTable () const
 Returns per-triangle normals shared array.
 
virtual void setTriNormsTable (NormsIndexesTableType *triNormsTable, bool autoReleaseOldTable=true)
 Sets per-triangle normals array (may be shared)
 
virtual 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.
 
virtual bool hasMaterials () const
 Returns whether the mesh has materials/textures.
 
virtual const ccMaterialSetgetMaterialSet () const
 Returns associated material set.
 
virtual int getTriangleMtlIndex (unsigned triangleIndex) const
 Returns a given triangle material indexes.
 
virtual 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 setTriangleMtlIndex (unsigned triangleIndex, int mtlIndex)
 Sets triangle material indexes. More...
 
virtual void setMaterialSet (ccMaterialSet *materialSet, bool autoReleaseOldMaterialSet=true)
 Sets associated material set (may be shared)
 
virtual bool hasTextures () const
 Returns whether textures are available for this mesh.
 
virtual TextureCoordsContainergetTexCoordinatesTable () const
 Returns per-triangle texture coordinates array.
 
virtual void getTriangleTexCoordinates (unsigned triIndex, float *&tx1, float *&tx2, float *&tx3) const
 Returns per-triangle texture coordinates (pointer to)
 
virtual bool hasPerTriangleTexCoordIndexes () const
 Returns whether this mesh as per-triangle triplets of tex coords indexes.
 
virtual void getTriangleTexCoordinatesIndexes (unsigned triangleIndex, int &i1, int &i2, int &i3) const
 Returns the triplet of tex coords indexes for a given triangle. More...
 
virtual 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...
 
virtual bool computeNormals (bool perVertex)
 Computes normals. More...
 
virtual bool computePerVertexNormals ()
 Computes per-vertex normals. More...
 
virtual bool computePerTriangleNormals ()
 Computes per-triangle normals.
 
bool laplacianSmooth (unsigned nbIteration=100, PointCoordinateType factor=static_cast< PointCoordinateType >(0.01), CCLib::GenericProgressCallback *progressCb=0)
 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...
 
virtual ccMeshcreateNewMeshFromSelection (bool removeSelectedFaces)
 Creates a new mesh with the selected vertices only. More...
 
void swapTriangles (unsigned index1, unsigned index2)
 Swaps two triangles. More...
 
- Public Member Functions inherited from ccGenericMesh
 ccGenericMesh (QString name=QString())
 Default constructor. More...
 
virtual ~ccGenericMesh ()
 Destructor.
 
virtual void showNormals (bool state)
 Sets normals visibility.
 
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, CCLib::GenericProgressCallback *pDlg=0)
 Samples points on a mesh.
 
- Public Member Functions inherited from ccHObject
 ccHObject (QString name=QString())
 Default constructor. More...
 
virtual ~ccHObject ()
 Default destructor.
 
virtual QIcon getIcon () const
 Returns the icon associated to this entity. More...
 
ccHObjectgetParent () const
 Returns parent object. 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 (const 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...
 
ccHObjectgetChild (unsigned childPos) const
 Returns the ith child. More...
 
ccHObjectfind (int uniqueID)
 Finds an entity in this object hierarchy. More...
 
unsigned filterChildren (Container &filteredChildren, bool recursive=false, CC_CLASS_ENUM filter=CC_TYPES::OBJECT) const
 Collects the children corresponding to a certain pattern. More...
 
void detachChild (ccHObject *child)
 Detaches a specific child. More...
 
void detatchAllChildren ()
 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 getBB (bool relative=true, bool withGLfeatures=false, const ccGenericGLDisplay *window=NULL)
 Returns bounding-box. More...
 
virtual void draw (CC_DRAW_CONTEXT &context)
 Draws entity and its children.
 
virtual bool isDisplayed () const
 Returns whether the object is actually displayed (visible) 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, prepareDisplayForRefresh_recursive)
 
 ccHObject_recursive_call0 (refreshDisplay, refreshDisplay_recursive)
 
 ccHObject_recursive_call0 (toggleVisibility, toggleVisibility_recursive)
 
 ccHObject_recursive_call0 (toggleColors, toggleColors_recursive)
 
 ccHObject_recursive_call0 (toggleNormals, toggleNormals_recursive)
 
 ccHObject_recursive_call0 (toggleSF, toggleSF_recursive)
 
 ccHObject_recursive_call0 (toggleShowName, toggleShowName_recursive)
 
 ccHObject_recursive_call0 (toggleMaterials, toggleMaterials_recursive)
 
void applyGLTransformation_recursive (ccGLMatrix *trans=0)
 Applies the active OpenGL transformation to the entity (recursive) More...
 
virtual CCVector3 getBBCenter ()
 Returns the bounding-box center. More...
 
void notifyGeometryUpdate ()
 Notifies all dependent entities that the geometry of this entity has changed.
 
virtual ccBBox getDisplayBB ()
 Returns the entity GL display bounding-box. More...
 
virtual bool toFile (QFile &out) const
 Saves data to binay stream. More...
 
virtual bool fromFile (QFile &in, short dataVersion, int flags)
 Reimplemented from ccSerializableObject::fromFile. More...
 
virtual bool isShareable () const
 Returns whether object is shareable or not. More...
 
void setSelectionBehavior (SelectionBehavior mode)
 Sets selection behavior (when displayed) More...
 
SelectionBehavior getSelectionBehavior () const
 Returns selection behavior.
 
- Public Member Functions inherited from ccObject
 ccObject (QString name=QString())
 Default constructor. More...
 
virtual QString getName () const
 Returns object name.
 
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 bool isLocked () const
 Returns whether the object is locked or not. More...
 
virtual void setLocked (bool state)
 Sets the "enabled" property. More...
 
bool isGroup () const
 
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 (QString key) const
 Returns a given associated meta data. More...
 
bool removeMetaData (QString key)
 Removes a given associated meta data. More...
 
void setMetaData (QString key, QVariant data)
 Sets a meta data element. More...
 
bool hasMetaData (QString key)
 Says if a metadata 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 ()
 Desctructor.
 
- Public Member Functions inherited from ccDrawableObject
 ccDrawableObject ()
 Default constructor.
 
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 isVisiblityLocked () const
 Returns whether visibilty is locked or not.
 
virtual void lockVisibility (bool state)
 Locks/unlocks visibilty. More...
 
virtual bool isSelected () const
 Returns whether entity is selected or not.
 
virtual void setSelected (bool state)
 Selects/unselects entity.
 
virtual ccBBox getFitBB (ccGLMatrix &trans)
 Returns best-fit bounding-box (if available) More...
 
virtual void drawBB (const colorType col[])
 Draws absolute (axis aligned) bounding-box.
 
virtual void getDrawingParameters (glDrawParams &params) const
 Returns main OpenGL paramters for this entity. 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 void toggleNormals ()
 Toggles normals display state.
 
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 showNameIn3D (bool state)
 Sets whether name should be displayed in 3D.
 
virtual bool nameShownIn3D () const
 Returns whether name is displayed in 3D or not.
 
virtual void toggleShowName ()
 Toggles name in 3D display state.
 
virtual bool isColorOverriden () const
 Returns whether colors are currently overriden by a temporary (unique) color. More...
 
virtual const colorType * getTempColor () const
 Returns current temporary (unique) color.
 
virtual void setTempColor (const colorType *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 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 ()
 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
 Retuns associated GL transformation. More...
 
virtual void resetGLTransformation ()
 Resets associated GL transformation. More...
 
virtual void rotateGL (const ccGLMatrix &rotMat)
 Mutliplies (left) current GL transformation by a rotation matrix. More...
 
virtual void translateGL (const CCVector3 &trans)
 Translates current GL transformation by a rotation matrix. More...
 

Protected Member Functions

virtual bool toFile_MeOnly (QFile &out) const
 Save own object data. More...
 
virtual bool fromFile_MeOnly (QFile &in, short dataVersion, int flags)
 Loads own object data. More...
 
virtual bool buildUp ()
 Builds primitive. More...
 
virtual void drawNameIn3D (CC_DRAW_CONTEXT &context)
 Draws the entity name in 3D. More...
 
- Protected Member Functions inherited from ccGenericPrimitive
virtual void applyGLTransformation (const ccGLMatrix &trans)
 Inherited from ccGenericMesh.
 
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
virtual void drawMeOnly (CC_DRAW_CONTEXT &context)
 Draws the entity only (not its children)
 
virtual void onUpdateOf (ccHObject *obj)
 This method is called when another object (geometry) is updated. More...
 
bool interpolateNormals (unsigned i1, unsigned i2, unsigned i3, const CCVector3 &P, CCVector3 &N, const int *triNormIndexes=0)
 Same as other 'interpolateNormals' method with a set of 3 vertices indexes.
 
bool interpolateColors (unsigned i1, unsigned i2, unsigned i3, const CCVector3 &P, colorType rgb[])
 Same as other 'interpolateColors' method with a set of 3 vertices indexes.
 
bool pushSubdivide (unsigned indexA, unsigned indexB, unsigned indexC)
 Used internally by 'subdivide'.
 
 ccMesh_extended_call1 (showNormals, bool, showNormals_extended)
 
- Protected Member Functions inherited from ccGenericMesh
void handleColorRamp (CC_DRAW_CONTEXT &context)
 Handles the color ramp display.
 
- Protected Member Functions inherited from ccHObject
virtual void setParent (ccHObject *anObject)
 Sets parent object.
 
virtual void onDeletionOf (const ccHObject *obj)
 This method is called when another object is deleted. 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...
 

Protected Attributes

PointCoordinateType m_radius
 Radius.
 
- 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
ccGenericPointCloudm_associatedCloud
 associated cloud (vertices)
 
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 triangle summits indexes.
 
CCLib::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 ccHObject
ccHObjectm_parent
 Object's parent.
 
Container m_children
 Object's children.
 
SelectionBehavior m_selectionBehavior
 Selection behavior.
 
std::map< ccHObject *, int > m_dependencies
 Dependencies map. More...
 
- 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.
 
colorType m_tempColor [3]
 Temporary (unique) color.
 
bool m_colorIsOverriden
 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.
 
ccGenericGLDisplaym_currentDisplay
 Currently associated GL display.
 

Additional Inherited Members

- Public Types inherited from ccMesh
enum  MESH_SCALAR_FIELD_PROCESS { SMOOTH_MESH_SF, ENHANCE_MESH_SF }
 Mesh scalar field processes. More...
 
- 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.
 
typedef std::vector< ccHObject * > Container
 standard ccHObject container (for children, etc.)
 
- Public Types inherited from ccSerializableObject
enum  DeserializationFlags { DF_POINT_COORDS_64_BITS = 1, DF_SCALAR_VAL_32_BITS = 2 }
 Deserialization flags (bit-field) More...
 
- Static Public Member Functions inherited from ccHObject
static ccHObjectNew (CC_CLASS_ENUM objectType, const char *name=0)
 Static factory. More...
 
- Static Public Member Functions inherited from ccObject
static unsigned GetCurrentDBVersion ()
 Returns current database version.
 
static void ResetUniqueIDCounter ()
 Resets the object's unique ID counter. More...
 
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...
 
- Protected Types inherited from ccMesh
typedef GenericChunkedArray
< 3, unsigned > 
triangleIndexesContainer
 Container of per-triangle vertices indexes (3)
 
typedef GenericChunkedArray
< 1, int > 
triangleMaterialIndexesSet
 Container of per-triangle material descriptors.
 
typedef GenericChunkedArray
< 3, int > 
triangleTexCoordIndexesSet
 Set of triplets of indexes referring to mesh texture coordinates.
 
typedef GenericChunkedArray
< 3, int > 
triangleNormalsIndexesSet
 Set of triplets of indexes referring to mesh normals.
 
- Static Protected Member Functions inherited from ccGenericMesh
static unsigned GET_MAX_LOD_FACES_NUMBER ()
 Max number of displayed triangles (per entity) in "low detail" display.
 
static PointCoordinateType * GetVertexBuffer ()
 
static PointCoordinateType * GetNormalsBuffer ()
 
static colorType * GetColorsBuffer ()
 
static unsigned * GetWireVertexIndexes ()
 Returns a pre-initialized array of vertex indexes for wired display. More...
 
static void EnableGLStippleMask (bool state)
 Enables (OpenGL) stipple mask.
 
- Static Protected Member Functions inherited from ccObject
static void UpdateLastUniqueID (unsigned lastID)
 Sets last assigned unique ID. More...
 

Detailed Description

Sphere (primitive)

3D sphere primitive

Constructor & Destructor Documentation

ccSphere::ccSphere ( PointCoordinateType  radius,
const ccGLMatrix transMat = 0,
QString  name = QString("Sphere"),
unsigned  precision = 24 
)

Default constructor.

Parameters
radiussphere radius
transMatoptional 3D transformation (can be set afterwards with ccDrawableObject::setGLTransformation)
namename
precisiondrawing precision (angular step = 360/precision)
ccSphere::ccSphere ( QString  name = QString("Sphere"))

Simplified constructor.

For ccHObject factory only!

Member Function Documentation

bool ccSphere::buildUp ( )
protectedvirtual

Builds primitive.

Transformation will be applied afterwards!

Returns
success

Implements ccGenericPrimitive.

void ccSphere::drawNameIn3D ( CC_DRAW_CONTEXT context)
protectedvirtual

Draws the entity name in 3D.

Names is displayed at the center of the bounding box by default.

Reimplemented from ccHObject.

bool ccSphere::fromFile_MeOnly ( QFile &  in,
short  dataVersion,
int  flags 
)
protectedvirtual

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)

Reimplemented from ccGenericPrimitive.

bool ccSphere::toFile_MeOnly ( QFile &  out) const
protectedvirtual

Save own object data.

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

Reimplemented from ccGenericPrimitive.


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