CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
OdGiProgressiveMeshEx Class Referenceabstract

#include <GiProgressiveMesh.h>

Inheritance diagram for OdGiProgressiveMeshEx:
OdRxObject

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdGiProgressiveMeshEx)
 
virtual bool obtainShell (OdVector< OdGePoint3d > &pts, OdVector< OdInt32 > &faces) const =0
 
virtual OdUInt32 obtainVertexData (OdGiProgressiveMeshVertexData &data, OdUInt32 flags) const =0
 
virtual OdUInt32 obtainFaceData (OdGiProgressiveMeshFaceData &data, OdUInt32 flags) const =0
 
virtual OdUInt32 obtainEdgeData (OdGiProgressiveMeshEdgeData &data, OdUInt32 flags) const =0
 
virtual OdUInt32 numLODs () const =0
 
virtual OdUInt32 currentLOD () const =0
 
virtual bool setLOD (OdUInt32)=0
 
virtual OdUInt32 numFaces () const =0
 
virtual OdUInt32 numVertices () const =0
 
virtual const OdGeExtents3dextents () const =0
 
virtual bool write (OdStreamBuf *pBuff, const OdGiProgressiveMeshObjectIdConverter *pConverter=NULL, OdGiProgressiveMesh::ProgressiveMeshStreamVersion version=OdGiProgressiveMesh::kVersionActual) const =0
 
virtual bool isProgressiveMeshGenerated () const =0
 
virtual void setupInitialShell (OdInt32 nPoints, const OdGePoint3d *points, OdInt32 faceListSize, const OdInt32 *faces)=0
 
virtual bool buildProgressiveMesh (const OdGiVertexData *pVertexData=NULL, const OdGiFaceData *pFaceData=NULL, const OdGiEdgeData *pEdgeData=NULL)=0
 
virtual bool readProgressiveMeshExFrom (OdStreamBuf *pBuff, const OdGiProgressiveMeshObjectIdConverter *pConverter=NULL, OdGiProgressiveMesh::ProgressiveMeshStreamVersion version=OdGiProgressiveMesh::kVersionActual)=0
 
virtual bool readPartialProgressiveMeshExFrom (OdStreamBuf *pBuff, OdGiDataExtractor *pDataExtractor, const OdGiProgressiveMeshObjectIdConverter *pConverter=NULL, OdGiProgressiveMesh::ProgressiveMeshStreamVersion version=OdGiProgressiveMesh::kVersionActual)=0
 
virtual const OdGiProgressiveMeshGeneratorOptionsoptions () const =0
 
virtual OdGiProgressiveMeshGeneratorOptionsoptions ()=0
 
virtual void setOptions (const OdGiProgressiveMeshGeneratorOptions &)=0
 
virtual void setGenerationAbortFlags (OdUInt8 flags)=0
 
virtual OdUInt8 generationAbortFlags () const =0
 
virtual void setProgressiveMesh (OdGiProgressiveMeshPtr pMesh)=0
 
virtual OdGiProgressiveMeshPtr progressiveMesh () const =0
 
virtual bool hasData () const =0
 
virtual OdUInt64 getObjectSize () const =0
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

This class represents interface of Progressive Mesh Extansion. This object generates OdGiProgressiveMesh or keeps original data if generation fails.

Definition at line 752 of file GiProgressiveMesh.h.

Member Function Documentation

◆ buildProgressiveMesh()

virtual bool OdGiProgressiveMeshEx::buildProgressiveMesh ( const OdGiVertexData pVertexData = NULL,
const OdGiFaceData pFaceData = NULL,
const OdGiEdgeData pEdgeData = NULL 
)
pure virtual

Generates progressive mesh. If fails, keeps shell representation.

Parameters
pVertexData[in] A pointer to the vertex data
pFaceData[in] A pointer to the face data
pEdgeData[in] A pointer to the edge data
Returns
true if progressive mesh is built successfully, false otherwise.
Remarks
Progressive mesh generation stops when one of conditions are reached: 1) Face count reaches minFaces 2) Vertices reaches minVertices 3) There are no more valid simplifications operations available Also, progressive mesh will not be generated if initial data is a kind of generationAbortFlags()

◆ currentLOD()

virtual OdUInt32 OdGiProgressiveMeshEx::currentLOD ( ) const
pure virtual

Retrieves current level of details.

Returns
current level of details as OdUInt32 value.
Remarks
0 is a minimum level of details, numLODs() is a maximum level of details

◆ extents()

virtual const OdGeExtents3d & OdGiProgressiveMeshEx::extents ( ) const
pure virtual

Retrieves extents of fully-detailed progressive mesh

Returns
extents represented by a reference to OdGeExtents3d instance.

◆ generationAbortFlags()

virtual OdUInt8 OdGiProgressiveMeshEx::generationAbortFlags ( ) const
pure virtual

Retrieves generation abort flags.

Returns
a set of generation abort flags as OdUInt8 value.

◆ getObjectSize()

virtual OdUInt64 OdGiProgressiveMeshEx::getObjectSize ( ) const
pure virtual

Calculates RAM usage for this OdGiProgressiveMeshEx object.

