1 // Created on: 1997-03-12
2 // Created by: Alexander BRIVIN
3 // Copyright (c) 1997-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _VrmlConverter_ShadingAspect_HeaderFile
18 #define _VrmlConverter_ShadingAspect_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Vrml_ShapeHints.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Transient.hxx>
27 class Vrml_ShapeHints;
30 class VrmlConverter_ShadingAspect;
31 DEFINE_STANDARD_HANDLE(VrmlConverter_ShadingAspect, Standard_Transient)
33 //! qualifies the aspect properties for
34 //! the VRML conversation of ShadedShape .
35 class VrmlConverter_ShadingAspect : public Standard_Transient
41 //! create a default ShadingAspect.
42 Standard_EXPORT VrmlConverter_ShadingAspect();
44 Standard_EXPORT void SetFrontMaterial (const Handle(Vrml_Material)& aMaterial);
46 Standard_EXPORT Handle(Vrml_Material) FrontMaterial() const;
48 Standard_EXPORT void SetShapeHints (const Vrml_ShapeHints& aShapeHints);
50 Standard_EXPORT Vrml_ShapeHints ShapeHints() const;
52 //! defines necessary of a calculation of normals for ShadedShape to more
53 //! accurately display curved surfaces, pacticularly when smoooth or phong
54 //! shading is used in VRML viewer.
55 //! By default False - the normals are not calculated,
56 //! True - the normals are calculated.
57 //! Warning: If normals are calculated the resulting VRML file will
58 //! be substantially lager.
59 Standard_EXPORT void SetHasNormals (const Standard_Boolean OnOff);
61 //! returns True if the normals are calculating
62 Standard_EXPORT Standard_Boolean HasNormals() const;
64 //! defines necessary of writing Material from Vrml into output OStream.
65 //! By default False - the material is not writing into OStream,
66 //! True - the material is writing.
67 Standard_EXPORT void SetHasMaterial (const Standard_Boolean OnOff);
69 //! returns True if the materials is writing into OStream.
70 Standard_EXPORT Standard_Boolean HasMaterial() const;
75 DEFINE_STANDARD_RTTIEXT(VrmlConverter_ShadingAspect,Standard_Transient)
85 Handle(Vrml_Material) myFrontMaterial;
86 Vrml_ShapeHints myShapeHints;
87 Standard_Boolean myHasNormals;
88 Standard_Boolean myHasMaterial;
99 #endif // _VrmlConverter_ShadingAspect_HeaderFile