28 #ifndef _ODGIBASEVECTORIZER_INCLUDED_
29 #define _ODGIBASEVECTORIZER_INCLUDED_
62 #define ENABLE_GITRAITSOPTIMIZATION
67 #undef ENABLE_GITRAITSOPTIMIZATION
181 #if (TD_MAJOR_VERSION > 4) || (TD_MINOR_VERSION > 3)
182 #pragma MARKMESSAGE("4.3 -> 4.4 : AMark : Remove preprocessor condition.");
184 { OdDbStub* m_effectiveLayerId;
185 LayerTraitsCache() : m_effectiveLayerId(
NULL) {} };
186 typedef std::map<OdDbStub*, LayerTraitsCache> LayerTraitsCacheMap;
187 mutable LayerTraitsCacheMap m_layerTraitsCache;
279 #ifdef ENABLE_GITRAITSOPTIMIZATION
280 bool m_bResetEntityTraitsData;
327 kSuppressViewportDraw = kFirstFlag << 0,
328 kDrawInvisibleEnts = kFirstFlag << 1,
329 kDrawLayerOff = kFirstFlag << 2,
330 kDrawLayerFrozen = kFirstFlag << 3,
331 kIgnoreFillPlane = kFirstFlag << 4,
332 kSelectionMode = kFirstFlag << 5,
333 kAttributesSegment = kFirstFlag << 6,
334 kXrefOverride = kFirstFlag << 7,
336 kLastFlag = kXrefOverride
360 #ifdef ENABLE_GITRAITSOPTIMIZATION
361 inline void resetEntityTraitsData();
721 bool transparency =
false,
722 double brightness = 50.0,
723 double contrast = 50.0,
731 bool bDcAligned =
true,
732 bool bAllowClipping =
false);
817 #ifdef ENABLE_GITRAITSOPTIMIZATION
820 m_bResetEntityTraitsData =
false;
832 bool bMirrorX =
false,
833 bool bMirrorY =
false);
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
#define ODGI_EXPORT_STATIC
#define SETBIT(flags, bit, value)
#define GETBIT(flags, bit)
virtual ~OdGiBaseVectorizer()
virtual void selectionMarkerOnChange(OdGsMarker nSelectionMarker)
bool isAttributesSegmentEnabled()
virtual OdDbStub * switchLayer(OdDbStub *layerId) const
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)
const OdGiDeviation & eyeDeviation() const
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
OdGiMapper * m_pCurMaterialMapper
void xline(const OdGePoint3d &firstPoint, const OdGePoint3d &secondPoint)
bool isEntityTraitsDataChanged(int bit=kSomeChanged) const
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
const OdGeVector3d * extrusion(const OdGeVector3d &normal)
const OdGeVector3d * extrusion(const OdGePoint3d &firstPoint, const OdGePoint3d &secondPoint, const OdGePoint3d &thirdPoint)
OdUInt32 m_entityTraitsDataChanged
void eyeToOutputTransform(OdGeMatrix3d &xfm) const
void setSectionable(bool bSectionableFlag)
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)
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)
const OdGeVector3d * extrusion(const OdGeVector3d *pNormal)
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)
OdGiContext * context() const
void text(const OdGePoint3d &position, const OdGeVector3d &normal, const OdGeVector3d &direction, double height, double width, double oblique, const OdString &msg)
const OdGiDrawable * currentDrawable() const
virtual void setEntityTraitsDataChanged(int bit, bool value=true)
OdGiDrawableDesc * m_pDrawableDesc
const OdGiDrawableDesc * currentDrawableDesc() const
bool effectivelyVisible() const
virtual const OdGiSubEntityTraitsData & effectiveTraits() const
OdDbStub * viewportObjectId() 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 setXrefOverride(bool bSet)
OdGiConveyorConnector * m_pActiveEntryPoint
const OdGiPathNode * currentGiPath() const
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
const OdGiMaterialTraitsData & effectiveMaterialTraitsData() 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)
OdGiSubEntityTraits & subEntityTraits() const
void polyline(OdInt32 numVertices, const OdGePoint3d *vertexList, const OdGeVector3d *pNormal=0, OdGsMarker baseSubEntMarker=-1)
void updateLayerTraits(OdGiSubEntityTraitsData &subEntityTraits) const
virtual OdGiConveyorOutput & output()
void setExtents(const OdGePoint3d *newExtents)
OdGiContext & giContext() const
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)
const OdGeVector3d * extrusion(const OdGePoint3d &origin, const OdGeVector3d &u, const OdGeVector3d &v)
void actualizeMaterialAttributes(OdDbStub *materialId) const
const OdGiDeviation & modelDeviation() 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 OdGsView * gsView() const
const OdGiSubEntityTraitsData * byBlockTraits() const
void setSelectionFlags(SelectionFlags selectionFlags)
void setByBlockTraits(const OdGiSubEntityTraitsData *pByBlock)
void setMaterial(OdDbStub *pMaterialId)
void circularArc(const OdGePoint3d ¢er, double radius, const OdGeVector3d &normal, const OdGeVector3d &startVector, double sweepAngle, OdGiArcType arcType=kOdGiArcSimple)
void setTrueColor(const OdCmEntityColor &trueColor)
void polylineDc(OdUInt32 numVertices, const OdGePoint3d *vertexList)
virtual const OdGiLayerTraitsData & effectiveLayerTraits() const
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)
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)
const OdGiConveyorContext * drawContext() const
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)
double deviation(const OdGiDeviationType deviationType, const OdGePoint3d &pointOnCurve) const
OdGiGeometry & rawGeometry() const
void setDrawContextFlags(OdUInt32 flags, bool bFlag)
void setPlotStyleNameId(OdDbStub *plotStyleNameId)
OdGiMaterialTraitsCache m_effectiveMaterialTraitsData
OdGiDgLinetypeModifiers * m_pCurLSModifiers
const OdGiDeviation & worldDeviation() const
OdUInt32 drawableAttributes() const
const OdGiViewport * giViewport() const
void setPlotStyleName(OdDb::PlotStyleNameType plotStyleNameType, OdDbStub *pPlotStyleNameId=0)
OdGsMarker selectionMarker() const
const OdGiDrawableDesc * drawableDesc() const
OdGiConveyorContext * drawContext()
void pushModelTransform(const OdGeVector3d &normal)
void setLineTypeScale(double lineTypeScale)
OdRxObjectPtr saveByBlockTraits()
void startAttributesSegment()
const OdGeMatrix3d & eyeToOutputTransform() const
static OdRxClass * desc()
OdRxObject * queryX(const OdRxClass *pProtocolClass) const
OdGsMarker m_nSelectionMarker
virtual OdUInt32 setAttributes(const OdGiDrawable *pDrawable)
OdGiViewport & viewport() const
static ODGI_EXPORT_STATIC const OdGiSubEntityTraitsData g_entityTraitsDataReset
void setFillType(OdGiFillType fillType)
OdDbStub * m_effectiveLayerId
void setContext(OdGiContext *pUserContext)
void setExtents(const OdGePoint3d *newExtents)
void getExtents(OdGeExtents3d &extents) const
OdGiRegenType regenType() const
void affectTraits(const OdGiSubEntityTraitsData *pSource, OdGiSubEntityTraitsData &destination) const
void draw(const OdGiDrawable *pDrawable)
bool isSetExtentsCalled() const
const OdGiSubEntityTraitsData & effectiveTraits() const
OdGiExtAccumPtr m_pExtAccum
bool isLayerFrozen() const
OdDbStub * lineType() const
void setLineStyleModifiers(const OdGiDgLinetypeModifiers *pLSMod)
OdGiSubEntityTraits & subEntityTraits() const
void setShadowFlags(ShadowFlags shadowFlags)
void setSectionable(bool bSectionableFlag)
void setTrueColor(const OdCmEntityColor &color)
void setSelectionFlags(SelectionFlags selectionFlags)
void setVisualStyle(const OdDbStub *visualStyleId)
virtual void setContext(OdGiContext *pUserContext)
void setTransparency(const OdCmTransparency &transparency)
const OdGiDgLinetypeModifiers * lineStyleModifiers() const
void setMapper(const OdGiMapper *pMapper)
OdGiSubEntityTraitsData m_entityTraitsData
void setColor(OdUInt16 color)
OdCmTransparency transparency() const
OdDbStub * material() const
ODRX_USING_HEAP_OPERATORS(OdGiDummyCommonDraw< OdGiWorldDraw_ >)
void setMaterial(OdDbStub *pMaterialId)
void setLayer(OdDbStub *layerId)
void setSelectionGeom(bool bSelectionFlag)
const OdGiFill * fill() const
void setFillType(OdGiFillType fillType)
OdUInt32 numberOfIsolines() const
OdGiContext * context() const
void setLineType(OdDbStub *lineTypeId)
void setFill(const OdGiFill *pFill)
void setLineTypeScale(double lineTypeScale)
void setSecondaryTrueColor(const OdCmEntityColor &color)
static OdGiContext * dummyGiContext()
void setSelectionMarker(OdGsMarker selectionMarker)
OdDb::PlotStyleNameType plotStyleNameType() const
double lineTypeScale() const
void setThickness(double thickness)
void setPlotStyleName(OdDb::PlotStyleNameType plotStyleNameType, OdDbStub *pPlotStyleNameId=0)
void setDrawFlags(OdUInt32 drawFlags)
SelectionFlags selectionFlags() const
OdGiGeometry & rawGeometry() const
OdCmEntityColor secondaryTrueColor() const
const OdGiMapper * mapper() const
void setLineWeight(OdDb::LineWeight lineWeight)
OdDbStub * plotStyleNameId() const
OdDbStub * visualStyle() const
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
FMGEOMETRY_API Body extrusion(const Profile2D &rBase, const OdGeMatrix3d &mBasePlane, const OdGeVector3d &vDir, const DeviationParams &devDeviation=FMGeGbl::gDefDev)