CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
FxBIMEntityGeometry.h
Go to the documentation of this file.
1//
2// (C) Copyright 2020-2023 by Graebert GmbH.
3//
4// Permission to use, copy, modify, and distribute this software in
5// object code form for any purpose and without fee is hereby granted,
6// provided that the above copyright notice appears in all copies and
7// that both that copyright notice and the limited warranty and
8// restricted rights notice below appear in all supporting
9// documentation.
10//
11// GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12// GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15// UNINTERRUPTED OR ERROR FREE.
16
17#pragma once
18
19#include "FxBIM.h"
20
21#include <DbObjectId.h>
22#include <RxObject.h>
23#include <Ge/GeExtents3d.h>
24#include <Ge/GePoint3dArray.h>
25#include <Gi/GiWorldDraw.h>
26#include <Modeler/FMMdlBody.h>
27
28class CFxBIMEntity;
29class CFxBIMEntityImpl;
30class CFxBIMEntityGeometryImpl;
31
33typedef std::shared_ptr< CFxBIMEntityGeometry > CFxBIMEntityGeometryPtr;
34
35class CFxBIMEntity;
37
39{
40 friend class CFxBIMEntityImpl;
41 friend class CFxBIMEntityGeometryImpl;
42public:
43 const CFxBIMEntityPtr Entity() const;
45
46 enum EType
47 {
48 e3D = 0,
49 e2D = 1,
50 };
51
53 {
54 EType _type = e3D;
56
57 static const EGeoType k3D;
58 static const EGeoType k2DPlan;
59 };
60
62 OdString MaterialNameEx( OdDbObjectId& idMaterial, bool& bHasMultiBimMaterial ) const;
63
64 std::set< OdDbObjectId > GetMaterial() const;
65 void SetMaterial( const OdString& material );
66 void SetMaterial( OdDbObjectId idMaterial );
67
68 Error Draw( OdGiWorldDraw* wd, EGeoType type = EGeoType::k3D ) const;
69 Error Explode( OdRxObjectPtrArray& entitySet ) const;
70 Error Extents( OdGeExtents3d& extents, EGeoType type = EGeoType::k3D ) const; //Non-transformed extents
71
72 void SnapPoints( OdDb::OsnapMode osnapMode,
73 OdGsMarker gsSelectionMark,
74 const OdGePoint3d& pickPoint,
75 const OdGePoint3d& lastPoint,
76 const OdGeMatrix3d& xWorldToEye,
77 OdGePoint3dArray& snapPointsECS ) const;
78
79 void RemoveFromGS() const;
80
81 struct FxBody
82 {
85 };
86
87 const std::vector< FxBody >& Bodies() const;
88
89 bool IsEmpty( EGeoType type = EGeoType::k3D ) const;
90 void Generate();
91
92protected:
93 explicit CFxBIMEntityGeometry( CFxBIMEntityImpl* pEntityImpl );
94
95protected:
96 std::shared_ptr< CFxBIMEntityGeometryImpl > m_pImpl;
97 CFxBIMEntityImpl* m_pEntityImpl = nullptr;
98};
Error
Definition: FxBIM.h:66
#define FXBIM_COMMON_CODE_API
Definition: FxBIM.h:21
std::shared_ptr< CFxBIMEntityGeometry > CFxBIMEntityGeometryPtr
OdSmartPtr< CFxBIMEntity > CFxBIMEntityPtr
ptrdiff_t OdGsMarker
Error Explode(OdRxObjectPtrArray &entitySet) const
Error Extents(OdGeExtents3d &extents, EGeoType type=EGeoType::k3D) const
OdString MaterialName() const
const std::vector< FxBody > & Bodies() const
OdString MaterialNameEx(OdDbObjectId &idMaterial, bool &bHasMultiBimMaterial) const
CFxBIMEntityPtr Entity()
void SetMaterial(OdDbObjectId idMaterial)
void SetMaterial(const OdString &material)
void RemoveFromGS() const
Error Draw(OdGiWorldDraw *wd, EGeoType type=EGeoType::k3D) const
void SnapPoints(OdDb::OsnapMode osnapMode, OdGsMarker gsSelectionMark, const OdGePoint3d &pickPoint, const OdGePoint3d &lastPoint, const OdGeMatrix3d &xWorldToEye, OdGePoint3dArray &snapPointsECS) const
bool IsEmpty(EGeoType type=EGeoType::k3D) const
std::set< OdDbObjectId > GetMaterial() const
CFxBIMEntityGeometry(CFxBIMEntityImpl *pEntityImpl)
std::shared_ptr< CFxBIMEntityGeometryImpl > m_pImpl
const CFxBIMEntityPtr Entity() const
static GE_STATIC_EXPORT const OdGeVector3d kZAxis
Definition: GeVector3d.h:103
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
OsnapMode
Definition: OdaDefs.h:489