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_Color_HeaderFile
0017 #define VrmlData_Color_HeaderFile
0018
0019 #include <VrmlData_ArrayVec3d.hxx>
0020 #include <Quantity_Color.hxx>
0021 #include <gp_XYZ.hxx>
0022
0023
0024
0025
0026 class VrmlData_Color : public VrmlData_ArrayVec3d
0027 {
0028 public:
0029
0030
0031
0032
0033
0034 inline VrmlData_Color () {}
0035
0036
0037
0038
0039 inline VrmlData_Color (const VrmlData_Scene& theScene,
0040 const char * theName,
0041 const size_t nColors =0,
0042 const gp_XYZ * arrColors=0L)
0043 : VrmlData_ArrayVec3d (theScene, theName, nColors, arrColors)
0044 {}
0045
0046
0047
0048
0049
0050
0051
0052
0053 inline const Quantity_Color Color (const Standard_Integer i) const
0054 { return Quantity_Color (Value(i).X(), Value(i).Y(), Value(i).Z(),
0055 Quantity_TOC_sRGB); }
0056
0057
0058
0059
0060 inline void SetColors (const size_t nColors,
0061 const gp_XYZ * arrColors)
0062 { myLength = nColors; myArray = arrColors; }
0063
0064
0065
0066
0067
0068
0069 Standard_EXPORT virtual Handle(VrmlData_Node)
0070 Clone (const Handle(VrmlData_Node)& theOther)const Standard_OVERRIDE;
0071
0072
0073
0074
0075 Standard_EXPORT virtual VrmlData_ErrorStatus
0076 Read (VrmlData_InBuffer& theBuffer) Standard_OVERRIDE;
0077
0078
0079
0080
0081 Standard_EXPORT virtual VrmlData_ErrorStatus
0082 Write (const char * thePrefix) const Standard_OVERRIDE;
0083
0084 private:
0085
0086
0087
0088
0089
0090 public:
0091
0092 DEFINE_STANDARD_RTTI_INLINE(VrmlData_Color,VrmlData_ArrayVec3d)
0093 };
0094
0095
0096 DEFINE_STANDARD_HANDLE (VrmlData_Color, VrmlData_ArrayVec3d)
0097
0098
0099 #endif