Coin Logo http://www.sim.no
http://www.coin3d.org

SoGetMatrixAction.h
1 #ifndef COIN_SOGETMATRIXACTION_H
2 #define COIN_SOGETMATRIXACTION_H
3 
4 /**************************************************************************\
5  *
6  * This file is part of the Coin 3D visualization library.
7  * Copyright (C) 1998-2007 by Systems in Motion. All rights reserved.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * ("GPL") version 2 as published by the Free Software Foundation.
12  * See the file LICENSE.GPL at the root directory of this source
13  * distribution for additional information about the GNU GPL.
14  *
15  * For using Coin with software that can not be combined with the GNU
16  * GPL, and for taking advantage of the additional benefits of our
17  * support services, please contact Systems in Motion about acquiring
18  * a Coin Professional Edition License.
19  *
20  * See http://www.coin3d.org/ for more information.
21  *
22  * Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
23  * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24  *
25 \**************************************************************************/
26 
27 #include <Inventor/actions/SoAction.h>
28 #include <Inventor/actions/SoSubAction.h>
29 #include <Inventor/SbViewportRegion.h>
30 #include <Inventor/SbRotation.h>
31 #include <Inventor/SbMatrix.h>
32 #include <Inventor/SbVec3f.h>
33 
34 
35 class COIN_DLL_API SoGetMatrixAction : public SoAction {
36  typedef SoAction inherited;
37 
38  SO_ACTION_HEADER(SoGetMatrixAction);
39 
40 public:
41  SoGetMatrixAction(const SbViewportRegion & region);
42  virtual ~SoGetMatrixAction();
43 
44  static void initClass(void);
45 
46  void setViewportRegion(const SbViewportRegion & region);
47  const SbViewportRegion & getViewportRegion(void) const;
48 
49  SbMatrix & getMatrix(void);
50  SbMatrix & getInverse(void);
51  SbMatrix & getTextureMatrix(void);
52  SbMatrix & getTextureInverse(void);
53 
54 protected:
55  virtual void beginTraversal(SoNode * node);
56 
57 private:
58  SbMatrix matrix, invmatrix;
59  SbMatrix texmatrix, invtexmatrix;
60  SbViewportRegion viewportregion;
61 };
62 
63 #endif // !COIN_SOGETMATRIXACTION_H
SoGetMatrixAction::SoGetMatrixAction
SoGetMatrixAction(const SbViewportRegion &region)
Definition: SoGetMatrixAction.cpp:109
SbMatrix
The SbMatrix class is a 4x4 dimensional representation of a matrix.
Definition: SbMatrix.h:37
SoGetMatrixAction::getTextureInverse
SbMatrix & getTextureInverse(void)
Definition: SoGetMatrixAction.cpp:178
SoAction::beginTraversal
virtual void beginTraversal(SoNode *node)
Definition: SoAction.cpp:1208
SoGetMatrixAction::getInverse
SbMatrix & getInverse(void)
Definition: SoGetMatrixAction.cpp:160
SoGetMatrixAction::getViewportRegion
const SbViewportRegion & getViewportRegion(void) const
Definition: SoGetMatrixAction.cpp:137
SoGetMatrixAction::setViewportRegion
void setViewportRegion(const SbViewportRegion &region)
Definition: SoGetMatrixAction.cpp:128
SoAction
The SoAction class is the base class for all traversal actions.
Definition: SoAction.h:67
SoGetMatrixAction::getTextureMatrix
SbMatrix & getTextureMatrix(void)
Definition: SoGetMatrixAction.cpp:169
SoGetMatrixAction::beginTraversal
virtual void beginTraversal(SoNode *node)
Definition: SoGetMatrixAction.cpp:186
SoAction::traversalMethods
SoActionMethodList * traversalMethods
Definition: SoAction.h:133
SoGetMatrixAction
The SoGetMatrixAction class is an action for accumulating the transformation matrix of a subgraph.
Definition: SoGetMatrixAction.h:35
SoGetMatrixAction::getMatrix
SbMatrix & getMatrix(void)
Definition: SoGetMatrixAction.cpp:151
SbMatrix::makeIdentity
void makeIdentity(void)
Definition: SbMatrix.cpp:297
SbViewportRegion
The SbViewportRegion class is a viewport within a full window.
Definition: SbViewportRegion.h:31
SoAction::initClass
static void initClass(void)
Definition: SoAction.cpp:392
SoNode
The SoNode class is the base class for nodes used in scene graphs.
Definition: SoNode.h:47
SoAction::traverse
void traverse(SoNode *const node)
Definition: SoAction.cpp:902
SoGetMatrixAction::~SoGetMatrixAction
virtual ~SoGetMatrixAction()
Definition: SoGetMatrixAction.cpp:118
SoAction::state
SoState * state
Definition: SoAction.h:132

Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.

Generated on Mon Jul 27 2020 for Coin by Doxygen. 1.8.18