28#ifndef _ODGIBASEVECTORIZER_INCLUDED_
29#define _ODGIBASEVECTORIZER_INCLUDED_
62#define ENABLE_GITRAITSOPTIMIZATION
67#undef ENABLE_GITRAITSOPTIMIZATION
789 bool m_dcTransformUpdate[4];
791#ifdef ENABLE_GITRAITSOPTIMIZATION
792 bool m_bResetEntityTraitsData;
818 return extrusion(*pNormal);
848 kSuppressViewportDraw = kFirstFlag << 0,
849 kDrawInvisibleEnts = kFirstFlag << 1,
850 kDrawLayerOff = kFirstFlag << 2,
851 kDrawLayerFrozen = kFirstFlag << 3,
852 kIgnoreFillPlane = kFirstFlag << 4,
853 kSelectionMode = kFirstFlag << 5,
854 kAttributesSegment = kFirstFlag << 6,
855 kXrefOverride = kFirstFlag << 7,
857 kLastFlag = kXrefOverride
881#ifdef ENABLE_GITRAITSOPTIMIZATION
882 inline void resetEntityTraitsDataKeepAuxData();
883 inline void resetEntityTraitsData();
2013 bool transparency =
false,
2014 double brightness = 50.0,
2015 double contrast = 50.0,
2033 bool bDcAligned =
true,
2034 bool bAllowClipping =
false);
2253#ifdef ENABLE_GITRAITSOPTIMIZATION
2263 m_bResetEntityTraitsData =
false;
2281 m_bResetEntityTraitsData =
false;
2320 bool bMirrorX =
false,
2321 bool bMirrorY =
false);
ODGI_EXPORT void odgiSetTextExtentsCacheCapacity(size_t size)
ODGI_EXPORT const OdGiTextStyle * odgiPrepareTextStyle(const OdGiTextStyle *pStyle, OdGiTextStyle &res)
ODGI_EXPORT void odgiCalculateTextBasis(OdGeVector3d &u, OdGeVector3d &v, const OdGeVector3d &normal, const OdGeVector3d &direction, double height, double width, double oblique, bool bMirrorX=false, bool bMirrorY=false)
OdSmartPtr< OdGiFill > OdGiFillPtr
ODGI_EXPORT size_t odgiGetTextExtentsCacheCapacity()
#define ODGI_EXPORT_STATIC
#define SETBIT(flags, bit, value)
#define GETBIT(flags, bit)
virtual ~OdGiBaseVectorizer()
virtual void selectionMarkerOnChange(OdGsMarker nSelectionMarker)
OdGiSubEntityTraits & subEntityTraits() const
LayerTraitsCacheMap m_layerTraitsCache
bool isAttributesSegmentEnabled()
OdDbStub * m_effectiveMaterialId
void setSecondaryTrueColor(const OdCmEntityColor &color)
void image(const OdGiImageBGRA32 &img, const OdGePoint3d &origin, const OdGeVector3d &uVec, const OdGeVector3d &vVec, OdGiRasterImage::TransparencyMode trpMode=OdGiRasterImage::kTransparency8Bit)
void effectiveMaterialTraitsData(OdGiMaterialTraitsData &data) const
void rowOfDots(OdInt32 numPoints, const OdGePoint3d &startPoint, const OdGeVector3d &dirToNextPoint)
void resetEntityTraitsData()
void nurbs(const OdGeNurbCurve3d &nurbsCurve)
bool isXrefOverride() const
bool isValidId(const OdUInt32 viewportId) const
OdGiMapper m_materialMapper
OdRxObjectPtr m_pGiReserved
void setLineWeight(OdDb::LineWeight lineWeight)
void setEffectiveMaterialTraitsData(OdDbStub *materialId, const OdGiMaterialTraitsData &data, bool bForce=false)
OdUInt32 sequenceNumber() const
virtual void setEntityTraitsDataChanged()
OdDbStub * m_byLayerMaterialId
virtual bool doDraw(OdUInt32 drawableFlags, const OdGiDrawable *pDrawable)
OdUInt32 m_drawContextFlags
const OdGiDrawableDesc * drawableDesc() const
const OdGiMaterialTraitsData & effectiveMaterialTraitsData() const
OdGiMapper * m_pCurMaterialMapper
void xline(const OdGePoint3d &firstPoint, const OdGePoint3d &secondPoint)
const OdGiViewport * giViewport() const
bool isEntityTraitsDataChanged(int bit=kSomeChanged) const
void setAuxData(const OdGiAuxiliaryDataPtr &pAuxData)
void setVisualStyle(const OdDbStub *pVisualStyleId)
OdGiTraitsCache< OdGiMaterialTraitsData, OdGiMaterialTraitsTaker, OdGiMaterialTraits::kByBlock|OdGiMaterialTraits::kByLayer > OdGiMaterialTraitsCache
OdGiRegenType regenType() const
void setThickness(double thickness)
void setLineType(OdDbStub *lineTypeId)
OdUInt32 m_materialAttributes
virtual double linetypeGenerationCriteria() const
OdUInt32 m_entityTraitsDataChanged
void eyeToOutputTransform(OdGeMatrix3d &xfm) const
OdGiViewport & viewport() const
void setSectionable(bool bSectionableFlag)
OdGiGeometry & rawGeometry() const
const OdGiPathNode * currentGiPath() const
void metafileDc(const OdGePoint3d &origin, const OdGeVector3d &u, const OdGeVector3d &v, const OdGiMetafile *pMetafile, bool bDcAligned=true, bool bAllowClipping=false)
void polypoint(OdInt32 numPoints, const OdGePoint3d *vertexList, const OdCmEntityColor *pColors, const OdCmTransparency *pTransparency, const OdGeVector3d *pNormals, const OdGsMarker *pSubEntMarkers, OdInt32 nPointSize)
std::map< OdDbStub *, LayerTraitsCache > LayerTraitsCacheMap
void polygonDc(OdUInt32 numVertices, const OdGePoint3d *vertexList)
virtual void affectTraits(const OdGiSubEntityTraitsData *pSource, OdGiSubEntityTraitsData &destination) const
void setMapper(const OdGiMapper *pMapper)
void pline(const OdGiPolyline &polyline, OdUInt32 fromIndex=0, OdUInt32 numSegs=0)
OdUInt32 numberOfIsolines() const
OdGiConveyorConnector m_eyeEntryPoint
virtual bool layerVisible(OdDbStub *layerId) const
void pushModelTransform(const OdGeMatrix3d &xfm)
OdGeMatrix3d getWorldToModelTransform() const
void setLineStyleModifiers(const OdGiDgLinetypeModifiers *pLSMod)
void setFill(const OdGiFill *pFill)
OdGiLayerTraitsTaker m_effectiveLayerTraits
void clearEntityTraitsDataChanged() const
void pushClipBoundary(OdGiClipBoundary *pBoundary)
const OdGiConveyorContext * drawContext() const
void text(const OdGePoint3d &position, const OdGeVector3d &normal, const OdGeVector3d &direction, double height, double width, double oblique, const OdString &msg)
virtual void setEntityTraitsDataChanged(int bit, bool value=true)
const OdGiDeviation & modelDeviation() const
OdGiDrawableDesc * m_pDrawableDesc
void polylineCs(OdGiContext::CoordinatesSystem cs, OdUInt32 numVertices, const OdGePoint3d *vertexList)
bool effectivelyVisible() const
void setSelectionGeom(bool bSelectionFlag)
OdUInt32 m_nDrawableAttributes
OdGsMarker m_nPrevSelectionMarker
virtual void setEffectiveTraits(const OdGiSubEntityTraitsData &traits, const OdGeVector3d *fillNormal=NULL)
bool needDraw(OdUInt32 drawableFlags)
OdGiModelToViewProcPtr m_pModelToEyeProc
void updateTraitsDataByBlockTraits(const OdGiSubEntityTraitsData *pBlockTraits)
void setXrefOverride(bool bSet)
OdGiConveyorConnector * m_pActiveEntryPoint
void polygonEye(OdUInt32 numVertices, const OdGePoint3d *vertexList)
OdGeMatrix3d getModelToWorldTransform() const
virtual void onTraitsModified()
void setTransparency(const OdCmTransparency &transparency)
void polygon(OdInt32 numVertices, const OdGePoint3d *vertexList)
void circularArc(const OdGePoint3d &firstPoint, const OdGePoint3d &secondPoint, const OdGePoint3d &thirdPoint, OdGiArcType arcType=kOdGiArcSimple)
void circle(const OdGePoint3d &firstPoint, const OdGePoint3d &secondPoint, const OdGePoint3d &thirdPoint)
void pushClipBoundary(OdGiClipBoundary *pBoundary, OdGiAbstractClipBoundary *pClipInfo)
void setColor(OdUInt16 color)
OdGiDgLinetypeModifiers m_lsModifiers
virtual const OdGiLayerTraitsData & effectiveLayerTraits() const
void shape(const OdGePoint3d &position, const OdGeVector3d &normal, const OdGeVector3d &direction, int shapeNumber, const OdGiTextStyle *pTextStyle)
void ray(const OdGePoint3d &basePoint, const OdGePoint3d &throughPoint)
const OdGiDrawable * currentDrawable() const
const OdGsView * gsView() const
void polyline(OdInt32 numVertices, const OdGePoint3d *vertexList, const OdGeVector3d *pNormal=0, OdGsMarker baseSubEntMarker=-1)
void updateLayerTraits(OdGiSubEntityTraitsData &subEntityTraits) const
void setExtents(const OdGePoint3d *newExtents)
const OdGiSubEntityTraitsData * m_pByBlock
void mesh(OdInt32 numRows, OdInt32 numColumns, const OdGePoint3d *vertexList, const OdGiEdgeData *pEdgeData=0, const OdGiFaceData *pFaceData=0, const OdGiVertexData *pVertexData=0)
virtual const OdGiSubEntityTraitsData & effectiveTraits() const
void actualizeMaterialAttributes(OdDbStub *materialId) const
void text(const OdGePoint3d &position, const OdGeVector3d &normal, const OdGeVector3d &direction, const OdChar *msg, OdInt32 length, bool raw, const OdGiTextStyle *pTextStyle)
void setLayer(OdDbStub *layerId)
void setDrawFlags(OdUInt32 drawFlags)
virtual void beginViewVectorization()
void ellipArc(const OdGeEllipArc3d &ellipArc, const OdGePoint3d *endPointsOverrides=0, OdGiArcType arcType=kOdGiArcSimple)
const OdGeVector3d * extrusion(const OdGeVector3d *pNormal)
void setSelectionFlags(SelectionFlags selectionFlags)
void setByBlockTraits(const OdGiSubEntityTraitsData *pByBlock)
virtual void polyPolygon(OdUInt32 numIndices, const OdUInt32 *pNumPositions, const OdGePoint3d *pPositions, const OdUInt32 *pNumPoints, const OdGePoint3d *pPoints, const OdCmEntityColor *pOutlineColors=NULL, const OdUInt32 *pOutlinePsLinetypes=NULL, const OdCmEntityColor *pFillColors=NULL, const OdCmTransparency *pFillTransparencies=NULL)
void setMaterial(OdDbStub *pMaterialId)
void pointCloud(const OdGiPointCloud &pCloud)
const OdGiDeviation & worldDeviation() const
void circularArc(const OdGePoint3d ¢er, double radius, const OdGeVector3d &normal, const OdGeVector3d &startVector, double sweepAngle, OdGiArcType arcType=kOdGiArcSimple)
OdGiContext * context() const
OdGiContext & giContext() const
void setTrueColor(const OdCmEntityColor &trueColor)
void polylineDc(OdUInt32 numVertices, const OdGePoint3d *vertexList)
void drawClipBoundary(OdGiClipBoundary *pBoundary, OdGiAbstractClipBoundary *pClipInfo)
void setShadowFlags(ShadowFlags shadowFlags)
void shell(OdInt32 numVertices, const OdGePoint3d *vertexList, OdInt32 faceListSize, const OdInt32 *faceList, const OdGiEdgeData *pEdgeData=0, const OdGiFaceData *pFaceData=0, const OdGiVertexData *pVertexData=0)
void polylineEye(OdUInt32 numVertices, const OdGePoint3d *vertexList)
const OdGeVector3d * extrusion(const OdGeVector3d &normal)
OdDbStub * viewportObjectId() const
void setEyeToOutputTransform(const OdGeMatrix3d &xfm)
virtual void endViewVectorization()
void setPlotStyleNameType(OdDb::PlotStyleNameType plotStyleNameType)
OdDbStub * m_byBlockMaterialId
OdGiConveyorConnector m_output
void rasterImageDc(const OdGePoint3d &origin, const OdGeVector3d &u, const OdGeVector3d &v, const OdGiRasterImage *pImage, const OdGePoint2d *uvBoundary, OdUInt32 numBoundPts, bool transparency=false, double brightness=50.0, double contrast=50.0, double fade=0.0)
void circle(const OdGePoint3d ¢er, double radius, const OdGeVector3d &normal)
OdGiSubEntityTraitsData m_effectiveEntityTraitsData
OdGiConveyorConnector m_modelEntryPoint
void polygon(OdInt32 numVertices, const OdGePoint3d *vertexList, const OdGeVector3d *pNormal)
void edge(const OdGiEdge2dArray &edges)
OdUInt32 drawContextFlags() const
void draw(const OdGiDrawable *pDrawable)
void worldLine(const OdGePoint3d points[2])
void setSelectionMarker(OdGsMarker selectionMarker)
void resetEntityTraitsDataKeepAuxData()
double deviation(const OdGiDeviationType deviationType, const OdGePoint3d &pointOnCurve) const
const OdGiDeviation & eyeDeviation() const
void setDrawContextFlags(OdUInt32 flags, bool bFlag)
void setPlotStyleNameId(OdDbStub *plotStyleNameId)
OdGiMaterialTraitsCache m_effectiveMaterialTraitsData
OdGiDgLinetypeModifiers * m_pCurLSModifiers
const OdGiSubEntityTraitsData * byBlockTraits() const
OdUInt32 drawableAttributes() const
virtual OdGiConveyorOutput & output()
void setPlotStyleName(OdDb::PlotStyleNameType plotStyleNameType, OdDbStub *pPlotStyleNameId=0)
void polygonCs(OdGiContext::CoordinatesSystem cs, OdUInt32 numVertices, const OdGePoint3d *vertexList)
OdGsMarker selectionMarker() const
OdRxObject * queryX(const OdRxClass *pProtocolClass) const
const OdGiDrawableDesc * currentDrawableDesc() const
void pushModelTransform(const OdGeVector3d &normal)
const OdGeVector3d * extrusion(const OdGePoint3d &origin, const OdGeVector3d &u, const OdGeVector3d &v)
const OdGeMatrix3d & eyeToOutputTransform() const
OdGiAuxiliaryDataPtr m_pAuxData
void setLineTypeScale(double lineTypeScale)
OdRxObjectPtr saveByBlockTraits()
virtual OdDbStub * switchLayer(OdDbStub *layerId) const
void startAttributesSegment()
const OdGeVector3d * extrusion(const OdGePoint3d &firstPoint, const OdGePoint3d &secondPoint, const OdGePoint3d &thirdPoint)
OdGsMarker m_nSelectionMarker
virtual OdUInt32 setAttributes(const OdGiDrawable *pDrawable)
virtual bool updateExtentsOnly() const
static OdRxClass * desc()
static ODGI_EXPORT_STATIC const OdGiSubEntityTraitsData g_entityTraitsDataReset
OdGiConveyorContext * drawContext()
void setLockFlags(OdUInt32 lockFlags)
void setFillType(OdGiFillType fillType)
OdDbStub * m_effectiveLayerId
void setContext(OdGiContext *pUserContext)
void setExtents(const OdGePoint3d *newExtents)
const OdGiSubEntityTraitsData & effectiveTraits() const
void getExtents(OdGeExtents3d &extents) const
OdGiRegenType regenType() const
void affectTraits(const OdGiSubEntityTraitsData *pSource, OdGiSubEntityTraitsData &destination) const
void draw(const OdGiDrawable *pDrawable)
bool isSetExtentsCalled() const
OdGiExtAccumPtr m_pExtAccum
bool isLayerFrozen() const
OdGiAuxiliaryDataPtr auxData() const
OdUInt32 lockFlags() const
void setAuxData(const OdGiAuxiliaryDataPtr &pAuxData)
void setLockFlags(OdUInt32 lockFlags)
@ kKeepAuxDataAndLockFlags
OdDbStub * visualStyle() const
void setLineStyleModifiers(const OdGiDgLinetypeModifiers *pLSMod)
void setShadowFlags(ShadowFlags shadowFlags)
void setSectionable(bool bSectionableFlag)
void setLockFlags(OdUInt32 lockFlags)
void setTrueColor(const OdCmEntityColor &color)
OdUInt32 lockFlags() const
void setSelectionFlags(SelectionFlags selectionFlags)
void setVisualStyle(const OdDbStub *visualStyleId)
virtual void setContext(OdGiContext *pUserContext)
void setTransparency(const OdCmTransparency &transparency)
OdDbStub * plotStyleNameId() const
void setMapper(const OdGiMapper *pMapper)
OdGiSubEntityTraitsData m_entityTraitsData
void setColor(OdUInt16 color)
OdCmTransparency transparency() const
OdGiSubEntityTraits & subEntityTraits() const
OdDbStub * material() const
ODRX_USING_HEAP_OPERATORS(OdGiDummyCommonDraw< OdGiWorldDraw_ >)
void setMaterial(OdDbStub *pMaterialId)
void setLayer(OdDbStub *layerId)
void setSelectionGeom(bool bSelectionFlag)
const OdGiDgLinetypeModifiers * lineStyleModifiers() const
OdDbStub * lineType() const
void setFillType(OdGiFillType fillType)
OdGiAuxiliaryDataPtr auxData() const
OdUInt32 numberOfIsolines() const
void setLineType(OdDbStub *lineTypeId)
void setFill(const OdGiFill *pFill)
void setLineTypeScale(double lineTypeScale)
void setSecondaryTrueColor(const OdCmEntityColor &color)
void setSelectionMarker(OdGsMarker selectionMarker)
OdDb::PlotStyleNameType plotStyleNameType() const
static OdGiContext * dummyGiContext()
double lineTypeScale() const
OdGiContext * context() const
const OdGiFill * fill() const
void setThickness(double thickness)
OdGiGeometry & rawGeometry() const
void setPlotStyleName(OdDb::PlotStyleNameType plotStyleNameType, OdDbStub *pPlotStyleNameId=0)
void setDrawFlags(OdUInt32 drawFlags)
const OdGiMapper * mapper() const
SelectionFlags selectionFlags() const
void setAuxData(const OdGiAuxiliaryDataPtr &pAuxData)
OdCmEntityColor secondaryTrueColor() const
void setLineWeight(OdDb::LineWeight lineWeight)
OdGiFillType fillType() const
OdCmEntityColor trueColor() const
OdUInt32 drawFlags() const
OdDb::LineWeight lineWeight() const
ShadowFlags shadowFlags() const
bool selectionGeom() const
GLint GLenum GLsizei width
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
GLuint GLsizei GLsizei * length
GLint GLenum GLsizei GLsizei height
GLsizei const GLfloat * value
OdDbStub * m_effectiveLayerId