Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
SoProfile.h
Go to the documentation of this file.
1/*=======================================================================
2 * Copyright 1991-1996, Silicon Graphics, Inc.
3 * ALL RIGHTS RESERVED
4 *
5 * UNPUBLISHED -- Rights reserved under the copyright laws of the United
6 * States. Use of a copyright notice is precautionary only and does not
7 * imply publication or disclosure.
8 *
9 * U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:
10 * Use, duplication or disclosure by the Government is subject to restrictions
11 * as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights
12 * in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or
13 * in similar or successor clauses in the FAR, or the DOD or NASA FAR
14 * Supplement. Contractor/manufacturer is Silicon Graphics, Inc.,
15 * 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
16 *
17 * THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY
18 * INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION,
19 * DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY
20 * PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON
21 * GRAPHICS, INC.
22**=======================================================================*/
23/*=======================================================================
24** Author : Thad Beier (MMM yyyy)
25** Modified by : Dave Immel (MMM yyyy)
26** Modified by : Paul Strauss (MMM yyyy)
27**=======================================================================*/
28/*=======================================================================
29 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
30 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
31 *** ***
32 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
33 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
34 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
35 *** ***
36 *** RESTRICTED RIGHTS LEGEND ***
37 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
38 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
39 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
40 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
41 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
42 *** ***
43 *** COPYRIGHT (C) 1996-2019 BY FEI S.A.S, ***
44 *** BORDEAUX, FRANCE ***
45 *** ALL RIGHTS RESERVED ***
46**=======================================================================*/
47/*=======================================================================
48** Modified by : VSG (MMM YYYY)
49**=======================================================================*/
50
51
52#ifndef _SO_PROFILE_
53#define _SO_PROFILE_
54
55#include <Inventor/SbLinear.h>
60
62//
63// Class: SoProfile
64//
65// Abstract base class of 2D profiles. These profiles are used as trim
66// curves for nurbs and bevels for 3D text. The two (so far) subclasses
67// are SoLinearProfile and SoNurbsProfile
68//
70
116class SoProfile : public SoNode{
117
119
120 public:
136
137 // Fields
148
149 private:
150 // These action methods are implemented for profiles. Each of them
151 // just adds the profile to the current state.
152 virtual void doAction(SoAction *action);
153 virtual void callback(SoCallbackAction *action);
154 virtual void GLRender(SoGLRenderAction *action);
155 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
156 virtual void pick(SoPickAction *action);
157 virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action);
158
159 // Returns a profile as a trim curve. floatsPerVec will be either 2 or 3 depending
160 // on whether the curve is non-rational or rational.
161 virtual void getTrimCurve(SoState *state, int32_t &numPoints,
162 float *&points, int &floatsPerVec,
163 int32_t &numKnots, float *&knotVector) = 0;
164
165 // Returns vertices approximating the profile
166 virtual void getVertices(SoState *state, int32_t &nVertices,
167 SbVec2f *&vertices) = 0;
168
169 private:
170 static void initClass();
171 static void exitClass();
172
173 private:
174 SoProfile();
175
176 virtual ~SoProfile();
177};
178
179#endif /* _SO_PROFILE_ */
180
#define SO_NODE_ABSTRACT_HEADER(className)
Definition SoSubNode.h:118
2D vector class.
Definition SbVec.h:76
Abstract base class for all actions.
Definition SoAction.h:132
Performs a generic traversal of a scene graph or path.
Renders a scene graph using Open Inventor's Render Engine.
Computes bounding box of a scene.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Counts number of...
Multiple-value field containing any number of int32_t integers.
Definition SoMFInt32.h:88
Abstract base class for all database nodes.
Definition SoNode.h:145
Abstract base class for picking objects in a scene.
@ START_FIRST
Start first.
@ START_NEW
Start new.
@ ADD_TO_CURRENT
Add to current.
Abstract base class for all profile nodes.
Definition SoProfile.h:116
SoMFInt32 index
Indices into profile coordinates.
Definition SoProfile.h:142
SoSFEnum linkage
Specifies connectivity of profile curve with respect to profiles in current list in state.
Definition SoProfile.h:147
Profile
Profile.
Definition SoProfile.h:122
@ ADD_TO_CURRENT
Add to end of the last profile in the current list.
Definition SoProfile.h:134
@ START_NEW
Start a new profile and add it to the current list.
Definition SoProfile.h:130
@ START_FIRST
Start a new profile and remove any existing profiles from the current list.
Definition SoProfile.h:126
Field containing an enumerated value.
Definition SoSFEnum.h:89
Traversal state.
Definition SoState.h:74