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
35class COIN_DLL_API SoGetMatrixAction : public SoAction {
36 typedef SoAction inherited;
37
38 SO_ACTION_HEADER(SoGetMatrixAction);
39
40public:
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
54protected:
55 virtual void beginTraversal(SoNode * node);
56
57private:
58 SbMatrix matrix, invmatrix;
59 SbMatrix texmatrix, invtexmatrix;
60 SbViewportRegion viewportregion;
61};
62
63#endif // !COIN_SOGETMATRIXACTION_H
The SbMatrix class is a 4x4 dimensional representation of a matrix.
Definition: SbMatrix.h:37
The SbViewportRegion class is a viewport within a full window.
Definition: SbViewportRegion.h:31
The SoAction class is the base class for all traversal actions.
Definition: SoAction.h:67
static void initClass(void)
Definition: SoAction.cpp:392
virtual void beginTraversal(SoNode *node)
Definition: SoAction.cpp:1208
The SoGetMatrixAction class is an action for accumulating the transformation matrix of a subgraph.
Definition: SoGetMatrixAction.h:35
The SoNode class is the base class for nodes used in scene graphs.
Definition: SoNode.h:47

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

Generated on Wed Jan 18 2023 for Coin by Doxygen. 1.9.6