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_Cylinder_HeaderFile
0017 #define VrmlData_Cylinder_HeaderFile
0018
0019 #include <VrmlData_Geometry.hxx>
0020
0021
0022
0023
0024 class VrmlData_Cylinder : public VrmlData_Geometry
0025 {
0026 public:
0027
0028
0029
0030
0031
0032 inline VrmlData_Cylinder()
0033 : myRadius(1.),
0034 myHeight(2.),
0035 myHasBottom(Standard_True),
0036 myHasSide(Standard_True),
0037 myHasTop(Standard_True)
0038 {
0039 }
0040
0041
0042
0043
0044 inline VrmlData_Cylinder(const VrmlData_Scene& theScene,
0045 const char* theName,
0046 const Standard_Real theRadius = 1.,
0047 const Standard_Real theHeight = 2.)
0048 : VrmlData_Geometry(theScene, theName),
0049 myRadius(theRadius),
0050 myHeight(theHeight),
0051 myHasBottom(Standard_True),
0052 myHasSide(Standard_True),
0053 myHasTop(Standard_True)
0054 {
0055 }
0056
0057
0058
0059
0060 inline Standard_Real Radius() const { return myRadius; }
0061
0062
0063
0064
0065 inline Standard_Real Height() const { return myHeight; }
0066
0067
0068
0069
0070 inline Standard_Boolean HasBottom() const { return myHasBottom; }
0071
0072
0073
0074
0075 inline Standard_Boolean HasSide() const { return myHasSide; }
0076
0077
0078
0079
0080 inline Standard_Boolean HasTop() const { return myHasTop; }
0081
0082
0083
0084
0085 inline void SetRadius(const Standard_Real theRadius)
0086 {
0087 myRadius = theRadius;
0088 SetModified();
0089 }
0090
0091
0092
0093
0094 inline void SetHeight(const Standard_Real theHeight)
0095 {
0096 myHeight = theHeight;
0097 SetModified();
0098 }
0099
0100
0101
0102
0103 inline void SetFaces(const Standard_Boolean hasBottom,
0104 const Standard_Boolean hasSide,
0105 const Standard_Boolean hasTop)
0106 {
0107 myHasBottom = hasBottom;
0108 myHasSide = hasSide;
0109 myHasTop = hasTop;
0110 SetModified();
0111 }
0112
0113
0114
0115
0116
0117 Standard_EXPORT virtual const Handle(TopoDS_TShape)& TShape() Standard_OVERRIDE;
0118
0119
0120
0121
0122
0123
0124 Standard_EXPORT virtual Handle(VrmlData_Node) Clone(const Handle(VrmlData_Node)& theOther) const
0125 Standard_OVERRIDE;
0126
0127
0128
0129
0130 Standard_EXPORT virtual VrmlData_ErrorStatus Read(VrmlData_InBuffer& theBuffer) Standard_OVERRIDE;
0131
0132
0133
0134
0135 Standard_EXPORT virtual VrmlData_ErrorStatus Write(const char* thePrefix) const Standard_OVERRIDE;
0136
0137 protected:
0138
0139
0140 private:
0141
0142 Standard_Real myRadius;
0143 Standard_Real myHeight;
0144 Standard_Boolean myHasBottom : 1;
0145 Standard_Boolean myHasSide : 1;
0146 Standard_Boolean myHasTop : 1;
0147
0148 public:
0149
0150 DEFINE_STANDARD_RTTI_INLINE(VrmlData_Cylinder, VrmlData_Geometry)
0151 };
0152
0153
0154 DEFINE_STANDARD_HANDLE(VrmlData_Cylinder, VrmlData_Geometry)
0155
0156 #endif