Open Inventor
Release 2024.2.0
Loading...
Searching...
No Matches
SoCalculator.h
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 : Ronen Barzel (MMM yyyy)
25
**=======================================================================*/
26
/*=======================================================================
27
*** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
28
*** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
29
*** ***
30
*** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
31
*** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
32
*** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
33
*** ***
34
*** RESTRICTED RIGHTS LEGEND ***
35
*** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
36
*** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
37
*** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
38
*** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
39
*** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
40
*** ***
41
*** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
42
*** BORDEAUX, FRANCE ***
43
*** ALL RIGHTS RESERVED ***
44
**=======================================================================*/
45
/*=======================================================================
46
** Modified by : VSG (MMM YYYY)
47
**=======================================================================*/
48
49
50
#ifndef _SO_CALCULATOR_
51
#define _SO_CALCULATOR_
52
53
#include <Inventor/engines/SoSubEngine.h>
54
#include <Inventor/fields/SoMFFloat.h>
55
#include <Inventor/fields/SoMFString.h>
56
#include <Inventor/fields/SoMFVec3f.h>
57
58
class
SoCalcParser;
59
201
class
SoCalculator
:
public
SoEngine
{
202
203
SO_ENGINE_HEADER(
SoCalculator
);
204
205
public
:
206
207
// Inputs
211
SoMFFloat
a
;
215
SoMFFloat
b
;
219
SoMFFloat
c
;
223
SoMFFloat
d
;
227
SoMFFloat
e
;
231
SoMFFloat
f
;
235
SoMFFloat
g
;
239
SoMFFloat
h
;
243
SoMFVec3f
A
;
247
SoMFVec3f
B
;
251
SoMFVec3f
C
;
255
SoMFVec3f
D
;
259
SoMFVec3f
E
;
263
SoMFVec3f
F
;
267
SoMFVec3f
G
;
271
SoMFVec3f
H
;
275
SoMFString
expression
;
276
280
SoEngineOutput
oa
;
284
SoEngineOutput
ob
;
288
SoEngineOutput
oc
;
292
SoEngineOutput
od
;
296
SoEngineOutput
oA
;
300
SoEngineOutput
oB
;
304
SoEngineOutput
oC
;
308
SoEngineOutput
oD
;
309
313
SoCalculator
();
314
315
private
:
316
317
static
void
initClass();
318
static
void
exitClass();
319
320
private
:
321
virtual
void
inputChanged(
SoField
*whichInput);
322
323
// Destructor
324
~SoCalculator
();
325
326
// Evaluation method
327
virtual
void
evaluate();
328
329
private
:
330
SoCalcParser *parser;
331
SbBool
reparse;
332
333
// working storage for the evaluation
334
float
va, vb, vc, vd, ve, vf, vg, vh, ova, ovb, ovc, ovd;
335
float
ta, tb, tc, td, te, tf, tg, th;
336
SbVec3f
vA, vB, vC, vD, vE, vF, vG, vH, ovA, ovB, ovC, ovD;
337
SbVec3f
tA, tB, tC, tD, tE, tF, tG, tH;
338
static
float
*lookupFloat(
void
*,
const
char
*);
339
static
SbVec3f
*lookupVec3f(
void
*,
const
char
*);
340
};
341
342
#endif
/* _SO_CALCULATOR_ */
343
SbVec3f
3D vector class.
Definition
SbVec.h:932
SoCalculator
A general-purpose calculator.
Definition
SoCalculator.h:201
SoCalculator::E
SoMFVec3f E
Vector input.
Definition
SoCalculator.h:259
SoCalculator::C
SoMFVec3f C
Vector input.
Definition
SoCalculator.h:251
SoCalculator::g
SoMFFloat g
Floating point input.
Definition
SoCalculator.h:235
SoCalculator::H
SoMFVec3f H
Vector input.
Definition
SoCalculator.h:271
SoCalculator::G
SoMFVec3f G
Vector input.
Definition
SoCalculator.h:267
SoCalculator::c
SoMFFloat c
Floating point input.
Definition
SoCalculator.h:219
SoCalculator::oC
SoEngineOutput oC
(SoMFVec3f) Outputs oA-oD are the vectors.
Definition
SoCalculator.h:304
SoCalculator::F
SoMFVec3f F
Vector input.
Definition
SoCalculator.h:263
SoCalculator::oA
SoEngineOutput oA
(SoMFVec3f) Outputs oA-oD are the vectors.
Definition
SoCalculator.h:296
SoCalculator::A
SoMFVec3f A
Vector input.
Definition
SoCalculator.h:243
SoCalculator::expression
SoMFString expression
Expressions to be evaluated.
Definition
SoCalculator.h:275
SoCalculator::a
SoMFFloat a
Floating point input.
Definition
SoCalculator.h:211
SoCalculator::SoCalculator
SoCalculator()
Constructor.
SoCalculator::f
SoMFFloat f
Floating point input.
Definition
SoCalculator.h:231
SoCalculator::D
SoMFVec3f D
Vector input.
Definition
SoCalculator.h:255
SoCalculator::b
SoMFFloat b
Floating point input.
Definition
SoCalculator.h:215
SoCalculator::B
SoMFVec3f B
Vector input.
Definition
SoCalculator.h:247
SoCalculator::oB
SoEngineOutput oB
(SoMFVec3f) Outputs oA-oD are the vectors.
Definition
SoCalculator.h:300
SoCalculator::h
SoMFFloat h
Floating point input.
Definition
SoCalculator.h:239
SoCalculator::d
SoMFFloat d
Floating point input.
Definition
SoCalculator.h:223
SoCalculator::oa
SoEngineOutput oa
(SoMFFloat) Outputs oa-od are the floating-point values.
Definition
SoCalculator.h:280
SoCalculator::ob
SoEngineOutput ob
(SoMFFloat) Outputs oa-od are the floating-point values.
Definition
SoCalculator.h:284
SoCalculator::oc
SoEngineOutput oc
(SoMFFloat) Outputs oa-od are the floating-point values.
Definition
SoCalculator.h:288
SoCalculator::oD
SoEngineOutput oD
(SoMFVec3f) Outputs oA-oD are the vectors.
Definition
SoCalculator.h:308
SoCalculator::od
SoEngineOutput od
(SoMFFloat) Outputs oa-od are the floating-point values.
Definition
SoCalculator.h:292
SoCalculator::e
SoMFFloat e
Floating point input.
Definition
SoCalculator.h:227
SoEngine
Base class for all engines.
Definition
SoEngine.h:133
SoEngineOutput
Class for all engine outputs.
Definition
SoEngine.h:279
SoField
Base class for all fields.
Definition
SoField.h:234
SoMFFloat
Multiple-value field containing any number of floating point values.
Definition
SoMFFloat.h:90
SoMFString
Multiple-value field containing any number of strings.
Definition
SoMFString.h:116
SoMFVec3f
Multiple-value field containing any number of three-dimensional vectors.
Definition
SoMFVec3f.h:181
SbBool
int SbBool
Boolean type.
Definition
SbBase.h:87
Inventor
engines
SoCalculator.h
Generated by
1.9.8