Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-26 09:05:17

0001 // Created on: 2006-05-26
0002 // Created by: Alexander GRIGORIEV
0003 // Copyright (c) 2006-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef VrmlData_Faceted_HeaderFile
0017 #define VrmlData_Faceted_HeaderFile
0018 
0019 #include <VrmlData_Geometry.hxx>
0020 
0021 /**
0022  *  Common API of faceted Geometry nodes: IndexedFaceSet, ElevationGrid,
0023  *  Extrusion.
0024  */
0025 class VrmlData_Faceted : public VrmlData_Geometry
0026 {
0027 public:
0028   // ---------- PUBLIC METHODS ----------
0029 
0030   /**
0031    * Empty constructor
0032    */
0033   inline VrmlData_Faceted()
0034       : myCreaseAngle(0.),
0035         myIsCCW(true),
0036         myIsSolid(true),
0037         myIsConvex(true)
0038   {
0039   }
0040 
0041   /**
0042    * Empty constructor
0043    */
0044   inline VrmlData_Faceted(const VrmlData_Scene& theScene,
0045                           const char*           theName,
0046                           const bool            isCCW,
0047                           const bool            isSolid,
0048                           const bool            isConvex,
0049                           const double          theCreaseAngle)
0050       : VrmlData_Geometry(theScene, theName),
0051         myCreaseAngle(theCreaseAngle),
0052         myIsCCW(isCCW),
0053         myIsSolid(isSolid),
0054         myIsConvex(isConvex)
0055   {
0056   }
0057 
0058   /**
0059    * Query "Is Counter-Clockwise" attribute
0060    */
0061   inline bool IsCCW() const { return myIsCCW; }
0062 
0063   /**
0064    * Query "Is Solid" attribute
0065    */
0066   inline bool IsSolid() const { return myIsSolid; }
0067 
0068   /**
0069    * Query "Is Convex" attribute
0070    */
0071   inline bool IsConvex() const { return myIsConvex; }
0072 
0073   /**
0074    * Query the Crease Angle
0075    */
0076   inline double CreaseAngle() const { return myCreaseAngle; }
0077 
0078   /**
0079    * Set "Is Counter-Clockwise" attribute
0080    */
0081   inline void SetCCW(const bool theValue) { myIsCCW = theValue; }
0082 
0083   /**
0084    * Set "Is Solid" attribute
0085    */
0086   inline void SetSolid(const bool theValue) { myIsSolid = theValue; }
0087 
0088   /**
0089    * Set "Is Convex" attribute
0090    */
0091   inline void SetConvex(const bool theValue) { myIsConvex = theValue; }
0092 
0093   /**
0094    * Set "Is Convex" attribute
0095    */
0096   inline void SetCreaseAngle(const double theValue) { myCreaseAngle = theValue; }
0097 
0098   // ---------- PROTECTED METHODS ----------
0099 protected:
0100   Standard_EXPORT VrmlData_ErrorStatus readData(VrmlData_InBuffer& theBuffer);
0101 
0102 private:
0103   // ---------- PRIVATE FIELDS ----------
0104 
0105   double myCreaseAngle;
0106   bool   myIsCCW : 1;
0107   bool   myIsSolid : 1;
0108   bool   myIsConvex : 1;
0109 
0110 public:
0111   // Declaration of CASCADE RTTI
0112   DEFINE_STANDARD_RTTI_INLINE(VrmlData_Faceted, VrmlData_Geometry)
0113 };
0114 
0115 // Definition of HANDLE object using Standard_DefineHandle.hxx
0116 #endif