MeVisLab Toolbox Reference
SoCSOTransform.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #pragma once
14 
15 #include "SoCSOSystem.h"
16 
17 #include <ThirdPartyWarningsDisable.h>
18 #include <Inventor/nodes/SoSubNode.h>
19 #include <Inventor/fields/SoSFMatrix.h>
20 #include <Inventor/fields/SoSFBool.h>
21 #include <Inventor/SbLinear.h>
22 #include <ThirdPartyWarningsRestore.h>
23 
25 class SOCSO_EXPORT SoCSOTransform : public SoNode
26 {
27  typedef SoNode inherited;
28 
29  SO_NODE_HEADER(SoCSOTransform);
30 
31 public:
32  SoSFMatrix affineMatrix;
34 
35 SoEXTENDER public:
36 
38  void GLRender(SoGLRenderAction *action) override;
39  void pick(SoPickAction *action) override;
40  void handleEvent(SoHandleEventAction *action) override;
41 
42 SoINTERNAL public:
43 
45  static void initClass();
46 
47  void transformPoint(const SbVec3f& inPosition, SbVec3f& outPosition);
48  void inverseTransformPoint(const SbVec3f& inPosition, SbVec3f& outPosition);
49 
50  SbMatrix getMatrix() { return affineMatrix.getValue(); }
51  SbMatrix getMatrixInverse() { return affineMatrix.getValue().inverse(); }
52 
53 protected:
54 
57 };
#define SOCSO_EXPORT
Header file for system independent resolution.
Definition: SoCSOSystem.h:21
Abstract Open Inventor base class for uniform shader parameter nodes.
void inverseTransformPoint(const SbVec3f &inPosition, SbVec3f &outPosition)
SoSFBool interpretMatrixAsMLMatrix
void pick(SoPickAction *action) override
SbMatrix getMatrix()
SbMatrix getMatrixInverse()
void transformPoint(const SbVec3f &inPosition, SbVec3f &outPosition)
static void initClass()
Initialize class with runtime type system.
SoCSOTransform()
Constructor.
void GLRender(SoGLRenderAction *action) override
Add this node to element in state.
void handleEvent(SoHandleEventAction *action) override
SoSFMatrix affineMatrix