Back to home page

EIC code displayed by LXR

 
 

    


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

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           (Standard_True),
0036       myIsSolid         (Standard_True),
0037       myIsConvex        (Standard_True)
0038   {}
0039 
0040   /**
0041    * Empty constructor
0042    */
0043   inline VrmlData_Faceted (const VrmlData_Scene&  theScene,
0044                            const char             * theName,
0045                            const Standard_Boolean isCCW,
0046                            const Standard_Boolean isSolid,
0047                            const Standard_Boolean isConvex,
0048                            const Standard_Real    theCreaseAngle)
0049     : VrmlData_Geometry (theScene, theName),
0050       myCreaseAngle     (theCreaseAngle),
0051       myIsCCW           (isCCW),
0052       myIsSolid         (isSolid),
0053       myIsConvex        (isConvex)
0054   {}
0055 
0056   /**
0057    * Query "Is Counter-Clockwise" attribute
0058    */
0059   inline Standard_Boolean IsCCW         () const  { return myIsCCW; }
0060 
0061   /**
0062    * Query "Is Solid" attribute
0063    */
0064   inline Standard_Boolean IsSolid       () const  { return myIsSolid; }
0065 
0066   /**
0067    * Query "Is Convex" attribute
0068    */
0069   inline Standard_Boolean IsConvex      () const  { return myIsConvex; }
0070 
0071   /**
0072    * Query the Crease Angle
0073    */
0074   inline Standard_Real    CreaseAngle   () const  { return myCreaseAngle; }
0075 
0076   /**
0077    * Set "Is Counter-Clockwise" attribute
0078    */
0079   inline void             SetCCW        (const Standard_Boolean theValue)
0080   { myIsCCW = theValue; }
0081 
0082   /**
0083    * Set "Is Solid" attribute
0084    */
0085   inline void             SetSolid      (const Standard_Boolean theValue)
0086   { myIsSolid = theValue; }
0087 
0088   /**
0089    * Set "Is Convex" attribute
0090    */
0091   inline void             SetConvex     (const Standard_Boolean theValue)
0092   { myIsConvex = theValue; }
0093 
0094   /**
0095    * Set "Is Convex" attribute
0096    */
0097   inline void             SetCreaseAngle (const Standard_Real theValue)
0098   { myCreaseAngle = theValue; }
0099 
0100   // ---------- PROTECTED METHODS ----------
0101  protected:
0102   Standard_EXPORT VrmlData_ErrorStatus
0103                           readData       (VrmlData_InBuffer& theBuffer);
0104 
0105  private:
0106   // ---------- PRIVATE FIELDS ----------
0107 
0108   Standard_Real         myCreaseAngle;
0109   Standard_Boolean      myIsCCW    : 1;
0110   Standard_Boolean      myIsSolid  : 1;
0111   Standard_Boolean      myIsConvex : 1;
0112 
0113  public:
0114 // Declaration of CASCADE RTTI
0115 DEFINE_STANDARD_RTTI_INLINE(VrmlData_Faceted,VrmlData_Geometry)
0116 };
0117 
0118 // Definition of HANDLE object using Standard_DefineHandle.hxx
0119 DEFINE_STANDARD_HANDLE (VrmlData_Faceted, VrmlData_Geometry)
0120 
0121 
0122 #endif