0030520: VIS - IVtkTools_ShapePicker::GetPickPosition() returns incorrect point
[occt.git] / src / VrmlConverter / VrmlConverter_ShadingAspect.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14
15 #include <Standard_Type.hxx>
16 #include <Vrml_Material.hxx>
17 #include <Vrml_ShapeHints.hxx>
18 #include <VrmlConverter_ShadingAspect.hxx>
19
20 IMPLEMENT_STANDARD_RTTIEXT(VrmlConverter_ShadingAspect,Standard_Transient)
21
22 VrmlConverter_ShadingAspect::VrmlConverter_ShadingAspect()
23 {
24  Handle(Vrml_Material) m = new Vrml_Material;
25  Vrml_ShapeHints sh;
26  myFrontMaterial = m;
27  myShapeHints = sh;
28  myHasNormals = Standard_False;
29  myHasMaterial = Standard_False;
30 }
31 void VrmlConverter_ShadingAspect::SetFrontMaterial(const Handle(Vrml_Material)& aMaterial)
32 {
33  myFrontMaterial = aMaterial;
34 }
35
36 Handle(Vrml_Material) VrmlConverter_ShadingAspect::FrontMaterial() const 
37 {
38  return myFrontMaterial;
39 }
40
41 void VrmlConverter_ShadingAspect::SetShapeHints(const Vrml_ShapeHints& aShapeHints)
42 {
43  myShapeHints = aShapeHints;
44 }
45
46 Vrml_ShapeHints VrmlConverter_ShadingAspect::ShapeHints() const 
47 {
48  return  myShapeHints;
49 }
50
51 void VrmlConverter_ShadingAspect::SetHasNormals(const Standard_Boolean OnOff)
52 {
53  myHasNormals = OnOff; 
54 }
55
56 Standard_Boolean VrmlConverter_ShadingAspect::HasNormals() const 
57 {
58  return myHasNormals;
59 }
60
61 void VrmlConverter_ShadingAspect::SetHasMaterial(const Standard_Boolean OnOff)
62 {
63  myHasMaterial = OnOff;
64
65 }
66
67 Standard_Boolean VrmlConverter_ShadingAspect::HasMaterial() const 
68 {
69  return myHasMaterial;
70 }