00001 /*======================================================================= 00002 * Copyright 1991-1996, Silicon Graphics, Inc. 00003 * ALL RIGHTS RESERVED 00004 * 00005 * UNPUBLISHED -- Rights reserved under the copyright laws of the United 00006 * States. Use of a copyright notice is precautionary only and does not 00007 * imply publication or disclosure. 00008 * 00009 * U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND: 00010 * Use, duplication or disclosure by the Government is subject to restrictions 00011 * as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights 00012 * in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or 00013 * in similar or successor clauses in the FAR, or the DOD or NASA FAR 00014 * Supplement. Contractor/manufacturer is Silicon Graphics, Inc., 00015 * 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311. 00016 * 00017 * THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY 00018 * INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION, 00019 * DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY 00020 * PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON 00021 * GRAPHICS, INC. 00022 **=======================================================================*/ 00023 /*======================================================================= 00024 ** Author : Ronen Barzel (MMM yyyy) 00025 **=======================================================================*/ 00026 /*======================================================================= 00027 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00028 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00029 *** *** 00030 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00031 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00032 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00033 *** *** 00034 *** RESTRICTED RIGHTS LEGEND *** 00035 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00036 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00037 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00038 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00039 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00040 *** *** 00041 *** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, *** 00042 *** BORDEAUX, FRANCE *** 00043 *** ALL RIGHTS RESERVED *** 00044 **=======================================================================*/ 00045 /*======================================================================= 00046 ** Modified by : VSG (MMM YYYY) 00047 **=======================================================================*/ 00048 00049 00050 #ifndef _SO_COMPOSE_ 00051 #define _SO_COMPOSE_ 00052 00053 #include <Inventor/engines/SoSubEngine.h> 00054 #include <Inventor/fields/SoMFFloat.h> 00055 #include <Inventor/fields/SoMFInt32.h> 00056 #include <Inventor/fields/SoMFMatrix.h> 00057 #include <Inventor/fields/SoMFRotation.h> 00058 #include <Inventor/fields/SoMFShort.h> 00059 #include <Inventor/fields/SoMFVec2f.h> 00060 #include <Inventor/fields/SoMFVec2i32.h> 00061 #include <Inventor/fields/SoMFVec2s.h> 00062 #include <Inventor/fields/SoMFVec3f.h> 00063 #include <Inventor/fields/SoMFVec4f.h> 00064 00065 // This internal macro defines the standard methods for the composition 00066 // engines. These are just basic engine declarations, nothing fancy. 00067 // The macro leaves the class header in "public:" state so it can be 00068 // followed immediately with the composition input and output declarations. 00069 #define SO_COMPOSE__HEADER(Name) \ 00070 SO_ENGINE_HEADER(Name); \ 00071 private: \ 00072 ~Name(); \ 00073 virtual void evaluate(); \ 00074 public: \ 00075 \ 00076 Name(); \ 00077 private: \ 00078 \ 00079 static void initClass(); \ 00080 \ 00081 static void exitClass() 00082 00084 00085 00114 class SoComposeVec2f : public SoEngine { 00115 SO_COMPOSE__HEADER(SoComposeVec2f); 00116 public: 00120 SoMFFloat x; 00121 00125 SoMFFloat y; 00126 00130 SoEngineOutput vector; 00131 00132 }; 00133 00162 class SoComposeVec2i32 : public SoEngine { 00163 SO_COMPOSE__HEADER(SoComposeVec2i32); 00164 public: 00168 SoMFInt32 x; 00169 00173 SoMFInt32 y; 00174 00178 SoEngineOutput vector; 00179 00180 }; 00181 00210 class SoComposeVec2s : public SoEngine { 00211 SO_COMPOSE__HEADER(SoComposeVec2s); 00212 public: 00216 SoMFShort x; 00217 00221 SoMFShort y; 00222 00226 SoEngineOutput vector; 00227 00228 }; 00229 00258 class SoComposeVec3f : public SoEngine { 00259 SO_COMPOSE__HEADER(SoComposeVec3f); 00260 public: 00264 SoMFFloat x; 00265 00269 SoMFFloat y; 00270 00274 SoMFFloat z; 00275 00279 SoEngineOutput vector; 00280 00281 }; 00282 00312 class SoComposeVec4f : public SoEngine { 00313 SO_COMPOSE__HEADER(SoComposeVec4f); 00314 public: 00318 SoMFFloat x; 00319 00323 SoMFFloat y; 00324 00328 SoMFFloat z; 00329 00333 SoMFFloat w; 00334 00338 SoEngineOutput vector; 00339 00340 }; 00341 00343 00369 class SoDecomposeVec2f : public SoEngine { 00370 SO_COMPOSE__HEADER(SoDecomposeVec2f); 00371 public: 00375 SoMFVec2f vector; 00376 00380 SoEngineOutput x; 00381 00385 SoEngineOutput y; 00386 00387 }; 00388 00414 class SoDecomposeVec2i32 : public SoEngine { 00415 SO_COMPOSE__HEADER(SoDecomposeVec2i32); 00416 public: 00420 SoMFVec2i32 vector; 00421 00425 SoEngineOutput x; 00426 00430 SoEngineOutput y; 00431 00432 }; 00433 00459 class SoDecomposeVec2s : public SoEngine { 00460 SO_COMPOSE__HEADER(SoDecomposeVec2s); 00461 public: 00465 SoMFVec2s vector; 00466 00470 SoEngineOutput x; 00471 00475 SoEngineOutput y; 00476 00477 }; 00478 00505 class SoDecomposeVec3f : public SoEngine { 00506 SO_COMPOSE__HEADER(SoDecomposeVec3f); 00507 public: 00511 SoMFVec3f vector; 00512 00516 SoEngineOutput x; 00517 00521 SoEngineOutput y; 00522 00526 SoEngineOutput z; 00527 00528 }; 00529 00556 class SoDecomposeVec4f : public SoEngine { 00557 SO_COMPOSE__HEADER(SoDecomposeVec4f); 00558 public: 00562 SoMFVec4f vector; 00563 00567 SoEngineOutput x; 00568 00572 SoEngineOutput y; 00573 00577 SoEngineOutput z; 00578 00582 SoEngineOutput w; 00583 00584 }; 00585 00587 00617 class SoComposeRotation : public SoEngine { 00618 SO_COMPOSE__HEADER(SoComposeRotation); 00619 public: 00623 SoMFVec3f axis; 00624 00628 SoMFFloat angle; 00629 00633 SoEngineOutput rotation; 00634 00635 }; 00636 00667 class SoComposeRotationFromTo : public SoEngine { 00668 SO_COMPOSE__HEADER(SoComposeRotationFromTo); 00669 public: 00673 SoMFVec3f from; 00674 00678 SoMFVec3f to; 00679 00683 SoEngineOutput rotation; 00684 00685 }; 00686 00687 00714 class SoDecomposeRotation : public SoEngine { 00715 SO_COMPOSE__HEADER(SoDecomposeRotation); 00716 public: 00720 SoMFRotation rotation; 00721 00725 SoEngineOutput axis; 00726 00730 SoEngineOutput angle; 00731 00732 }; 00733 00734 00736 00769 class SoComposeMatrix : public SoEngine { 00770 SO_COMPOSE__HEADER(SoComposeMatrix); 00771 public: 00775 SoMFVec3f translation; 00776 00780 SoMFRotation rotation; 00784 SoMFVec3f scaleFactor; 00788 SoMFRotation scaleOrientation; 00792 SoMFVec3f center; 00796 SoEngineOutput matrix; 00797 00798 }; 00799 00800 00802 00836 class SoDecomposeMatrix : public SoEngine { 00837 SO_COMPOSE__HEADER(SoDecomposeMatrix); 00838 public: 00842 SoMFMatrix matrix; 00843 00847 SoMFVec3f center; 00848 00852 SoEngineOutput translation; 00853 00857 SoEngineOutput rotation; 00858 00862 SoEngineOutput scaleFactor; 00863 00867 SoEngineOutput scaleOrientation; 00868 00869 00870 }; 00871 00872 #endif /* _SO_COMPOSE_ */ 00873 00874 00875 00876 00877 00878 00879 00880 00881 00882 00883 00884