changed: gcc8 base update
[opensg.git] / Source / System / NodeCores / Groups / Misc / OSGBillboard.h
blobbb888f92fc3da54381ef55e97c09902cbdeb74ae
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
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. *
18 * *
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. *
23 * *
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. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGBILLBOARD_H_
40 #define _OSGBILLBOARD_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGBillboardBase.h"
46 #include "OSGAction.h"
48 OSG_BEGIN_NAMESPACE
50 /*! \brief *put brief class description here*
51 \ingroup GrpGroupMiscObj
52 \ingroup GrpLibOSGGroup
53 \includebasedoc
56 class OSG_GROUP_DLLMAPPING Billboard : public BillboardBase
58 /*========================== PUBLIC =================================*/
60 public:
62 /*---------------------------------------------------------------------*/
63 /*! \name Sync */
64 /*! \{ */
66 virtual void changed(ConstFieldMaskArg whichField,
67 UInt32 origin,
68 BitVector detail);
70 /*! \} */
71 /*---------------------------------------------------------------------*/
72 /*! \name calc the model matrix */
73 /*! \{ */
75 void calcMatrix(const Matrix &camToWorld,
76 const Matrix &mToWorld,
77 Matrix &mResult);
79 /*! \} */
80 /*---------------------------------------------------------------------*/
81 /*! \name Transformation */
82 /*! \{ */
84 virtual void accumulateMatrix(Matrix &result);
86 /*! \} */
87 /*---------------------------------------------------------------------*/
88 /*! \name Output */
89 /*! \{ */
91 virtual void dump( UInt32 uiIndent = 0,
92 const BitVector bvFlags = 0) const;
94 /*! \} */
95 /*========================= PROTECTED ===============================*/
97 protected:
99 // Variables should all be in BillboardBase.
101 Matrix _camTransform;
103 /*---------------------------------------------------------------------*/
104 /*! \name Constructors */
105 /*! \{ */
107 Billboard(void);
108 Billboard(const Billboard &source);
110 /*! \} */
111 /*---------------------------------------------------------------------*/
112 /*! \name Destructors */
113 /*! \{ */
115 virtual ~Billboard(void);
117 /*! \} */
118 /*---------------------------------------------------------------------*/
119 /*! \name Volume */
120 /*! \{ */
122 virtual void adjustVolume (Volume &volume);
124 /*! \} */
125 /*---------------------------------------------------------------------*/
126 /*! \name Draw & Intersect & Render */
127 /*! \{ */
129 Action::ResultE intersectEnter(Action *action);
130 Action::ResultE intersectLeave(Action *action);
132 Action::ResultE renderEnter (Action *action);
133 Action::ResultE renderLeave (Action *action);
135 /*! \} */
136 /*========================== PRIVATE ================================*/
138 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;
153 OSG_END_NAMESPACE
155 #include "OSGBillboardBase.inl"
156 #include "OSGBillboard.inl"
158 #endif /* _OSGBILLBOARD_H_ */