0023332: Expression 'anIndex < 0' is always false. Unsigned type value is never ...
[occt.git] / src / VrmlData / VrmlData_Faceted.hxx
CommitLineData
b311480e 1// Created on: 2006-05-26
2// Created by: Alexander GRIGORIEV
3// Copyright (c) 2006-2012 OPEN CASCADE SAS
4//
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.
9//
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.
12//
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.
19
7fd59977 20
21
22#ifndef VrmlData_Faceted_HeaderFile
23#define VrmlData_Faceted_HeaderFile
24
25#include <VrmlData_Geometry.hxx>
26
27/**
28 * Common API of faceted Geometry nodes: IndexedFaceSet, ElevationGrid,
29 * Extrusion.
30 */
31class VrmlData_Faceted : public VrmlData_Geometry
32{
33 public:
34 // ---------- PUBLIC METHODS ----------
35
36 /**
37 * Empty constructor
38 */
39 inline VrmlData_Faceted ()
40 : myCreaseAngle (0.),
41 myIsCCW (Standard_True),
42 myIsSolid (Standard_True),
43 myIsConvex (Standard_True)
44 {}
45
46 /**
47 * Empty constructor
48 */
49 inline VrmlData_Faceted (const VrmlData_Scene& theScene,
50 const char * theName,
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),
57 myIsCCW (isCCW),
58 myIsSolid (isSolid),
59 myIsConvex (isConvex)
60 {}
61
62 /**
63 * Query "Is Counter-Clockwise" attribute
64 */
65 inline Standard_Boolean IsCCW () const { return myIsCCW; }
66
67 /**
68 * Query "Is Solid" attribute
69 */
70 inline Standard_Boolean IsSolid () const { return myIsSolid; }
71
72 /**
73 * Query "Is Convex" attribute
74 */
75 inline Standard_Boolean IsConvex () const { return myIsConvex; }
76
77 /**
78 * Query the Crease Angle
79 */
80 inline Standard_Real CreaseAngle () const { return myCreaseAngle; }
81
82 /**
83 * Set "Is Counter-Clockwise" attribute
84 */
85 inline void SetCCW (const Standard_Boolean theValue)
86 { myIsCCW = theValue; }
87
88 /**
89 * Set "Is Solid" attribute
90 */
91 inline void SetSolid (const Standard_Boolean theValue)
92 { myIsSolid = theValue; }
93
94 /**
95 * Set "Is Convex" attribute
96 */
97 inline void SetConvex (const Standard_Boolean theValue)
98 { myIsConvex = theValue; }
99
100 /**
101 * Set "Is Convex" attribute
102 */
103 inline void SetCreaseAngle (const Standard_Real theValue)
104 { myCreaseAngle = theValue; }
105
106 // ---------- PROTECTED METHODS ----------
107 protected:
108 Standard_EXPORT VrmlData_ErrorStatus
109 readData (VrmlData_InBuffer& theBuffer);
110
111 private:
112 // ---------- PRIVATE FIELDS ----------
113
114 Standard_Real myCreaseAngle;
115 Standard_Boolean myIsCCW : 1;
116 Standard_Boolean myIsSolid : 1;
117 Standard_Boolean myIsConvex : 1;
118
119 public:
120// Declaration of CASCADE RTTI
121DEFINE_STANDARD_RTTI (VrmlData_Faceted)
122};
123
124// Definition of HANDLE object using Standard_DefineHandle.hxx
125DEFINE_STANDARD_HANDLE (VrmlData_Faceted, VrmlData_Geometry)
126
127
128#endif