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

#include <GiProgressiveMesh.h>

Public Types

enum  Status {
  kStatus_Ok = 0 , kStatus_DegenerateFacesIgnored = 1 , kStatus_NonManifoldFacesIgnored = 1 << 1 , kStatus_InvalidFacesIgnored = 1 << 2 ,
  kStatus_ZeroNormalFacesIgnored = 1 << 3 , kStatus_NonTriangleFaceTriangulated = 1 << 4
}
 

Public Member Functions

virtual OdUInt8 setupInitialShell (OdInt32 nPoints, const OdGePoint3d *points, OdInt32 faceListSize, const OdInt32 *faces)=0
 
virtual OdGiProgressiveMeshPtr buildProgressiveMesh (const OdGiVertexData *pVertexData=NULL, const OdGiFaceData *pFaceData=NULL, const OdGiEdgeData *pEdgeData=NULL)=0
 
virtual OdGiProgressiveMeshPtr createProgressiveMeshFrom (OdStreamBuf *pBuff, const OdGiProgressiveMeshObjectIdConverter *pConverter=NULL, OdGiProgressiveMesh::ProgressiveMeshStreamVersion version=OdGiProgressiveMesh::kVersionActual) const =0
 
virtual OdGiProgressiveMeshPtr createPartialProgressiveMeshFrom (OdStreamBuf *pBuff, OdGiDataExtractor *pDataExtractor, const OdGiProgressiveMeshObjectIdConverter *pConverter=NULL, OdGiProgressiveMesh::ProgressiveMeshStreamVersion version=OdGiProgressiveMesh::kVersionActual) const =0
 
virtual const OdGiProgressiveMeshGeneratorOptionsoptions () const =0
 
virtual OdGiProgressiveMeshGeneratorOptionsoptions ()=0
 
virtual void setOptions (const OdGiProgressiveMeshGeneratorOptions &)=0
 

Static Public Member Functions

static OdGiProgressiveMeshGeneratorcreateObject ()
 

Detailed Description

This class represents interface of Progressive Mesh generator

Remarks
Generation from geometry data (shell): 1) create instance 2) (optional) fill attributes: materials, face data, vertex data, etc 3) construct full-presented mesh by calling setupMesh() 4) (optional) check status 4) (optional) setup generation options 5) generate progressive mesh by calling buildProgressiveMesh() Generation from binary data (load): 1) create instance 2) create progressive mesh by calling createProgressiveMeshFrom()
See also
<link gi_geometry_progressive_mesh_usage, Usage of the Progressive Meshes in the OdGi Library>

Definition at line 665 of file GiProgressiveMesh.h.

Member Enumeration Documentation

◆ Status

Status of generated Progressive mesh

Enumerator
kStatus_Ok 
kStatus_DegenerateFacesIgnored 
kStatus_NonManifoldFacesIgnored 
kStatus_InvalidFacesIgnored 
kStatus_ZeroNormalFacesIgnored 
kStatus_NonTriangleFaceTriangulated 

Definition at line 671 of file GiProgressiveMesh.h.

Member Function Documentation

◆ buildProgressiveMesh()

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

Generates progressive mesh from full-presented mesh

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
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

◆ createObject()

static OdGiProgressiveMeshGenerator * OdGiProgressiveMeshGenerator::createObject ( )
static

Creates instance of OdGiProgressiveMeshGenerator

Remarks
Created instance have to be manually deleted

◆ createPartialProgressiveMeshFrom()

virtual OdGiProgressiveMeshPtr OdGiProgressiveMeshGenerator::createPartialProgressiveMeshFrom ( OdStreamBuf pBuff,
OdGiDataExtractor pDataExtractor,
const OdGiProgressiveMeshObjectIdConverter pConverter = NULL,
OdGiProgressiveMesh::ProgressiveMeshStreamVersion  version = OdGiProgressiveMesh::kVersionActual 
) const
pure virtual

Creates progressive mesh from stream buffer in partial mode.

Parameters
pBuff[in] Pointer to the progressive mesh stream.
pDataExtractor[in] Pointer to the data extractor.
pConverted[in] Pointer to the Id Converter.
version[in] Progressive mesh stream version.
Remarks
In this case Progressive mesh will not keep LOD info in RAM; it will use pDataExtractor to obtain required LOD info in real time.

◆ createProgressiveMeshFrom()

virtual OdGiProgressiveMeshPtr OdGiProgressiveMeshGenerator::createProgressiveMeshFrom ( OdStreamBuf pBuff,
const OdGiProgressiveMeshObjectIdConverter pConverter = NULL,
OdGiProgressiveMesh::ProgressiveMeshStreamVersion  version = OdGiProgressiveMesh::kVersionActual 
) const
pure virtual

Creates progressive mesh from stream buffer

Parameters
pBuff[in] Pointer to the progressive mesh stream.
pConverted[in] Pointer to the Id Converter.
version[in] Progressive mesh stream version.
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.

◆ options() [1/2]

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

Returns mesh simplification options

◆ options() [2/2]

virtual OdGiProgressiveMeshGeneratorOptions & OdGiProgressiveMeshGenerator::options ( )
pure virtual

Returns mesh simplification options

◆ setOptions()

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

Specifies mesh simplification options

◆ setupInitialShell()

virtual OdUInt8 OdGiProgressiveMeshGenerator::setupInitialShell ( OdInt32  nPoints,
const OdGePoint3d points,
OdInt32  faceListSize,
const OdInt32 faces 
)
pure virtual

Constructs full-presented mesh 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
Returns
Returns status of the operation: OdGiProgressiveMeshGenerator::kStatus_Ok if everything ok or set of OdGiProgressiveMeshGenerator::Status bits
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 After mesh is setuped it may have sence to check generator status that contaions information about mismatchs between input data and created mesh

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