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

SoSurroundScale.h
1 #ifndef COIN_SOSURROUNDSCALE_H
2 #define COIN_SOSURROUNDSCALE_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/nodes/SoSubNode.h>
28 #include <Inventor/nodes/SoTransformation.h>
29 #include <Inventor/fields/SoSFInt32.h>
30 #include <Inventor/SbVec3f.h>
31 
32 class SbMatrix;
33 
34 class COIN_DLL_API SoSurroundScale : public SoTransformation {
36 
37  SO_NODE_HEADER(SoSurroundScale);
38 
39 public:
40  static void initClass(void);
41  SoSurroundScale(void);
42 
45 
46  void invalidate(void);
47  virtual void doAction(SoAction * action);
48  void setDoingTranslations(const SbBool val);
49  SbBool isDoingTranslations(void);
50 
51 protected:
52  virtual ~SoSurroundScale();
53 
54  virtual void callback(SoCallbackAction * action);
55  virtual void GLRender(SoGLRenderAction * action);
56  virtual void getBoundingBox(SoGetBoundingBoxAction * action);
57  virtual void getMatrix(SoGetMatrixAction * action);
58  virtual void pick(SoPickAction * action);
59  void updateMySurroundParams(SoAction * action, const SbMatrix & inv);
60  void setIgnoreInBbox(const SbBool val);
61  SbBool isIgnoreInBbox(void);
62 
63 protected:
67  SbBool cacheOK;
69 
70 private:
71  SbBool ignoreinbbox;
72 };
73 
74 #endif // !COIN_SOSURROUNDSCALE_H
SoSurroundScale::doAction
virtual void doAction(SoAction *action)
Definition: SoSurroundScale.cpp:277
SoSurroundScale::cachedScale
SbVec3f cachedScale
Definition: SoSurroundScale.h:64
SoState
The SoState class manages the Coin scenegraph traversal state data.
Definition: SoState.h:35
SoAction::apply
virtual void apply(SoNode *root)
Definition: SoAction.cpp:476
SoSurroundScale::~SoSurroundScale
virtual ~SoSurroundScale()
Definition: SoSurroundScale.cpp:253
SbMatrix
The SbMatrix class is a 4x4 dimensional representation of a matrix.
Definition: SbMatrix.h:37
SoSurroundScale::cachedInvScale
SbVec3f cachedInvScale
Definition: SoSurroundScale.h:65
SbBox3f::getCenter
SbVec3f getCenter(void) const
Definition: SbBox3f.cpp:161
SoTransformation
The SoTransformation class is the abstract base class for transformation nodes.
Definition: SoTransformation.h:29
SoNode::GLRender
virtual void GLRender(SoGLRenderAction *action)
Definition: SoNode.cpp:904
SoGetMatrixAction::getInverse
SbMatrix & getInverse(void)
Definition: SoGetMatrixAction.cpp:160
SoSurroundScale::SoSurroundScale
SoSurroundScale(void)
Definition: SoSurroundScale.cpp:238
SbBox3f
The SbBox3f class is an abstraction for an axis aligned 3 dimensional box.
Definition: SbBox3f.h:37
SoAction::getCurPath
const SoPath * getCurPath(void)
Definition: SoAction.cpp:1044
SbMatrix::multLeft
SbMatrix & multLeft(const SbMatrix &m)
Definition: SbMatrix.cpp:1280
SoDebugError::postWarning
static void postWarning(const char *const source, const char *const format,...)
Definition: SoDebugError.cpp:324
SoAction
The SoAction class is the base class for all traversal actions.
Definition: SoAction.h:67
SoSurroundScale::doTranslations
SbBool doTranslations
Definition: SoSurroundScale.h:68
SoSurroundScale
The SoSurroundScale class is used to automatically scale geometry to surround other geometry.
Definition: SoSurroundScale.h:34
SoFullPath
The SoFullPath class allows examination of hidden children in paths.
Definition: SoFullPath.h:29
SoSurroundScale::cacheOK
SbBool cacheOK
Definition: SoSurroundScale.h:67
SbMatrix::setScale
void setScale(const float s)
Definition: SbMatrix.cpp:760
SoSurroundScale::isIgnoreInBbox
SbBool isIgnoreInBbox(void)
Definition: SoSurroundScale.cpp:498
SbMatrix::multRight
SbMatrix & multRight(const SbMatrix &m)
Definition: SbMatrix.cpp:1240
SoSFInt32
The SoSFInt32 class is a container for a 32-bit integer value.
Definition: SoSFInt32.h:30
SoSurroundScale::callback
virtual void callback(SoCallbackAction *action)
Definition: SoSurroundScale.cpp:316
SoSurroundScale::setDoingTranslations
void setDoingTranslations(const SbBool val)
Definition: SoSurroundScale.cpp:297
SoSurroundScale::GLRender
virtual void GLRender(SoGLRenderAction *action)
Definition: SoSurroundScale.cpp:323
SoNode::callback
virtual void callback(SoCallbackAction *action)
Definition: SoNode.cpp:974
SoBase::unref
void unref(void) const
Definition: SoBase.cpp:627
SoSurroundScale::invalidate
void invalidate(void)
Definition: SoSurroundScale.cpp:270
SoPath
The SoPath class is a container class for traversal path descriptions.
Definition: SoPath.h:43
SoGetMatrixAction
The SoGetMatrixAction class is an action for accumulating the transformation matrix of a subgraph.
Definition: SoGetMatrixAction.h:35
SoNode::getMatrix
virtual void getMatrix(SoGetMatrixAction *action)
Definition: SoNode.cpp:1001
SoGetMatrixAction::getMatrix
SbMatrix & getMatrix(void)
Definition: SoGetMatrixAction.cpp:151
SoSurroundScale::cachedTranslation
SbVec3f cachedTranslation
Definition: SoSurroundScale.h:66
SoSurroundScale::numNodesUpToContainer
SoSFInt32 numNodesUpToContainer
Definition: SoSurroundScale.h:43
SbVec3f::setValue
SbVec3f & setValue(const float v[3])
Definition: SbVec3f.cpp:461
SoBase
The SoBase class is the top-level superclass for a number of class-hierarchies.
Definition: SoBase.h:41
SoAction::getState
SoState * getState(void) const
Definition: SoAction.cpp:1028
SoState::isElementEnabled
SbBool isElementEnabled(const int stackindex) const
Definition: SoState.h:70
SoSurroundScale::getBoundingBox
virtual void getBoundingBox(SoGetBoundingBoxAction *action)
Definition: SoSurroundScale.cpp:330
SoBase::ref
void ref(void) const
Definition: SoBase.cpp:574
SbVec3f
The SbVec3f class is a 3 dimensional vector with floating point coordinates.
Definition: SbVec3f.h:37
SoGetBoundingBoxAction
The SoGetBoundingBoxAction class calculates bounding boxes for nodes and subgraphs.
Definition: SoGetBoundingBoxAction.h:34
SbBox3f::getSize
void getSize(float &dx, float &dy, float &dz) const
Definition: SbBox3f.cpp:405
SoPath::copy
SoPath * copy(const int startfromnodeindex=0, int numnodes=0) const
Definition: SoPath.cpp:673
SoSurroundScale::pick
virtual void pick(SoPickAction *action)
Definition: SoSurroundScale.cpp:366
SoCallbackAction
The SoCallbackAction class invokes callbacks at specific nodes.
Definition: SoCallbackAction.h:70
SoSurroundScale::isDoingTranslations
SbBool isDoingTranslations(void)
Definition: SoSurroundScale.cpp:309
SbViewportRegion
The SbViewportRegion class is a viewport within a full window.
Definition: SbViewportRegion.h:31
SoGetBoundingBoxAction::getBoundingBox
SbBox3f getBoundingBox(void) const
Definition: SoGetBoundingBoxAction.cpp:307
SoSurroundScale::numNodesUpToReset
SoSFInt32 numNodesUpToReset
Definition: SoSurroundScale.h:44
SoFullPath::getLength
int getLength(void) const
Definition: SoFullPath.cpp:106
SoSurroundScale::updateMySurroundParams
void updateMySurroundParams(SoAction *action, const SbMatrix &inv)
Definition: SoSurroundScale.cpp:376
SoNode::pick
virtual void pick(SoPickAction *action)
Definition: SoNode.cpp:1057
SbMatrix::setTranslate
void setTranslate(const SbVec3f &t)
Definition: SbMatrix.cpp:790
SoNode::doAction
virtual void doAction(SoAction *action)
Definition: SoNode.cpp:761
SoSurroundScale::getMatrix
virtual void getMatrix(SoGetMatrixAction *action)
Definition: SoSurroundScale.cpp:338
SoNode::getBoundingBox
virtual void getBoundingBox(SoGetBoundingBoxAction *action)
Definition: SoNode.cpp:817
SbBox3f::isEmpty
SbBool isEmpty(void) const
Definition: SbBox3f.cpp:436
SoGLRenderAction
The SoGLRenderAction class renders the scene graph with OpenGL calls.
Definition: SoGLRenderAction.h:39
SoSurroundScale::setIgnoreInBbox
void setIgnoreInBbox(const SbBool val)
Definition: SoSurroundScale.cpp:485
SoGetBoundingBoxAction::setResetPath
void setResetPath(const SoPath *path, const SbBool resetbefore=1, const ResetType what=ALL)
Definition: SoGetBoundingBoxAction.cpp:374
SoPickAction
The SoPickAction class is the base class for picking actions.
Definition: SoPickAction.h:32

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

Generated on Wed Jul 24 2019 for Coin by Doxygen. 1.8.17