Open Inventor Reference
MeVis/ThirdParty/Sources/Inventor/inventor/lib/database/include/Inventor/engines/SoCompose.h
Go to the documentation of this file.
00001 /*
00002  *
00003  *  Copyright (C) 2000 Silicon Graphics, Inc.  All Rights Reserved. 
00004  *
00005  *  This library is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU Lesser General Public
00007  *  License as published by the Free Software Foundation; either
00008  *  version 2.1 of the License, or (at your option) any later version.
00009  *
00010  *  This library is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  *  Lesser General Public License for more details.
00014  *
00015  *  Further, this software is distributed without any warranty that it is
00016  *  free of the rightful claim of any third person regarding infringement
00017  *  or the like.  Any license provided herein, whether implied or
00018  *  otherwise, applies only to this software file.  Patent licenses, if
00019  *  any, provided herein do not apply to combinations of this program with
00020  *  other software, or any other product whatsoever.
00021  * 
00022  *  You should have received a copy of the GNU Lesser General Public
00023  *  License along with this library; if not, write to the Free Software
00024  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025  *
00026  *  Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
00027  *  Mountain View, CA  94043, or:
00028  * 
00029  *  http://www.sgi.com 
00030  * 
00031  *  For further information regarding this notice, see: 
00032  * 
00033  *  http://oss.sgi.com/projects/GenInfo/NoticeExplan/
00034  *
00035  */
00036 
00037 
00038 /*
00039  * Copyright (C) 1990,91,92   Silicon Graphics, Inc.
00040  *
00041  _______________________________________________________________________
00042  ______________  S I L I C O N   G R A P H I C S   I N C .  ____________
00043  |
00044  |   $Revision: 1.1.1.1 $
00045  |
00046  |   Description:
00047  |      This file contains the implementation of the
00048  |      various composition and decomposition engines
00049  |
00050  |   Classes:
00051  |       SoComposeVec2f 
00052  |       SoComposeVec3f 
00053  |       SoComposeVec4f 
00054  |       SoComposeRotation 
00055  |       SoComposeRotationFromTo
00056  |       SoDecomposeVec2f 
00057  |       SoDecomposeVec3f 
00058  |       SoDecomposeVec4f 
00059  |       SoDecomposeRotation 
00060  |
00061  |   Author(s)          : Ronen Barzel
00062  |
00063  ______________  S I L I C O N   G R A P H I C S   I N C .  ____________
00064  _______________________________________________________________________
00065  */
00066 
00067 #ifndef  _SO_COMPOSE_
00068 #define  _SO_COMPOSE_
00069 
00070 #include <Inventor/system/SbSystem.h>
00071 #include <Inventor/engines/SoSubEngine.h>
00072 #include <Inventor/fields/SoMFFloat.h>
00073 #include <Inventor/fields/SoMFMatrix.h>
00074 #include <Inventor/fields/SoMFRotation.h>
00075 #include <Inventor/fields/SoMFVec2f.h>
00076 #include <Inventor/fields/SoMFVec3f.h>
00077 #include <Inventor/fields/SoMFVec4f.h>
00078 
00083 #define SO_COMPOSE__HEADER(Name)                \
00084             SO_ENGINE_HEADER(Name);             \
00085           private:                              \
00086             ~Name();                            \
00087             virtual void evaluate();            \
00088           public:                               \
00089             Name();                             \
00090             static void initClass()                             
00091 
00098 
00123 
00124 
00125 class INVENTOR_API SoComposeVec2f : public SoEngine {
00126     SO_COMPOSE__HEADER(SoComposeVec2f);
00127 public:
00129 
00130 
00132     SoMFFloat           x;      
00133 
00135     SoMFFloat           y;      
00136 
00138 
00140 
00141 
00143     SoEngineOutput      vector; 
00144 
00146 
00147 };
00150 
00176 
00177 
00178 class INVENTOR_API SoComposeVec3f : public SoEngine {
00179     SO_COMPOSE__HEADER(SoComposeVec3f);
00180 public:
00182 
00183 
00185     SoMFFloat           x;      
00186 
00188     SoMFFloat           y;      
00189 
00191     SoMFFloat           z;      
00192 
00194 
00196 
00197 
00199     SoEngineOutput      vector; 
00200 
00202 
00203 };
00206 
00233 
00234 
00235 class INVENTOR_API SoComposeVec4f : public SoEngine {
00236     SO_COMPOSE__HEADER(SoComposeVec4f);
00237 public:
00239 
00240 
00242     SoMFFloat           x;      
00243 
00245     SoMFFloat           y;      
00246 
00248     SoMFFloat           z;      
00249 
00251     SoMFFloat           w;      
00252 
00254 
00256 
00257 
00259     SoEngineOutput      vector; 
00260 
00262 
00263 };
00264 
00271 
00293 
00294 
00295 class INVENTOR_API SoDecomposeVec2f : public SoEngine {
00296     SO_COMPOSE__HEADER(SoDecomposeVec2f);
00297 public:
00299 
00300 
00302     SoMFVec2f           vector; 
00303 
00305 
00307 
00308 
00310     SoEngineOutput      x;      
00311 
00313     SoEngineOutput      y;      
00314 
00316 
00317 };
00320 
00342 
00343 
00344 class INVENTOR_API SoDecomposeVec3f : public SoEngine {
00345     SO_COMPOSE__HEADER(SoDecomposeVec3f);
00346 public:
00348 
00349 
00351     SoMFVec3f           vector; 
00352 
00354 
00356 
00357 
00359     SoEngineOutput      x;      
00360 
00362     SoEngineOutput      y;      
00363 
00365     SoEngineOutput      z;      
00366 
00368 
00369 };
00372 
00394 
00395 
00396 class INVENTOR_API SoDecomposeVec4f : public SoEngine {
00397     SO_COMPOSE__HEADER(SoDecomposeVec4f);
00398 public:
00400 
00401 
00403     SoMFVec4f           vector; 
00404 
00406 
00408 
00409 
00411     SoEngineOutput      x;      
00412 
00414     SoEngineOutput      y;      
00415 
00417     SoEngineOutput      z;      
00418 
00420     SoEngineOutput      w;      
00421 
00423 
00424 };
00425 
00432 
00458 
00459 
00460 class INVENTOR_API SoComposeRotation : public SoEngine {
00461     SO_COMPOSE__HEADER(SoComposeRotation);
00462 public:
00464 
00465 
00467     SoMFVec3f           axis;           
00468 
00470     SoMFFloat           angle;          
00471 
00473 
00475 
00476 
00478     SoEngineOutput      rotation;       
00479 
00481 
00482 };
00485 
00512 
00513 
00514 class INVENTOR_API SoComposeRotationFromTo : public SoEngine {
00515     SO_COMPOSE__HEADER(SoComposeRotationFromTo);
00516 public:
00518 
00519 
00521     SoMFVec3f           from;           
00522 
00524     SoMFVec3f           to;             
00525 
00527 
00529 
00530 
00532     SoEngineOutput      rotation;       
00533 
00535 
00536 };
00537 
00538 
00545 
00567 
00568 
00569 class INVENTOR_API SoDecomposeRotation : public SoEngine {
00570     SO_COMPOSE__HEADER(SoDecomposeRotation);
00571 public:
00573 
00574 
00576     SoMFRotation        rotation;       
00577 
00579 
00581 
00582 
00584     SoEngineOutput      axis;           
00585 
00587     SoEngineOutput      angle;          
00588 };
00589 
00591 
00592 
00599 
00630 
00631 
00632 class INVENTOR_API SoComposeMatrix : public SoEngine {
00633     SO_COMPOSE__HEADER(SoComposeMatrix);
00634 public:
00636 
00637 
00639     SoMFVec3f           translation;    
00640 
00642     SoMFRotation        rotation;       
00643 
00645     SoMFVec3f           scaleFactor;    
00646 
00648     SoMFRotation        scaleOrientation;
00649 
00651     SoMFVec3f           center;         
00652 
00654 
00656 
00657 
00660     SoEngineOutput      matrix;         
00661 
00663 
00664 };
00665 
00666 
00678 
00707 
00708 
00709 class INVENTOR_API SoDecomposeMatrix : public SoEngine {
00710     SO_COMPOSE__HEADER(SoDecomposeMatrix);
00711 public:
00713 
00714 
00716     SoMFMatrix          matrix;         
00717 
00719     SoMFVec3f           center;         
00720 
00722 
00724 
00725 
00727     SoEngineOutput      translation;    
00728 
00730     SoEngineOutput      rotation;       
00731 
00733     SoEngineOutput      scaleFactor;    
00734 
00736     SoEngineOutput      scaleOrientation;
00737 
00739 
00740 };
00741 
00742 #endif  /* _SO_COMPOSE_ */