SoVRMLBillboard.h
/**************************************************************************\
* Copyright (c) Kongsberg Oil & Gas Technologies AS
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\**************************************************************************/
#ifndef COIN_SOVRMLBILLBOARD_H
#define COIN_SOVRMLBILLBOARD_H
#include <Inventor/VRMLnodes/SoVRMLParent.h>
#include <Inventor/nodes/SoSubNode.h>
#include <Inventor/fields/SoSFVec3f.h>
class SbRotation;
class SoState;
class SbViewVolume;
class SbMatrix;
class COIN_DLL_API SoVRMLBillboard : public SoVRMLParent
{
typedef SoVRMLParent inherited;
SO_NODE_HEADER(SoVRMLBillboard);
public:
static void initClass(void);
SoVRMLBillboard(void);
SoVRMLBillboard( int numchildren );
SoSFVec3f axisOfRotation;
SoSFVec3f bboxCenter;
SoSFVec3f bboxSize;
virtual void doAction(SoAction * action);
virtual void callback(SoCallbackAction * action);
virtual void GLRender(SoGLRenderAction * action);
virtual void getBoundingBox(SoGetBoundingBoxAction * action);
virtual void getMatrix(SoGetMatrixAction * action);
virtual void pick(SoPickAction * action);
virtual void search(SoSearchAction * action);
virtual void GLRenderBelowPath(SoGLRenderAction * action);
virtual void GLRenderInPath(SoGLRenderAction * action);
virtual void GLRenderOffPath(SoGLRenderAction * action);
virtual void notify(SoNotList * list);
protected:
virtual ~SoVRMLBillboard();
private:
SbRotation computeRotation(SbMatrix const & invMM, SbViewVolume const & vv) const;
void performRotation(SoState * state) const;
class SoVRMLBillboardP * pimpl;
};
#endif // ! COIN_SOVRMLBILLBOARD_H
SbMatrix
The SbMatrix class is a 4x4 dimensional representation of a matrix.
Definition SbMatrix.h:47
SbRotation
The SbRotation class represents a rotation in 3D space.
Definition SbRotation.h:44
SbViewVolume
The SbViewVolume class is a viewing volume in 3D space.
Definition SbViewVolume.h:50
SoAction
The SoAction class is the base class for all traversal actions.
Definition SoAction.h:77
SoCallbackAction
The SoCallbackAction class invokes callbacks at specific nodes.
Definition SoCallbackAction.h:80
SoGLRenderAction
The SoGLRenderAction class renders the scene graph with OpenGL calls.
Definition SoGLRenderAction.h:50
SoGetBoundingBoxAction
The SoGetBoundingBoxAction class calculates bounding boxes for nodes and subgraphs.
Definition SoGetBoundingBoxAction.h:45
SoGetMatrixAction
The SoGetMatrixAction class is an action for accumulating the transformation matrix of a subgraph.
Definition SoGetMatrixAction.h:46
SoGroup::GLRender
virtual void GLRender(SoGLRenderAction *action)
Definition SoGroup.cpp:614
SoGroup::getMatrix
virtual void getMatrix(SoGetMatrixAction *action)
Definition SoGroup.cpp:696
SoGroup::pick
virtual void pick(SoPickAction *action)
Definition SoGroup.cpp:711
SoGroup::callback
virtual void callback(SoCallbackAction *action)
Definition SoGroup.cpp:689
SoGroup::getBoundingBox
virtual void getBoundingBox(SoGetBoundingBoxAction *action)
Definition SoGroup.cpp:558
SoNode::GLRenderOffPath
virtual void GLRenderOffPath(SoGLRenderAction *action)
Definition SoNode.cpp:1038
SoNode::GLRenderInPath
virtual void GLRenderInPath(SoGLRenderAction *action)
Definition SoNode.cpp:1026
SoNode::GLRenderBelowPath
virtual void GLRenderBelowPath(SoGLRenderAction *action)
Definition SoNode.cpp:1014
SoNotList
The SoNotList class is a list of SoNotRec notification records.
Definition SoNotification.h:43
SoPickAction
The SoPickAction class is the base class for picking actions.
Definition SoPickAction.h:43
SoSFVec3f
The SoSFVec3f class is a container for an SbVec3f vector.
Definition SoSFVec3f.h:40
SoSearchAction
The SoSearchAction class provides methods for searching through scene graphs.
Definition SoSearchAction.h:44
SoState
The SoState class manages the Coin scene graph traversal state data.
Definition SoState.h:44
SoVRMLBillboard::bboxSize
SoSFVec3f bboxSize
Definition SoVRMLBillboard.h:57
SoVRMLBillboard::SoVRMLBillboard
SoVRMLBillboard(void)
Definition Billboard.cpp:215
SoVRMLBillboard::axisOfRotation
SoSFVec3f axisOfRotation
Definition SoVRMLBillboard.h:55
SoVRMLBillboard::bboxCenter
SoSFVec3f bboxCenter
Definition SoVRMLBillboard.h:56
SoVRMLParent::search
virtual void search(SoSearchAction *action)
Definition Parent.cpp:326
SoVRMLParent::initClass
static void initClass(void)
Definition Parent.cpp:132
SoVRMLParent::doAction
virtual void doAction(SoAction *action)
Definition Parent.cpp:319
SoVRMLParent::SoVRMLParent
SoVRMLParent(void)
Definition Parent.cpp:144
SoVRMLParent::notify
virtual void notify(SoNotList *list)
Definition Parent.cpp:361
SO_NODE_HEADER
#define SO_NODE_HEADER(classname)
Definition Coin_macros.dox:50