CFx SDK Documentation  2023 SP0
DbBlockReference.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 #ifndef _OD_BLOCK_REFERENCE_
25 #define _OD_BLOCK_REFERENCE_
26 
27 #include "TD_PackPush.h"
28 
29 #include "DbEntity.h"
30 #include "DbDatabase.h"
31 #include "Ge/GeMatrix3d.h"
32 #include "DbObjectIterator.h"
33 
34 class OdGeScale3d;
35 class OdDbAttribute;
36 class OdDbSequenceEnd;
37 class OdDbBlockReferenceImpl;
42 
47 
57 {
58 public:
60 
62 
67 
73  virtual void setBlockTableRecord(
74  OdDbObjectId objectId);
75 
79  virtual OdGePoint3d position() const;
80 
86  virtual void setPosition(
87  const OdGePoint3d& position);
88 
93 
105  virtual void setScaleFactors(
106  const OdGeScale3d& scale);
107 
118  double rotation() const;
119 
132  virtual void setRotation(
133  double angle);
134 
139 
145  virtual void setNormal(
146  const OdGeVector3d& normal);
147 
152  virtual bool isPlanar() const { return true; }
153 
171  OdGePlane& plane,
172  OdDb::Planarity& planarity) const;
173 
184 
197  const OdGeMatrix3d& xfm);
198 
214  OdDbAttribute* pAttr);
215 
227  OdDbObjectId ObjId,
228  OdDb::OpenMode mode,
229  bool openErasedOne = false);
230 
244  OdDb::OpenMode mode);
245 
250 
268  OdDbBlockTableRecord *BlockRecord,
269  OdDbObjectIdArray *ids = 0);
270 
285  OdGiDrawableTraits* pTraits) const;
286 
293  virtual bool subWorldDraw(
294  OdGiWorldDraw* pWd) const;
295 
302  virtual void subViewportDraw(OdGiViewportDraw* pVd) const;
303 
321  OdDbDwgFiler* pFiler);
322 
335  virtual void dwgOutFields(
336  OdDbDwgFiler* pFiler) const;
337 
355  OdDbDxfFiler* pFiler);
356 
373  virtual void dxfOutFields(
374  OdDbDxfFiler* pFiler) const;
375 
393 
407  virtual void dxfOutFields_R12(
408  OdDbDxfFiler* pFiler) const;
409 
420  virtual OdResult dxfIn(
421  OdDbDxfFiler* pFiler);
422 
432  virtual void dxfOut(
433  OdDbDxfFiler* pFiler) const;
434 
448  void subClose();
449 
454  void* pClsid) const;
455 
465  const OdGeMatrix3d& xfm) ODRX_OVERRIDE;
466 
474  const OdGeMatrix3d& xfm,
475  OdDbEntityPtr& pCopy) const ODRX_OVERRIDE;
476 
477  /* Replace OdRxObjectPtrArray */
487  OdRxObjectPtrArray& entitySet) const ODRX_OVERRIDE;
488 
508  OdDbObject* pNewObject);
509 
516  OdGeExtents3d& extents) const;
517 
536 
541  virtual bool treatAsOdDbBlockRefForExplode() const;
542 
552  const OdGeMatrix3d& parentXform = OdGeMatrix3d::kIdentity) const;
553 
561  virtual OdResult explodeToOwnerSpace() const;
562 
573  virtual void copyFrom(const OdRxObject* pSrc) ODRX_OVERRIDE;
574 
584 
599  OdGsMarker gsMark,
600  const OdGePoint3d& pickPoint,
601  const OdGeMatrix3d& viewXform,
602  OdDbFullSubentPathArray& subentPaths,
603  const OdDbObjectIdArray* pEntAndInsertStack) const ODRX_OVERRIDE;
604 
615  OdGsMarkerArray& gsMarkers) const ODRX_OVERRIDE;
616 };
621 
622 TOOLKIT_EXPORT void decompTransform( //FELIX_CHANGE //From ODA "develop"
623  const OdGeMatrix3d& mTrans,
624  OdGePoint3d& pOrigin,
625  OdGeScale3d& sScale,
626  double & dRotation,
627  OdGeVector3d& vNormal );
628 
629 #include "TD_PackPop.h"
630 
631 #endif
632 
OdSmartPtr< OdDbSequenceEnd > OdDbSequenceEndPtr
OdSmartPtr< OdDbAttribute > OdDbAttributePtr
TOOLKIT_EXPORT void decompTransform(const OdGeMatrix3d &mTrans, OdGePoint3d &pOrigin, OdGeScale3d &sScale, double &dRotation, OdGeVector3d &vNormal)
OdSmartPtr< OdDbBlockReference > OdDbBlockReferencePtr
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
scale
Definition: DimVarDefs.h:1684
ptrdiff_t OdGsMarker
unsigned int OdUInt32
#define ODRX_SEALED_VIRTUAL
#define ODRX_OVERRIDE
OdResult
Definition: OdResult.h:29
OdGeScale3d scaleFactors() const
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
OdResult subGetGeomExtents(OdGeExtents3d &extents) const
OdUInt32 subSetAttributes(OdGiDrawableTraits *pTraits) const
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
OdDbObjectIteratorPtr attributeIterator() const
virtual OdResult setBlockTransform(const OdGeMatrix3d &xfm)
virtual void dxfOut(OdDbDxfFiler *pFiler) const
virtual void dxfOutFields_R12(OdDbDxfFiler *pFiler) const
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
virtual void setScaleFactors(const OdGeScale3d &scale)
virtual OdResult subGetClassID(void *pClsid) const
OdResult geomExtentsBestFit(OdGeExtents3d &extents, const OdGeMatrix3d &parentXform=OdGeMatrix3d::kIdentity) const
virtual bool subWorldDraw(OdGiWorldDraw *pWd) const
virtual OdResult getPlane(OdGePlane &plane, OdDb::Planarity &planarity) const
ODRX_SEALED_VIRTUAL OdResult subGetSubentPathsAtGsMarker(OdDb::SubentType type, OdGsMarker gsMark, const OdGePoint3d &pickPoint, const OdGeMatrix3d &viewXform, OdDbFullSubentPathArray &subentPaths, const OdDbObjectIdArray *pEntAndInsertStack) const ODRX_OVERRIDE
virtual OdResult dxfIn(OdDbDxfFiler *pFiler)
OdDbObjectId appendAttribute(OdDbAttribute *pAttr)
virtual OdResult subGetTransformedCopy(const OdGeMatrix3d &xfm, OdDbEntityPtr &pCopy) const ODRX_OVERRIDE
OdDbObjectId blockTableRecord() const
virtual OdResult subTransformBy(const OdGeMatrix3d &xfm) ODRX_OVERRIDE
virtual void subViewportDraw(OdGiViewportDraw *pVd) const
OdDbAttributePtr openAttribute(OdDbObjectId ObjId, OdDb::OpenMode mode, bool openErasedOne=false)
virtual OdResult explodeToOwnerSpace() const
virtual OdGePoint3d position() const
OdDbSequenceEndPtr openSequenceEnd(OdDb::OpenMode mode)
OdGeVector3d normal() const
ODDB_DECLARE_MEMBERS(OdDbBlockReference)
virtual void copyFrom(const OdRxObject *pSrc) ODRX_OVERRIDE
virtual OdResult explodeToBlock(OdDbBlockTableRecord *BlockRecord, OdDbObjectIdArray *ids=0)
virtual bool treatAsOdDbBlockRefForExplode() const
virtual void setNormal(const OdGeVector3d &normal)
ODRX_SEALED_VIRTUAL OdResult subGetGsMarkersAtSubentPath(const OdDbFullSubentPath &subPath, OdGsMarkerArray &gsMarkers) const ODRX_OVERRIDE
virtual OdResult dxfInFields_R12(OdDbDxfFiler *pFiler)
void subHandOverTo(OdDbObject *pNewObject)
double rotation() const
virtual void setPosition(const OdGePoint3d &position)
virtual void setBlockTableRecord(OdDbObjectId objectId)
OdGeMatrix3d blockTransform() const
ODRX_SEALED_VIRTUAL OdResult subGetCompoundObjectTransform(OdGeMatrix3d &xM) const ODRX_OVERRIDE
virtual bool isPlanar() const
OdResult explodeGeometry(OdRxObjectPtrArray &entitySet) const
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
virtual void setRotation(double angle)
virtual OdResult subExplode(OdRxObjectPtrArray &entitySet) const ODRX_OVERRIDE
static GE_STATIC_EXPORT const OdGeMatrix3d kIdentity
Definition: GeMatrix3d.h:79
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
Planarity
Definition: DbEntity.h:74
OpenMode
Definition: DbObjectId.h:54