1 // File generated by CPPExt (Transient)
3 // Copyright (C) 1991,1995 by
5 // MATRA DATAVISION, FRANCE
7 // This software is furnished in accordance with the terms and conditions
8 // of the contract and with the inclusion of the above copyright notice.
9 // This software or any other copy thereof may not be provided or otherwise
10 // be made available to any other person. No title to an ownership of the
11 // software is hereby transferred.
13 // At the termination of the contract, the software and all copies of this
14 // software must be deleted.
16 #ifndef _SMDS_MeshElement_HeaderFile
17 #define _SMDS_MeshElement_HeaderFile
19 #ifndef _Standard_HeaderFile
20 #include <Standard.hxx>
22 #ifndef _Handle_SMDS_MeshElement_HeaderFile
23 #include "Handle_SMDS_MeshElement.hxx"
26 #ifndef _Standard_Integer_HeaderFile
27 #include <Standard_Integer.hxx>
29 #ifndef _SMDSAbs_ElementType_HeaderFile
30 #include "SMDSAbs_ElementType.hxx"
32 #ifndef _Handle_TColgp_HArray1OfDir_HeaderFile
33 #include "Handle_TColgp_HArray1OfDir.hxx"
35 #ifndef _SMDS_MeshObject_HeaderFile
36 #include "SMDS_MeshObject.hxx"
38 #ifndef _Standard_Boolean_HeaderFile
39 #include <Standard_Boolean.hxx>
41 #ifndef _Standard_Address_HeaderFile
42 #include <Standard_Address.hxx>
44 #ifndef _Standard_Real_HeaderFile
45 #include <Standard_Real.hxx>
47 #ifndef _Standard_OStream_HeaderFile
48 #include <Standard_OStream.hxx>
50 class TColgp_HArray1OfDir;
51 class Standard_OutOfRange;
52 class SMDS_ListOfMeshElement;
57 class SMDS_MeshElement : public SMDS_MeshObject {
61 inline void* operator new(size_t,void* anAddress)
65 inline void* operator new(size_t size)
67 return Standard::Allocate(size);
69 inline void operator delete(void *anAddress)
71 if (anAddress) Standard::Free((Standard_Address&)anAddress);
73 // inline void operator delete(void *anAddress, size_t size)
75 // if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
79 Standard_EXPORT inline Standard_Integer HashCode(const Standard_Integer Upper) const;
80 Standard_EXPORT inline Standard_Boolean IsSame(const Handle(SMDS_MeshElement)& other) const;
81 Standard_EXPORT inline Standard_Boolean IsEqual(const Handle(SMDS_MeshElement)& other) const;
82 Standard_EXPORT inline Standard_Boolean IsNodeInElement(const Standard_Integer idnode) const;
83 Standard_EXPORT virtual void GetEdgeDefinedByNodes(const Standard_Integer rank,Standard_Integer& idnode1,Standard_Integer& idnode2) const;
84 Standard_EXPORT virtual void GetFaceDefinedByNodes(const Standard_Integer rank,const Standard_Address idnode,Standard_Integer& nb) const;
85 Standard_EXPORT virtual Standard_Integer GetConnection(const Standard_Integer rank) const;
86 Standard_EXPORT virtual void AddInverseElement(const Handle(SMDS_MeshElement)& ME) ;
87 Standard_EXPORT virtual const SMDS_ListOfMeshElement& InverseElements() const;
88 Standard_EXPORT virtual void ClearInverseElements() ;
89 Standard_EXPORT inline Standard_Integer NbNodes() const;
90 Standard_EXPORT virtual Standard_Integer NbEdges() const;
91 Standard_EXPORT virtual Standard_Integer NbFaces() const;
92 Standard_EXPORT inline Standard_Integer GetID() const;
93 Standard_EXPORT virtual Standard_Integer GetKey() const = 0;
94 Standard_EXPORT virtual void SetNormal(const Standard_Integer rank,const Standard_Real vx,const Standard_Real vy,const Standard_Real vz) ;
95 Standard_EXPORT virtual void SetNormal(const Standard_Integer rank,const gp_Vec& v) ;
96 Standard_EXPORT virtual gp_Dir GetNormal(const Standard_Integer rank) ;
97 Standard_EXPORT virtual void Print(Standard_OStream& OS) const;
98 friend Standard_EXPORT Standard_OStream& operator << (Standard_OStream& OS, const Handle(SMDS_MeshElement)& );
99 Standard_EXPORT inline SMDSAbs_ElementType GetType() const;
100 Standard_EXPORT ~SMDS_MeshElement();
107 Standard_EXPORT friend Handle_Standard_Type& SMDS_MeshElement_Type_();
108 Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
109 Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
115 Standard_EXPORT SMDS_MeshElement(const Standard_Integer ID,const Standard_Integer NbConnections,const SMDSAbs_ElementType Type);
116 Standard_EXPORT virtual Standard_Address GetConnections() const;
121 Standard_Integer myID;
122 Standard_Integer myNbNodes;
123 Handle_TColgp_HArray1OfDir myNormals;
134 SMDSAbs_ElementType myType;
140 #include "SMDS_MeshElement.lxx"
144 // other inline functions and methods (like "C++: function call" methods)