Returns
Returns memory usage for this OdGiProgressiveMeshEx object.

◆ hasData()

virtual bool OdGiProgressiveMeshEx::hasData ( ) const
pure virtual

Checks whether this progressive mesh extension has data.

Returns
true if progressive mesh was generated or data for shell was transfered (buildProgressiveMesh() call)

◆ isProgressiveMeshGenerated()

virtual bool OdGiProgressiveMeshEx::isProgressiveMeshGenerated ( ) const
pure virtual

Checks whether progressive mesh is generated.

Returns
true if and only if Progressive Mesh was generated, false otherwise

◆ numFaces()

virtual OdUInt32 OdGiProgressiveMeshEx::numFaces ( ) const
pure virtual

Retrieves number of faces of progressive mesh on current level of details.

Returns
number of faces for progressive mesh on current level of details as OdUInt32 value.

◆ numLODs()

virtual OdUInt32 OdGiProgressiveMeshEx::numLODs ( ) const
pure virtual

Retrieves maximum level of details.

Returns
maximum level of details for the generated progressive mesh or 1 if progressive mesh generation fails.

◆ numVertices()

virtual OdUInt32 OdGiProgressiveMeshEx::numVertices ( ) const
pure virtual

Retrieves number of vertices of progressive mesh on current level of details.

Returns
number of vertices for progressive mesh on current level of details as OdUInt32 value.

◆ obtainEdgeData()

virtual OdUInt32 OdGiProgressiveMeshEx::obtainEdgeData ( OdGiProgressiveMeshEdgeData data,
OdUInt32  flags 
) const
pure virtual

Obtains edge data of progressive mesh on current level of details

Parameters
data[out] OdGiProgressiveMeshEdgeData instance to store results
flags[in] Set of OdGiProgressiveMeshEdgeData::EdgeDataFlags bits that specifies required edge data fields
Returns
Returns set of OdGiProgressiveMeshEdgeData::EdgeDataFlags bits that specifies obtained edge data fields
Remarks
Returns edge data from input data if progressive mesh generation fails

◆ obtainFaceData()

virtual OdUInt32 OdGiProgressiveMeshEx::obtainFaceData ( OdGiProgressiveMeshFaceData data,
OdUInt32  flags 
) const
pure virtual

Obtains face data of progressive mesh on current level of details

Parameters
data[out] OdGiProgressiveMeshFaceData instance to store results
flags[in] Set of OdGiProgressiveMeshFaceData::FaceDataFlags bits that specifies required face data fields
Returns
Returns set of OdGiProgressiveMeshFaceData::FaceDataFlags bits that specifies obtained face data fields
Remarks
Returns face data from input data if progressive mesh generation fails

◆ obtainShell()

virtual bool OdGiProgressiveMeshEx::obtainShell ( OdVector< OdGePoint3d > &  pts,
OdVector< OdInt32 > &  faces 
) const
pure virtual

Obtains geometry representation of progressive mesh on current level of details

Parameters
pts[out] OdVector for points
faces[out] OdVector for faces
Returns
Returns true if and only if geometry representation successfully obtained
Remarks
Returns geometry representation from input data if progressive mesh generation fails

◆ obtainVertexData()

virtual OdUInt32 OdGiProgressiveMeshEx::obtainVertexData ( OdGiProgressiveMeshVertexData data,
OdUInt32  flags 
) const
pure virtual

Obtains vertex data of progressive mesh on current level of details

Parameters
data[out] OdGiProgressiveMeshVertexData instance to store results
flags[in] Set of OdGiProgressiveMeshVertexData::VertexDataFlags bits that specifies required vertex data fields
Returns
Returns set of OdGiProgressiveMeshVertexData::VertexDataFlags bits that specifies obtained vertex data fields
Remarks
Returns vertex data from input data if progressive mesh generation fails

◆ ODRX_DECLARE_MEMBERS()

OdGiProgressiveMeshEx::ODRX_DECLARE_MEMBERS ( OdGiProgressiveMeshEx  )

◆ options() [1/2]

virtual const OdGiProgressiveMeshGeneratorOptions & OdGiProgressiveMeshEx::options ( ) const
pure virtual

Retrieves mesh simplification options.

Returns
reference to OdGiProgressiveMeshGeneratorOptions that represents mesh simplification options.

◆ options() [2/2]

virtual OdGiProgressiveMeshGeneratorOptions & OdGiProgressiveMeshEx::options ( )
pure virtual

Retrieves mesh simplification options.

Returns
reference to OdGiProgressiveMeshGeneratorOptions that represents mesh simplification options.

◆ progressiveMesh()

virtual OdGiProgressiveMeshPtr OdGiProgressiveMeshEx::progressiveMesh ( ) const
pure virtual

Retrieves internal progressive mesh.

Returns
a smart pointer to an underlaying progressive mesh.

◆ readPartialProgressiveMeshExFrom()

virtual bool OdGiProgressiveMeshEx::readPartialProgressiveMeshExFrom ( OdStreamBuf pBuff,
OdGiDataExtractor pDataExtractor,
const OdGiProgressiveMeshObjectIdConverter pConverter = NULL,
OdGiProgressiveMesh::ProgressiveMeshStreamVersion  version = OdGiProgressiveMesh::kVersionActual 
)
pure virtual

