File indexing completed on 2026-09-27 09:19:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef VrmlData_Material_HeaderFile
0017 #define VrmlData_Material_HeaderFile
0018
0019 #include <VrmlData_Node.hxx>
0020 #include <Quantity_Color.hxx>
0021
0022
0023
0024
0025 class VrmlData_Material : public VrmlData_Node
0026 {
0027 public:
0028
0029
0030
0031
0032
0033 Standard_EXPORT VrmlData_Material();
0034
0035
0036
0037
0038 Standard_EXPORT VrmlData_Material(const VrmlData_Scene& theScene,
0039 const char* theName,
0040 const double theAmbientIntensity = -1.,
0041 const double theShininess = -1.,
0042 const double theTransparency = -1.);
0043
0044
0045
0046
0047 inline double AmbientIntensity() const { return myAmbientIntensity; }
0048
0049
0050
0051
0052 inline double Shininess() const { return myShininess; }
0053
0054
0055
0056
0057 inline double Transparency() const { return myTransparency; }
0058
0059
0060
0061
0062 inline const Quantity_Color& AmbientColor() const { return myAmbientColor; }
0063
0064
0065
0066
0067 inline const Quantity_Color& DiffuseColor() const { return myDiffuseColor; }
0068
0069
0070
0071
0072 inline const Quantity_Color& EmissiveColor() const { return myEmissiveColor; }
0073
0074
0075
0076
0077 inline const Quantity_Color& SpecularColor() const { return mySpecularColor; }
0078
0079
0080
0081
0082 inline void SetAmbientIntensity(const double theAmbientIntensity)
0083 {
0084 myAmbientIntensity = theAmbientIntensity;
0085 }
0086
0087
0088
0089
0090 inline void SetShininess(const double theShininess) { myShininess = theShininess; }
0091
0092
0093
0094
0095 inline void SetTransparency(const double theTransparency) { myTransparency = theTransparency; }
0096
0097
0098
0099
0100 inline void SetAmbientColor(const Quantity_Color& theColor) { myAmbientColor = theColor; }
0101
0102
0103
0104
0105 inline void SetDiffuseColor(const Quantity_Color& theColor) { myDiffuseColor = theColor; }
0106
0107
0108
0109
0110 inline void SetEmissiveColor(const Quantity_Color& theColor) { myEmissiveColor = theColor; }
0111
0112
0113
0114
0115 inline void SetSpecularColor(const Quantity_Color& theColor) { mySpecularColor = theColor; }
0116
0117
0118
0119
0120
0121
0122 Standard_EXPORT occ::handle<VrmlData_Node> Clone(
0123 const occ::handle<VrmlData_Node>& theOther) const override;
0124
0125
0126
0127
0128 Standard_EXPORT VrmlData_ErrorStatus Read(VrmlData_InBuffer& theBuffer) override;
0129
0130
0131
0132
0133 Standard_EXPORT VrmlData_ErrorStatus Write(const char* thePrefix) const override;
0134
0135
0136
0137
0138 Standard_EXPORT bool IsDefault() const override;
0139
0140 private:
0141
0142
0143 double myAmbientIntensity;
0144 double myShininess;
0145 double myTransparency;
0146 Quantity_Color myAmbientColor;
0147 Quantity_Color myDiffuseColor;
0148 Quantity_Color myEmissiveColor;
0149 Quantity_Color mySpecularColor;
0150
0151 public:
0152
0153 DEFINE_STANDARD_RTTIEXT(VrmlData_Material, VrmlData_Node)
0154 };
0155
0156
0157 #endif