00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 #ifndef _SO_VRMLTRANSFORM_
00052 #define _SO_VRMLTRANSFORM_
00053
00054 #include <Inventor/fields/SoSFRotation.h>
00055 #include <Inventor/fields/SoSFVec3f.h>
00056 #include <Inventor/VRMLnodes/SoVRMLGroup.h>
00057
00058
00059 #if defined(OIV_IGNORE_VRML_DEPRECATED)
00060 #include <SoDeprecationRules.h>
00061 #pragma push_macro("SoDEPRECATED_CLASS")
00062 #pragma push_macro("SoDEPRECATED_TYPEDEF")
00063 #undef SoDEPRECATED_CLASS
00064 #undef SoDEPRECATED_TYPEDEF
00065 #define SoDEPRECATED_CLASS(x,y)
00066 #define SoDEPRECATED_TYPEDEF(x,y)
00067 #endif
00068
00069 class SoState;
00070
00072
00073
00074
00075
00076
00078 class SoDEPRECATED SoVRMLTransform : public SoVRMLGroup {
00216
00217 SO_NODE_HEADER(SoVRMLTransform);
00218
00219 public:
00220
00224 SoSFVec3f translation;
00225
00229 SoSFRotation rotation;
00230
00234 SoSFVec3f scale;
00235
00239 SoSFRotation scaleOrientation;
00240
00244 SoSFVec3f center;
00245
00249 SoVRMLTransform();
00250
00254 SoVRMLTransform(int nChildren);
00255
00262 void pointAt(const SbVec3f &fromPoint,
00263 const SbVec3f &toPoint);
00264
00269 void getScaleSpaceMatrix(SbMatrix &mat, SbMatrix &inv) const;
00270
00275 void getRotationSpaceMatrix(SbMatrix &mat,
00276 SbMatrix &inv) const;
00281 void getTranslationSpaceMatrix(SbMatrix &mat,
00282 SbMatrix &inv) const;
00283
00289 void multLeft(const SbMatrix &mat);
00290
00296 void multRight(const SbMatrix &mat);
00297
00302 void combineLeft(SoVRMLTransform *nodeOnLeft);
00303
00308 void combineRight(SoVRMLTransform *nodeOnRight);
00309
00314 void setMatrix(const SbMatrix &mat);
00315
00320 void recenter(const SbVec3f &newCenter);
00321
00322 private:
00323 virtual void doAction(SoAction *action);
00324 virtual void callback(SoCallbackAction *action);
00325 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
00326 virtual void getMatrix(SoGetMatrixAction *action);
00327 virtual void rayPick(SoRayPickAction *action);
00328 virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action);
00329 virtual void search(SoSearchAction *action);
00330
00331
00332
00333
00334 virtual void GLRenderBelowPath(SoGLRenderAction *action);
00335 virtual void GLRenderInPath(SoGLRenderAction *action);
00336
00337 private:
00338 static void initClass();
00339 static void exitClass();
00340
00341 virtual void notify(SoNotList *list);
00342
00343 private:
00344
00345 virtual ~SoVRMLTransform();
00346
00347 private:
00348 void setupModelMatrixElement(SoState *state);
00349
00350 };
00351
00352
00353
00354 #if defined(OIV_IGNORE_VRML_DEPRECATED)
00355 #pragma pop_macro("SoDEPRECATED_TYPEDEF")
00356 #pragma pop_macro("SoDEPRECATED_CLASS")
00357 #endif
00358
00359 #endif
00360