Main Page Modules Class Hierarchy Alphabetical List Compound List File List Compound Members

# SoTransform.h

    00001 #ifndef COIN_SOTRANSFORM_H
    00002 #define COIN_SOTRANSFORM_H
    00003
    00004 /**************************************************************************\
    00005  *
    00006  *  This file is part of the Coin 3D visualization library.
    00007  *  Copyright (C) 1998-2003 by Systems in Motion.  All rights reserved.
    00008  *
    00009  *  This library is free software; you can redistribute it and/or
    00010  *  modify it under the terms of the GNU General Public License
    00011  *  ("GPL") version 2 as published by the Free Software Foundation.
    00012  *  See the file LICENSE.GPL at the root directory of this source
    00013  *  distribution for additional information about the GNU GPL.
    00014  *
    00015  *  For using Coin with software that can not be combined with the GNU
    00016  *  GPL, and for taking advantage of the additional benefits of our
    00017  *  support services, please contact Systems in Motion about acquiring
    00018  *  a Coin Professional Edition License.
    00019  *
    00020  *  See <URL:http://www.coin3d.org> for  more information.
    00021  *
    00022  *  Systems in Motion, Teknobyen, Abels Gate 5, 7030 Trondheim, NORWAY.
    00023  *  <URL:http://www.sim.no>.
    00024  *
    00025 \**************************************************************************/
    00026
    00027 #include <Inventor/nodes/SoSubNode.h>
    00028 #include <Inventor/fields/SoSFRotation.h>
    00029 #include <Inventor/fields/SoSFVec3f.h>
    00030 #include <Inventor/nodes/SoTransformation.h>
    00031 #include <Inventor/SbMatrix.h>
    00032 #include <Inventor/SbVec3f.h>
    00033
    00034 class COIN_DLL_API SoTransform : public SoTransformation {
    00035   typedef SoTransformation inherited;
    00036
    00037   SO_NODE_HEADER(SoTransform);
    00038
    00039 public:
    00040   static void initClass(void);
    00041   SoTransform(void);
    00042
    00043   SoSFVec3f translation;
    00044   SoSFRotation rotation;
    00045   SoSFVec3f scaleFactor;
    00046   SoSFRotation scaleOrientation;
    00047   SoSFVec3f center;
    00048
    00049   void pointAt(const SbVec3f & frompoint, const SbVec3f & topoint);
    00050   void getScaleSpaceMatrix(SbMatrix & mat, SbMatrix & inv) const;
    00051   void getRotationSpaceMatrix(SbMatrix & mat, SbMatrix & inv) const;
    00052   void getTranslationSpaceMatrix(SbMatrix & mat, SbMatrix & inv) const;
    00053   void multLeft(const SbMatrix & mat);
    00054   void multRight(const SbMatrix & mat);
    00055   void combineLeft(SoTransformation * nodeonright);
    00056   void combineRight(SoTransformation * nodeonleft);
    00057   void setMatrix(const SbMatrix & mat);
    00058   void recenter(const SbVec3f & newcenter);
    00059
    00060   virtual void doAction(SoAction * action);
    00061   virtual void GLRender(SoGLRenderAction * action);
    00062   virtual void callback(SoCallbackAction * action);
    00063   virtual void getBoundingBox(SoGetBoundingBoxAction * action);
    00064   virtual void getMatrix(SoGetMatrixAction * action);
    00065   virtual void pick(SoPickAction * action);
    00066   virtual void getPrimitiveCount(SoGetPrimitiveCountAction * action);
    00067
    00068 protected:
    00069   virtual ~SoTransform();
    00070 };
    00071
    00072 #endif // !COIN_SOTRANSFORM_H