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-2014 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 00113 class SoComposeVec2f : public SoEngine { 00114 SO_COMPOSE__HEADER(SoComposeVec2f); 00115 public: 00119 SoMFFloat x; 00120 00124 SoMFFloat y; 00125 00129 SoEngineOutput vector; 00130 00131 }; 00132 00160 class SoComposeVec2i32 : public SoEngine { 00161 SO_COMPOSE__HEADER(SoComposeVec2i32); 00162 public: 00166 SoMFInt32 x; 00167 00171 SoMFInt32 y; 00172 00176 SoEngineOutput vector; 00177 00178 }; 00179 00207 class SoComposeVec2s : public SoEngine { 00208 SO_COMPOSE__HEADER(SoComposeVec2s); 00209 public: 00213 SoMFShort x; 00214 00218 SoMFShort y; 00219 00223 SoEngineOutput vector; 00224 00225 }; 00226 00254 class SoComposeVec3f : public SoEngine { 00255 SO_COMPOSE__HEADER(SoComposeVec3f); 00256 public: 00260 SoMFFloat x; 00261 00265 SoMFFloat y; 00266 00270 SoMFFloat z; 00271 00275 SoEngineOutput vector; 00276 00277 }; 00278 00307 class SoComposeVec4f : public SoEngine { 00308 SO_COMPOSE__HEADER(SoComposeVec4f); 00309 public: 00313 SoMFFloat x; 00314 00318 SoMFFloat y; 00319 00323 SoMFFloat z; 00324 00328 SoMFFloat w; 00329 00333 SoEngineOutput vector; 00334 00335 }; 00336 00338 00363 class SoDecomposeVec2f : public SoEngine { 00364 SO_COMPOSE__HEADER(SoDecomposeVec2f); 00365 public: 00369 SoMFVec2f vector; 00370 00374 SoEngineOutput x; 00375 00379 SoEngineOutput y; 00380 00381 }; 00382 00407 class SoDecomposeVec2i32 : public SoEngine { 00408 SO_COMPOSE__HEADER(SoDecomposeVec2i32); 00409 public: 00413 SoMFVec2i32 vector; 00414 00418 SoEngineOutput x; 00419 00423 SoEngineOutput y; 00424 00425 }; 00426 00451 class SoDecomposeVec2s : public SoEngine { 00452 SO_COMPOSE__HEADER(SoDecomposeVec2s); 00453 public: 00457 SoMFVec2s vector; 00458 00462 SoEngineOutput x; 00463 00467 SoEngineOutput y; 00468 00469 }; 00470 00496 class SoDecomposeVec3f : public SoEngine { 00497 SO_COMPOSE__HEADER(SoDecomposeVec3f); 00498 public: 00502 SoMFVec3f vector; 00503 00507 SoEngineOutput x; 00508 00512 SoEngineOutput y; 00513 00517 SoEngineOutput z; 00518 00519 }; 00520 00546 class SoDecomposeVec4f : public SoEngine { 00547 SO_COMPOSE__HEADER(SoDecomposeVec4f); 00548 public: 00552 SoMFVec4f vector; 00553 00557 SoEngineOutput x; 00558 00562 SoEngineOutput y; 00563 00567 SoEngineOutput z; 00568 00572 SoEngineOutput w; 00573 00574 }; 00575 00577 00606 class SoComposeRotation : public SoEngine { 00607 SO_COMPOSE__HEADER(SoComposeRotation); 00608 public: 00612 SoMFVec3f axis; 00613 00617 SoMFFloat angle; 00618 00622 SoEngineOutput rotation; 00623 00624 }; 00625 00655 class SoComposeRotationFromTo : public SoEngine { 00656 SO_COMPOSE__HEADER(SoComposeRotationFromTo); 00657 public: 00661 SoMFVec3f from; 00662 00666 SoMFVec3f to; 00667 00671 SoEngineOutput rotation; 00672 00673 }; 00674 00675 00701 class SoDecomposeRotation : public SoEngine { 00702 SO_COMPOSE__HEADER(SoDecomposeRotation); 00703 public: 00707 SoMFRotation rotation; 00708 00712 SoEngineOutput axis; 00713 00717 SoEngineOutput angle; 00718 00719 }; 00720 00721 00723 00755 class SoComposeMatrix : public SoEngine { 00756 SO_COMPOSE__HEADER(SoComposeMatrix); 00757 public: 00761 SoMFVec3f translation; 00762 00766 SoMFRotation rotation; 00770 SoMFVec3f scaleFactor; 00774 SoMFRotation scaleOrientation; 00778 SoMFVec3f center; 00782 SoEngineOutput matrix; 00783 00784 }; 00785 00786 00788 00821 class SoDecomposeMatrix : public SoEngine { 00822 SO_COMPOSE__HEADER(SoDecomposeMatrix); 00823 public: 00827 SoMFMatrix matrix; 00828 00832 SoMFVec3f center; 00833 00837 SoEngineOutput translation; 00838 00842 SoEngineOutput rotation; 00843 00847 SoEngineOutput scaleFactor; 00848 00852 SoEngineOutput scaleOrientation; 00853 00854 00855 }; 00856 00857 #endif /* _SO_COMPOSE_ */ 00858 00859 00860 00861 00862 00863 00864 00865 00866 00867 00868 00869