1 // Created on: 2006-05-26
2 // Created by: Alexander GRIGORIEV
3 // Copyright (c) 2006-2012 OPEN CASCADE SAS
5 // The content of this file is subject to the Open CASCADE Technology Public
6 // License Version 6.5 (the "License"). You may not use the content of this file
7 // except in compliance with the License. Please obtain a copy of the License
8 // at http://www.opencascade.org and read it completely before using this file.
10 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 // The Original Code and all software distributed under the License is
14 // distributed on an "AS IS" basis, without warranty of any kind, and the
15 // Initial Developer hereby disclaims all such warranties, including without
16 // limitation, any warranties of merchantability, fitness for a particular
17 // purpose or non-infringement. Please see the License for the specific terms
18 // and conditions governing the rights and limitations under the License.
22 #ifndef VrmlData_Faceted_HeaderFile
23 #define VrmlData_Faceted_HeaderFile
25 #include <VrmlData_Geometry.hxx>
28 * Common API of faceted Geometry nodes: IndexedFaceSet, ElevationGrid,
31 class VrmlData_Faceted : public VrmlData_Geometry
34 // ---------- PUBLIC METHODS ----------
39 inline VrmlData_Faceted ()
41 myIsCCW (Standard_True),
42 myIsSolid (Standard_True),
43 myIsConvex (Standard_True)
49 inline VrmlData_Faceted (const VrmlData_Scene& theScene,
51 const Standard_Boolean isCCW,
52 const Standard_Boolean isSolid,
53 const Standard_Boolean isConvex,
54 const Standard_Real theCreaseAngle)
55 : VrmlData_Geometry (theScene, theName),
56 myCreaseAngle (theCreaseAngle),
63 * Query "Is Counter-Clockwise" attribute
65 inline Standard_Boolean IsCCW () const { return myIsCCW; }
68 * Query "Is Solid" attribute
70 inline Standard_Boolean IsSolid () const { return myIsSolid; }
73 * Query "Is Convex" attribute
75 inline Standard_Boolean IsConvex () const { return myIsConvex; }
78 * Query the Crease Angle
80 inline Standard_Real CreaseAngle () const { return myCreaseAngle; }
83 * Set "Is Counter-Clockwise" attribute
85 inline void SetCCW (const Standard_Boolean theValue)
86 { myIsCCW = theValue; }
89 * Set "Is Solid" attribute
91 inline void SetSolid (const Standard_Boolean theValue)
92 { myIsSolid = theValue; }
95 * Set "Is Convex" attribute
97 inline void SetConvex (const Standard_Boolean theValue)
98 { myIsConvex = theValue; }
101 * Set "Is Convex" attribute
103 inline void SetCreaseAngle (const Standard_Real theValue)
104 { myCreaseAngle = theValue; }
106 // ---------- PROTECTED METHODS ----------
108 Standard_EXPORT VrmlData_ErrorStatus
109 readData (VrmlData_InBuffer& theBuffer);
112 // ---------- PRIVATE FIELDS ----------
114 Standard_Real myCreaseAngle;
115 Standard_Boolean myIsCCW : 1;
116 Standard_Boolean myIsSolid : 1;
117 Standard_Boolean myIsConvex : 1;
120 // Declaration of CASCADE RTTI
121 DEFINE_STANDARD_RTTI (VrmlData_Faceted)
124 // Definition of HANDLE object using Standard_DefineHandle.hxx
125 DEFINE_STANDARD_HANDLE (VrmlData_Faceted, VrmlData_Geometry)