1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGBILLBOARD_H_
40 #define _OSGBILLBOARD_H_
45 #include "OSGBillboardBase.h"
46 #include "OSGAction.h"
50 /*! \brief *put brief class description here*
51 \ingroup GrpGroupMiscObj
52 \ingroup GrpLibOSGGroup
56 class OSG_GROUP_DLLMAPPING Billboard
: public BillboardBase
58 /*========================== PUBLIC =================================*/
62 /*---------------------------------------------------------------------*/
66 virtual void changed(ConstFieldMaskArg whichField
,
71 /*---------------------------------------------------------------------*/
72 /*! \name calc the model matrix */
75 void calcMatrix(const Matrix
&camToWorld
,
76 const Matrix
&mToWorld
,
80 /*---------------------------------------------------------------------*/
81 /*! \name Transformation */
84 virtual void accumulateMatrix(Matrix
&result
);
87 /*---------------------------------------------------------------------*/
91 virtual void dump( UInt32 uiIndent
= 0,
92 const BitVector bvFlags
= 0) const;
95 /*========================= PROTECTED ===============================*/
99 // Variables should all be in BillboardBase.
101 Matrix _camTransform
;
103 /*---------------------------------------------------------------------*/
104 /*! \name Constructors */
108 Billboard(const Billboard
&source
);
111 /*---------------------------------------------------------------------*/
112 /*! \name Destructors */
115 virtual ~Billboard(void);
118 /*---------------------------------------------------------------------*/
122 virtual void adjustVolume (Volume
&volume
);
125 /*---------------------------------------------------------------------*/
126 /*! \name Draw & Intersect & Render */
129 Action::ResultE
intersectEnter(Action
*action
);
130 Action::ResultE
intersectLeave(Action
*action
);
132 Action::ResultE
renderEnter (Action
*action
);
133 Action::ResultE
renderLeave (Action
*action
);
136 /*========================== PRIVATE ================================*/
140 typedef BillboardBase Inherited
;
142 friend class FieldContainer
;
143 friend class BillboardBase
;
145 static void initMethod(InitPhase ePhase
);
147 // prohibit default functions (move to 'public' if you need one)
148 void operator =(const Billboard
&source
);
151 typedef Billboard
*BillboardP
;
155 #include "OSGBillboardBase.inl"
156 #include "OSGBillboard.inl"
158 #endif /* _OSGBILLBOARD_H_ */