File indexing completed on 2025-01-18 10:05:32
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 Standard_EXPORT VrmlData_Group
0058 (const VrmlData_Scene& theScene,
0059 const char * theName,
0060 const Standard_Boolean isTransform = Standard_False);
0061
0062
0063
0064
0065 inline Handle(VrmlData_Node)&
0066 AddNode (const Handle(VrmlData_Node)& theNode)
0067 { return myNodes.Append(theNode); }
0068
0069
0070
0071
0072
0073
0074 Standard_EXPORT Standard_Boolean
0075 RemoveNode (const Handle(VrmlData_Node)& theNode);
0076
0077
0078
0079
0080 inline Iterator
0081 NodeIterator () const { return Iterator (myNodes); }
0082
0083
0084
0085
0086 inline const Bnd_B3f&
0087 Box () const { return myBox; }
0088
0089
0090
0091
0092 inline void SetBox (const Bnd_B3f& theBox) { myBox = theBox; }
0093
0094
0095
0096
0097
0098 Standard_EXPORT Standard_Boolean
0099 SetTransform (const gp_Trsf& theTrsf);
0100
0101
0102
0103
0104
0105 inline const gp_Trsf&
0106 GetTransform () const { return myTrsf; }
0107
0108
0109
0110
0111 inline Standard_Boolean
0112 IsTransform () const { return myIsTransform; }
0113
0114
0115
0116
0117
0118
0119 Standard_EXPORT virtual Handle(VrmlData_Node)
0120 Clone (const Handle(VrmlData_Node)& theOther) const Standard_OVERRIDE;
0121
0122
0123
0124
0125 Standard_EXPORT virtual VrmlData_ErrorStatus
0126 Read (VrmlData_InBuffer& theBuffer) Standard_OVERRIDE;
0127
0128
0129
0130
0131 Standard_EXPORT virtual VrmlData_ErrorStatus
0132 Write (const char * thePrefix) const Standard_OVERRIDE;
0133
0134
0135
0136
0137
0138
0139
0140
0141 Standard_EXPORT Handle(VrmlData_Node)
0142 FindNode (const char * theName,
0143 gp_Trsf& theLocation) const;
0144
0145
0146
0147
0148 Standard_EXPORT void
0149 Shape (TopoDS_Shape& theShape,
0150 VrmlData_DataMapOfShapeAppearance * pMapApp);
0151
0152 protected:
0153
0154
0155
0156
0157
0158
0159 Standard_EXPORT VrmlData_ErrorStatus
0160 openFile (Standard_IStream& theStream,
0161 const TCollection_AsciiString& theFilename);
0162
0163 private:
0164
0165
0166 Standard_Boolean myIsTransform;
0167 VrmlData_ListOfNode myNodes;
0168 Bnd_B3f myBox;
0169 gp_Trsf myTrsf;
0170
0171 public:
0172
0173 DEFINE_STANDARD_RTTIEXT(VrmlData_Group,VrmlData_Node)
0174 };
0175
0176
0177 DEFINE_STANDARD_HANDLE (VrmlData_Group, VrmlData_Node)
0178
0179
0180 #endif