Open Inventor Reference
SoFaceDetail.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * Further, this software is distributed without any warranty that it is
16  * free of the rightful claim of any third person regarding infringement
17  * or the like. Any license provided herein, whether implied or
18  * otherwise, applies only to this software file. Patent licenses, if
19  * any, provided herein do not apply to combinations of this program with
20  * other software, or any other product whatsoever.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25  *
26  * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
27  * Mountain View, CA 94043, or:
28  *
29  * http://www.sgi.com
30  *
31  * For further information regarding this notice, see:
32  *
33  * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
34  *
35  */
36 
37 
38 /*
39  * Copyright (C) 1990,91 Silicon Graphics, Inc.
40  *
41  _______________________________________________________________________
42  ______________ S I L I C O N G R A P H I C S I N C . ____________
43  |
44  | $Revision: 1.1.1.1 $
45  |
46  | Description:
47  | This file defines the SoFaceDetail class.
48  |
49  | Author(s) : Thaddeus Beier, Dave Immel, Howard Look
50  |
51  ______________ S I L I C O N G R A P H I C S I N C . ____________
52  _______________________________________________________________________
53  */
54 
55 #ifndef _SO_FACE_DETAIL_
56 #define _SO_FACE_DETAIL_
57 
60 
61 
64 
85 
87 
89 
90  public:
91 
95  virtual ~SoFaceDetail();
96 
98  int32_t getNumPoints() const { return numPoints; }
99 
102  const SoPointDetail * getPoint(int i) const { return &point[i]; }
103 
105  int32_t getFaceIndex() const { return faceIndex; }
106 
108  int32_t getPartIndex() const { return partIndex; }
109 
112  virtual SoDetail * copy() const;
113 
114  SoEXTENDER public:
117 
119  void setPoint(int32_t index, const SoPointDetail *pd);
120 
122  void setFaceIndex(int32_t i) { faceIndex = i; }
123  void setPartIndex(int32_t i) { partIndex = i; }
124 
126  SoPointDetail * getPoints() { return &point[0]; }
127 
128 #ifndef IV_STRICT
129  void setNumPoints(long num)
130  { setNumPoints ((int32_t) num); }
131  void setPoint(long index, const SoPointDetail *pd)
132  { setPoint ((int32_t) index, pd); }
133  void setFaceIndex(long i)
134  { setFaceIndex ((int32_t) i); }
135  void setPartIndex(long i)
136  { setPartIndex ((int32_t) i); }
137 #endif
138 
139  SoINTERNAL public:
140  static void initClass();
141 
142  private:
143  SoPointDetail *point;
144  int32_t numPoints;
145  int32_t faceIndex, partIndex;
146 };
147 
148 #endif /* _SO_FACE_DETAIL_ */
#define SoEXTENDER
Provide inline template functions for abs, swap, min, max, and clamp.
Definition: SbBasic.h:154
#define SoINTERNAL
Definition: SbBasic.h:155
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
Definition: SbSystem.h:81
signed int int32_t
Definition: SbTypeDefs.h:43
#define SO_DETAIL_HEADER(className)
Macros to be called within the class definition header for a detail subclass:
Definition: SoSubDetail.h:84
Base class for describing detail information about a shape node.
Definition: SoDetail.h:78
Stores detail information about vertex-based shapes made of faces.
Definition: SoFaceDetail.h:86
SoFaceDetail()
Constructor and destructor.
virtual SoDetail * copy() const
Returns an instance that is a copy of this instance.
void setFaceIndex(long i)
Definition: SoFaceDetail.h:133
int32_t getPartIndex() const
Returns the index of the part containing the face within the shape.
Definition: SoFaceDetail.h:108
void setPartIndex(int32_t i)
Definition: SoFaceDetail.h:123
void setNumPoints(int32_t num)
Sets the number of points in the face and allocates room for the points.
void setPoint(int32_t index, const SoPointDetail *pd)
Copies a point detail from the given detail.
void setPartIndex(long i)
Definition: SoFaceDetail.h:135
void setFaceIndex(int32_t i)
Sets the face index and part index.
Definition: SoFaceDetail.h:122
virtual ~SoFaceDetail()
Constructor and destructor.
const SoPointDetail * getPoint(int i) const
Returns information about the point forming the i'th vertex of the face, represented as an SoPointDet...
Definition: SoFaceDetail.h:102
int32_t getNumPoints() const
Returns the number of points in the face.
Definition: SoFaceDetail.h:98
int32_t getFaceIndex() const
Returns the index of the face within the shape.
Definition: SoFaceDetail.h:105
static void initClass()
void setPoint(long index, const SoPointDetail *pd)
Definition: SoFaceDetail.h:131
void setNumPoints(long num)
Definition: SoFaceDetail.h:129
SoPointDetail * getPoints()
Return a pointer to the point details.
Definition: SoFaceDetail.h:126
Stores detail information about vertex-based shapes made of points.
Definition: SoPointDetail.h:79