Creates progressive mesh extension from stream buffer in partial mode.

Parameters
pBuff[in] Pointer to a stream buffer to read the mesh from.
pDataExtractor[in] Pointer to the data extractor.
pConverter[in] Pointer to the object that converts ObjectId to Int.
version[in] Progressive stream buffer version.
Returns
true if progressive mesh is successfully read from buffer, false otherwise.
Remarks
OdGiProgressiveMeshObjectIdConverter is required for reading DbStubs from the stream (materials). Converter may be NULL. In this case Data Flags with OdDbStub fileld will be reseted. So, for example, face materials will be lost. In partial mode Progressive mesh will not keep LOD info in RAM; it will use pDataExtractor to obtain required LOD info in real time.

◆ readProgressiveMeshExFrom()

virtual bool OdGiProgressiveMeshEx::readProgressiveMeshExFrom ( OdStreamBuf pBuff,
const OdGiProgressiveMeshObjectIdConverter pConverter = NULL,
OdGiProgressiveMesh::ProgressiveMeshStreamVersion  version = OdGiProgressiveMesh::kVersionActual 
)
pure virtual

Creates progressive mesh extension from stream buffer.

Parameters
pBuff[in] Pointer to a stream buffer to read the mesh from.
pConverter[in] Pointer to the object that converts ObjectId to Int.
version[in] Progressive stream buffer version.
Returns
true if progressive mesh is successfully read from buffer, false otherwise.
Remarks
OdGiProgressiveMeshObjectIdConverter is required for reading DbStubs from the stream (materials). Converter may be NULL. In this case Data Flags with OdDbStub fileld will be reseted. So, for example, face materials will be lost.
For the version parameter you can currently choose one of two available versions: kVersion1 supports:
Face Vertices Edges Colors, normals Colors, normals --—

kVersion2 supports:

Face Vertices Edges Colors, normals, materials Colors, normals, UV (texture coordinates) Visibility

Current version (kVersionActual) is kVersion2.

◆ setGenerationAbortFlags()

virtual void OdGiProgressiveMeshEx::setGenerationAbortFlags ( OdUInt8  flags)
pure virtual

Specifies generation abort flags

Parameters
flags[in] A set of OdGiProgressiveMeshGenerator::Status flags.
Remarks
If progressive mesh generator returns one of the flags in status, mesh generation will be aborted.

◆ setLOD()

virtual bool OdGiProgressiveMeshEx::setLOD ( OdUInt32  )
pure virtual

Switches progressive mesh to the specified level of details.

Returns
false if number of level of details equals to 0, true otherwise.
Remarks
if the specified level of details is greater that the maximum level of details, then an exception is thrown and level of details is set to the maximum allowed level of details.

◆ setOptions()

virtual void OdGiProgressiveMeshEx::setOptions ( const OdGiProgressiveMeshGeneratorOptions )
pure virtual

Specifies mesh simplification options.

◆ setProgressiveMesh()

virtual void OdGiProgressiveMeshEx::setProgressiveMesh ( OdGiProgressiveMeshPtr  pMesh)
pure virtual

Specifies internal progressive mesh.

Parameters
flags[in] A set of OdGiProgressiveMeshGenerator::Status flags

◆ setupInitialShell()

virtual void OdGiProgressiveMeshEx::setupInitialShell ( OdInt32  nPoints,
const OdGePoint3d points,
OdInt32  faceListSize,
const OdInt32 faces 
)
pure virtual

Prepares initial data for progressive mesh generation

Parameters
nPoints[in] A number of input points
points[in] A pointer to the input points array
faceListSize[in] A size of face list
faces[in] A pointer to the faces list
Remarks
Faces list is a list of OdInt32 with the following sequence for each face: Number of points in face, Index of first point, Index of second point, etc

◆ write()

virtual bool OdGiProgressiveMeshEx::write ( OdStreamBuf pBuff,
const OdGiProgressiveMeshObjectIdConverter pConverter = NULL,
OdGiProgressiveMesh::ProgressiveMeshStreamVersion  version = OdGiProgressiveMesh::kVersionActual 
) const
pure virtual

Writes progressive mesh into the specified stream buffer.

Parameters
pBuff[in] Pointer to a stream buffer to write the mesh to.
pConverter[in] Pointer to the object that converts ObjectId to Int.
version[in] Progressive stream buffer version.
Returns
true if operation succeeded, false otherwise.
Remarks
OdGiProgressiveMeshObjectIdConverter is required for writing DbStubs to the stream (materials). Converter may be NULL. In this case Data Flags with OdDbStub fileld will be reseted for writing. So, for example, face materials will be lost.
For the version parameter you can currently choose one of two available versions: kVersion1 supports:
Face Vertices Edges Colors, normals Colors, normals --—

kVersion2 supports:

Face Vertices Edges Colors, normals, materials Colors, normals, UV (texture coordinates) Visibility

Current version (kVersionActual) is kVersion2.


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