Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:31

0001 // Created on: 1997-02-10
0002 // Created by: Alexander BRIVIN and Dmitry TARASOV
0003 // Copyright (c) 1997-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _Vrml_Material_HeaderFile
0018 #define _Vrml_Material_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Quantity_HArray1OfColor.hxx>
0024 #include <TColStd_HArray1OfReal.hxx>
0025 #include <Standard_Transient.hxx>
0026 #include <Standard_OStream.hxx>
0027 
0028 
0029 class Vrml_Material;
0030 DEFINE_STANDARD_HANDLE(Vrml_Material, Standard_Transient)
0031 
0032 //! defines a Material node of VRML specifying properties of geometry
0033 //! and its appearance.
0034 //! This node defines the current surface material properties for all subsequent shapes.
0035 //! Material sets several components of the current material during traversal. Different shapes
0036 //! interpret materials with multiple values differently. To bind materials to shapes, use a
0037 //! MaterialBinding node.
0038 class Vrml_Material : public Standard_Transient
0039 {
0040 
0041 public:
0042 
0043   
0044   Standard_EXPORT Vrml_Material(const Handle(Quantity_HArray1OfColor)& aAmbientColor, const Handle(Quantity_HArray1OfColor)& aDiffuseColor, const Handle(Quantity_HArray1OfColor)& aSpecularColor, const Handle(Quantity_HArray1OfColor)& aEmissiveColor, const Handle(TColStd_HArray1OfReal)& aShininess, const Handle(TColStd_HArray1OfReal)& aTransparency);
0045   
0046   Standard_EXPORT Vrml_Material();
0047   
0048   Standard_EXPORT void SetAmbientColor (const Handle(Quantity_HArray1OfColor)& aAmbientColor);
0049   
0050   Standard_EXPORT Handle(Quantity_HArray1OfColor) AmbientColor() const;
0051   
0052   Standard_EXPORT void SetDiffuseColor (const Handle(Quantity_HArray1OfColor)& aDiffuseColor);
0053   
0054   Standard_EXPORT Handle(Quantity_HArray1OfColor) DiffuseColor() const;
0055   
0056   Standard_EXPORT void SetSpecularColor (const Handle(Quantity_HArray1OfColor)& aSpecularColor);
0057   
0058   Standard_EXPORT Handle(Quantity_HArray1OfColor) SpecularColor() const;
0059   
0060   Standard_EXPORT void SetEmissiveColor (const Handle(Quantity_HArray1OfColor)& aEmissiveColor);
0061   
0062   Standard_EXPORT Handle(Quantity_HArray1OfColor) EmissiveColor() const;
0063   
0064   Standard_EXPORT void SetShininess (const Handle(TColStd_HArray1OfReal)& aShininess);
0065   
0066   Standard_EXPORT Handle(TColStd_HArray1OfReal) Shininess() const;
0067   
0068   Standard_EXPORT void SetTransparency (const Handle(TColStd_HArray1OfReal)& aTransparency);
0069   
0070   Standard_EXPORT Handle(TColStd_HArray1OfReal) Transparency() const;
0071   
0072   Standard_EXPORT Standard_OStream& Print (Standard_OStream& anOStream) const;
0073 
0074 
0075 
0076 
0077   DEFINE_STANDARD_RTTIEXT(Vrml_Material,Standard_Transient)
0078 
0079 protected:
0080 
0081 
0082 
0083 
0084 private:
0085 
0086 
0087   Handle(Quantity_HArray1OfColor) myAmbientColor;
0088   Handle(Quantity_HArray1OfColor) myDiffuseColor;
0089   Handle(Quantity_HArray1OfColor) mySpecularColor;
0090   Handle(Quantity_HArray1OfColor) myEmissiveColor;
0091   Handle(TColStd_HArray1OfReal) myShininess;
0092   Handle(TColStd_HArray1OfReal) myTransparency;
0093 
0094 
0095 };
0096 
0097 
0098 
0099 
0100 
0101 
0102 
0103 #endif // _Vrml_Material_HeaderFile