0031550: Data Exchange, STEP Import - surface transparency is ignored (SURFACE_STYLE_...
[occt.git] / src / RWStepVisual / RWStepVisual_RWSurfaceStyleReflectanceAmbient.cxx
1 // Created on : Thu May 14 15:13:19 2020
2 // Created by: Igor KHOZHANOV
3 // Generator:   Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
4 // Copyright (c) Open CASCADE 2020
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #include <RWStepVisual_RWSurfaceStyleReflectanceAmbient.hxx>
18 #include <Interface_EntityIterator.hxx>
19 #include <StepData_StepReaderData.hxx>
20 #include <StepData_StepWriter.hxx>
21 #include <StepVisual_SurfaceStyleReflectanceAmbient.hxx>
22 #include <Standard_Real.hxx>
23
24 //=======================================================================
25 //function : RWStepVisual_RWSurfaceStyleReflectanceAmbient
26 //purpose  :
27 //=======================================================================
28
29 RWStepVisual_RWSurfaceStyleReflectanceAmbient::RWStepVisual_RWSurfaceStyleReflectanceAmbient() {}
30
31
32 //=======================================================================
33 //function : ReadStep
34 //purpose  :
35 //=======================================================================
36
37 void RWStepVisual_RWSurfaceStyleReflectanceAmbient::ReadStep (const Handle(StepData_StepReaderData)& data,
38                                                               const Standard_Integer num,
39                                                               Handle(Interface_Check)& ach,
40                                                               const Handle(StepVisual_SurfaceStyleReflectanceAmbient)& ent) const
41 {
42   // Check number of parameters
43   if ( ! data->CheckNbParams(num,1,ach,"surface_style_reflectance_ambient") ) return;
44
45   // Own fields of SurfaceStyleReflectanceAmbient
46
47   Standard_Real aAmbientReflectance;
48   data->ReadReal (num, 1, "ambient_reflectance", ach, aAmbientReflectance);
49
50   // Initialize entity
51   ent->Init(aAmbientReflectance);
52 }
53
54 //=======================================================================
55 //function : WriteStep
56 //purpose  :
57 //=======================================================================
58
59 void RWStepVisual_RWSurfaceStyleReflectanceAmbient::WriteStep (StepData_StepWriter& SW,
60                                                                const Handle(StepVisual_SurfaceStyleReflectanceAmbient)& ent) const
61 {
62
63   // Own fields of SurfaceStyleReflectanceAmbient
64
65   SW.Send (ent->AmbientReflectance());
66 }
67
68 //=======================================================================
69 //function : Share
70 //purpose  :
71 //=======================================================================
72
73 void RWStepVisual_RWSurfaceStyleReflectanceAmbient::Share (const Handle(StepVisual_SurfaceStyleReflectanceAmbient)& ,
74                                                            Interface_EntityIterator& ) const
75 {
76
77   // Own fields of SurfaceStyleReflectanceAmbient
78 }