MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 //---------------------------------------------------------------------------------- 00004 00009 //---------------------------------------------------------------------------------- 00010 00011 #ifndef _SO_CSO_TRANSFORM_ 00012 #define _SO_CSO_TRANSFORM_ 00013 00014 #include "SoCSOSystem.h" 00015 #include <Inventor/nodes/SoSubNode.h> 00016 #include "Inventor/fields/SoSFMatrix.h" 00017 #include "Inventor/SbLinear.h" 00018 00020 class SOCSO_EXPORT SoCSOTransform : public SoNode 00021 { 00022 typedef SoNode inherited; 00023 00024 SO_NODE_HEADER(SoCSOTransform); 00025 00026 public: 00027 SoSFMatrix affineMatrix; 00028 00029 SoEXTENDER public: 00030 00032 virtual void GLRender(SoGLRenderAction *action); 00033 virtual void pick(SoPickAction *action); 00034 virtual void handleEvent(SoHandleEventAction *action); 00035 00036 SoINTERNAL public: 00037 00039 static void initClass(); 00040 00041 void transformPoint(const SbVec3f& inPosition, SbVec3f& outPosition); 00042 void inverseTransformPoint(const SbVec3f& inPosition, SbVec3f& outPosition); 00043 00044 SbMatrix getMatrix() { return affineMatrix.getValue(); } 00045 SbMatrix getMatrixInverse() { return affineMatrix.getValue().inverse(); } 00046 00047 protected: 00048 00050 SoCSOTransform(); 00051 }; 00052 00053 #endif // _SO_CSO_TRANSFORM_