File indexing completed on 2026-09-09 09:17:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef VrmlData_Group_HeaderFile
0017 #define VrmlData_Group_HeaderFile
0018
0019 #include <VrmlData_ListOfNode.hxx>
0020 #include <VrmlData_DataMapOfShapeAppearance.hxx>
0021 #include <Bnd_B3f.hxx>
0022 #include <gp_Trsf.hxx>
0023
0024 class TopoDS_Shape;
0025
0026
0027
0028
0029
0030 class VrmlData_Group : public VrmlData_Node
0031 {
0032 public:
0033 typedef VrmlData_ListOfNode::Iterator Iterator;
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044 VrmlData_Group(const Standard_Boolean isTransform = Standard_False)
0045 : myIsTransform(isTransform)
0046 {
0047 }
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058 Standard_EXPORT VrmlData_Group(const VrmlData_Scene& theScene,
0059 const char* theName,
0060 const Standard_Boolean isTransform = Standard_False);
0061
0062
0063
0064
0065 inline Handle(VrmlData_Node)& AddNode(const Handle(VrmlData_Node)& theNode)
0066 {
0067 return myNodes.Append(theNode);
0068 }
0069
0070
0071
0072
0073
0074
0075 Standard_EXPORT Standard_Boolean RemoveNode(const Handle(VrmlData_Node)& theNode);
0076
0077
0078
0079
0080 inline Iterator NodeIterator() const { return Iterator(myNodes); }
0081
0082
0083
0084
0085 inline const Bnd_B3f& Box() const { return myBox; }
0086
0087
0088
0089
0090 inline void SetBox(const Bnd_B3f& theBox) { myBox = theBox; }
0091
0092
0093
0094
0095
0096 Standard_EXPORT Standard_Boolean SetTransform(const gp_Trsf& theTrsf);
0097
0098
0099
0100
0101
0102 inline const gp_Trsf& GetTransform() const { return myTrsf; }
0103
0104
0105
0106
0107 inline Standard_Boolean IsTransform() const { return myIsTransform; }
0108
0109
0110
0111
0112
0113
0114 Standard_EXPORT virtual Handle(VrmlData_Node) Clone(const Handle(VrmlData_Node)& theOther) const
0115 Standard_OVERRIDE;
0116
0117
0118
0119
0120 Standard_EXPORT virtual VrmlData_ErrorStatus Read(VrmlData_InBuffer& theBuffer) Standard_OVERRIDE;
0121
0122
0123
0124
0125 Standard_EXPORT virtual VrmlData_ErrorStatus Write(const char* thePrefix) const Standard_OVERRIDE;
0126
0127
0128
0129
0130
0131
0132
0133
0134 Standard_EXPORT Handle(VrmlData_Node) FindNode(const char* theName, gp_Trsf& theLocation) const;
0135
0136
0137
0138
0139 Standard_EXPORT void Shape(TopoDS_Shape& theShape, VrmlData_DataMapOfShapeAppearance* pMapApp);
0140
0141 protected:
0142
0143
0144
0145
0146
0147
0148 Standard_EXPORT VrmlData_ErrorStatus openFile(Standard_IStream& theStream,
0149 const TCollection_AsciiString& theFilename);
0150
0151 private:
0152
0153
0154 Standard_Boolean myIsTransform;
0155 VrmlData_ListOfNode myNodes;
0156 Bnd_B3f myBox;
0157 gp_Trsf myTrsf;
0158
0159 public:
0160
0161 DEFINE_STANDARD_RTTIEXT(VrmlData_Group, VrmlData_Node)
0162 };
0163
0164
0165 DEFINE_STANDARD_HANDLE(VrmlData_Group, VrmlData_Node)
0166
0167 #endif