23#ifndef ODGI_PROGRESSIVEMESH_H_INCLUDED
24#define ODGI_PROGRESSIVEMESH_H_INCLUDED
133 kVertexDataNormals = 1,
135 kVertexDataColors = 1 << 1,
137 kVertexDataUVs = 1 << 2
160 kFaceDataMaterials = 1,
162 kFaceDataColors = 1 << 1,
164 kFaceDataNormals = 1 <<2
187 kEdgeDataVisibilities = 1
241 m_nMaxPixels = (
OdUInt32)( 300.0 * sqrt( 3.0 ) );
289 kVersionActual = kVersion2
297 kSqrInterpolation = 1,
298 kSqrtInterpolation = 2
512 SETBIT( m_flags, kFlag_FitNormals, bFit );
513 m_normalErrorFactor = errorFactor;
532 SETBIT( m_flags, kFlag_FitColors, bFit );
533 m_colorErrorFactor = errorFactor;
577 SETBIT( m_flags, kFlag_DesH, bSet );
578 m_desdFactor = factor;
598 SETBIT( m_flags, kFlag_DesN, bSet );
599 m_desnFactor = factor;
626 kFlag_FitNormals = 1,
627 kFlag_FitColors = 1 << 1,
634 double m_worstDiherial;
638 double m_normalErrorFactor;
639 double m_colorErrorFactor;
640 double m_sharpEdgesScaleFactor;
641 double m_nextCostThresholdFactor;
674 kStatus_DegenerateFacesIgnored = 1,
675 kStatus_NonManifoldFacesIgnored = 1 << 1,
676 kStatus_InvalidFacesIgnored = 1 << 2,
677 kStatus_ZeroNormalFacesIgnored = 1 << 3,
678 kStatus_NonTriangleFaceTriangulated = 1 << 4
OdSmartPtr< OdGiProgressiveMesh > OdGiProgressiveMeshPtr
OdSmartPtr< OdGiProgressiveMeshEx > OdGiProgressiveMeshExPtr
#define SETBIT(flags, bit, value)
#define GETBIT(flags, bit)
virtual OdUInt32 selectLOD(const OdGiProgressiveMesh *pPM, const OdGiViewport *pView, const OdGeMatrix3d *pModelToWorldTransform) const =0
~OdGiProgressiveMeshAutoLODSelectOptions()
OdGiProgressiveMeshAutoLODSelectOptions()
OdUInt32 minPixels() const
void setMinPixels(OdUInt32 nMin)
OdUInt32 maxPixels() const
void setMaxPixels(OdUInt32 nMax)
virtual bool isProgressiveMeshGenerated() const =0
virtual void setOptions(const OdGiProgressiveMeshGeneratorOptions &)=0
virtual const OdGiProgressiveMeshGeneratorOptions & options() const =0
virtual OdUInt64 getObjectSize() const =0
virtual OdUInt32 obtainEdgeData(OdGiProgressiveMeshEdgeData &data, OdUInt32 flags) const =0
virtual void setGenerationAbortFlags(OdUInt8 flags)=0
virtual bool readProgressiveMeshExFrom(OdStreamBuf *pBuff, const OdGiProgressiveMeshObjectIdConverter *pConverter=NULL, OdGiProgressiveMesh::ProgressiveMeshStreamVersion version=OdGiProgressiveMesh::kVersionActual)=0
virtual bool buildProgressiveMesh(const OdGiVertexData *pVertexData=NULL, const OdGiFaceData *pFaceData=NULL, const OdGiEdgeData *pEdgeData=NULL)=0
virtual OdUInt8 generationAbortFlags() const =0
virtual OdUInt32 numLODs() const =0
virtual OdUInt32 currentLOD() const =0
virtual OdUInt32 numFaces() const =0
virtual OdUInt32 obtainFaceData(OdGiProgressiveMeshFaceData &data, OdUInt32 flags) const =0
virtual bool setLOD(OdUInt32)=0
virtual void setupInitialShell(OdInt32 nPoints, const OdGePoint3d *points, OdInt32 faceListSize, const OdInt32 *faces)=0
virtual OdGiProgressiveMeshPtr progressiveMesh() const =0
virtual void setProgressiveMesh(OdGiProgressiveMeshPtr pMesh)=0
virtual const OdGeExtents3d & extents() const =0
virtual bool obtainShell(OdVector< OdGePoint3d > &pts, OdVector< OdInt32 > &faces) const =0
ODRX_DECLARE_MEMBERS(OdGiProgressiveMeshEx)
virtual bool readPartialProgressiveMeshExFrom(OdStreamBuf *pBuff, OdGiDataExtractor *pDataExtractor, const OdGiProgressiveMeshObjectIdConverter *pConverter=NULL, OdGiProgressiveMesh::ProgressiveMeshStreamVersion version=OdGiProgressiveMesh::kVersionActual)=0
virtual OdGiProgressiveMeshGeneratorOptions & options()=0
virtual bool write(OdStreamBuf *pBuff, const OdGiProgressiveMeshObjectIdConverter *pConverter=NULL, OdGiProgressiveMesh::ProgressiveMeshStreamVersion version=OdGiProgressiveMesh::kVersionActual) const =0
virtual OdUInt32 obtainVertexData(OdGiProgressiveMeshVertexData &data, OdUInt32 flags) const =0
virtual OdUInt32 numVertices() const =0
virtual bool hasData() const =0
virtual const OdGiProgressiveMeshGeneratorOptions & options() const =0
virtual OdUInt8 setupInitialShell(OdInt32 nPoints, const OdGePoint3d *points, OdInt32 faceListSize, const OdInt32 *faces)=0
virtual OdGiProgressiveMeshPtr createPartialProgressiveMeshFrom(OdStreamBuf *pBuff, OdGiDataExtractor *pDataExtractor, const OdGiProgressiveMeshObjectIdConverter *pConverter=NULL, OdGiProgressiveMesh::ProgressiveMeshStreamVersion version=OdGiProgressiveMesh::kVersionActual) const =0
virtual OdGiProgressiveMeshGeneratorOptions & options()=0
static OdGiProgressiveMeshGenerator * createObject()
virtual OdGiProgressiveMeshPtr createProgressiveMeshFrom(OdStreamBuf *pBuff, const OdGiProgressiveMeshObjectIdConverter *pConverter=NULL, OdGiProgressiveMesh::ProgressiveMeshStreamVersion version=OdGiProgressiveMesh::kVersionActual) const =0
virtual OdGiProgressiveMeshPtr buildProgressiveMesh(const OdGiVertexData *pVertexData=NULL, const OdGiFaceData *pFaceData=NULL, const OdGiEdgeData *pEdgeData=NULL)=0
virtual void setOptions(const OdGiProgressiveMeshGeneratorOptions &)=0
double colorErrorFactor() const
bool getDiffMaxPenalty() const
void setNextCostThresholdFactor(double d)
double sumPenaltyFactor() const
OdUInt32 minVertices() const
~OdGiProgressiveMeshGeneratorOptions()
void setSharpEdgesScaleFactor(double d)
OdGiProgressiveMeshGeneratorOptions()
double diffMaxPenaltyFactor() const
double smallestCost() const
OdUInt32 numFaceSamplePoints() const
void setSumPenalty(bool bSet, double factor)
void setFitNormals(bool bFit, double errorFactor)
void setDiffMaxPenalty(bool bSet, double factor)
double sharpEdgesScaleFactor() const
bool getFitNormals() const
void setNumFaceSamplePoints(OdUInt32 n)
void setMinVertices(OdUInt32 n)
void setInfinity(double d)
bool getSumPenalty() const
double normalErrorFactor() const
void setWorstCost(double d)
void setMinFaces(OdUInt32 n)
void setSmallestCost(double d)
void setWorstDiherial(double d)
OdUInt32 minFaces() const
OdUInt8 strictSharp() const
double worstDiherial() const
void setFitColors(bool bFit, double errorFactor)
double nextCostThresholdFactor() const
bool getFitColors() const
virtual OdGiProgressiveMeshAutoLODSelectOptions & autoSelectLODOptions()=0
virtual OdUInt32 obtainVertexData(OdGiProgressiveMeshVertexData &data, OdUInt32 flags) const =0
virtual bool isInPartialMode() const =0
virtual OdUInt32 currentLOD() const =0
virtual void endPartialMode()=0
ODRX_DECLARE_MEMBERS(OdGiProgressiveMesh)
virtual OdUInt32 numVertices() const =0
virtual OdGiProgressiveMeshAutoLODSelectCallback * getCustomLODAutoSelectCallback() const =0
ProgressiveMeshStreamVersion
virtual bool write(OdStreamBuf *pBuff, const OdGiProgressiveMeshObjectIdConverter *pConverter=NULL, ProgressiveMeshStreamVersion version=kVersionActual) const =0
virtual void setCustomLODAutoSelectCallback(OdGiProgressiveMeshAutoLODSelectCallback *pCallback)=0
virtual void setAutoSelectLODOptions(const OdGiProgressiveMeshAutoLODSelectOptions &options)=0
virtual bool setLOD(OdUInt32)=0
virtual OdUInt32 obtainFaceData(OdGiProgressiveMeshFaceData &data, OdUInt32 flags) const =0
ProgressiveMeshAutoSelectLOD
virtual const OdGiProgressiveMeshAutoLODSelectOptions & autoSelectLODOptions() const =0
virtual OdUInt32 numFaces() const =0
virtual OdUInt64 getObjectSize() const =0
virtual OdUInt32 selectLOD(ProgressiveMeshAutoSelectLOD lod, const OdGiViewport *pView, const OdGeMatrix3d *pModelToWorldTransform=NULL)=0
virtual OdUInt32 obtainEdgeData(OdGiProgressiveMeshEdgeData &data, OdUInt32 flags) const =0
virtual bool obtainShell(OdVector< OdGePoint3d > &pts, OdVector< OdInt32 > &faces) const =0
virtual const OdGeExtents3d & extents() const =0
virtual OdUInt32 numLODs() const =0
virtual OdInt64 dbStubToInt(OdDbStub *) const =0
virtual OdDbStub * intToDbStub(OdInt64) const =0
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
OdVector< OdUInt8 > visibilities
OdVector< OdGeVector3d > normals
OdVector< OdCmEntityColor > colors
OdVector< OdDbStub * > materials
OdVector< OdGePoint3d > UV
OdVector< OdCmEntityColor > colors
OdVector< OdGeVector3d > normals