changed: gcc8 base update
[opensg.git] / Source / System / NodeCores / Groups / Light / OSGDirectionalLight.h
blobef2b3fbc18a3c60bc96a77948679540ec8051708
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 _OSGDIRECTIONALLIGHT_H_
40 #define _OSGDIRECTIONALLIGHT_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGDirectionalLightBase.h"
46 #include "OSGStatIntElem.h"
47 #include "OSGStatElemDesc.h"
49 OSG_BEGIN_NAMESPACE
51 /*! \brief Directional light
52 \ingroup GrpGroupLightObj
53 \ingroup GrpLibOSGGroup
54 \includebasedoc
57 class OSG_GROUP_DLLMAPPING DirectionalLight : public DirectionalLightBase
59 /*========================== PUBLIC =================================*/
61 public:
63 /*---------------------------------------------------------------------*/
64 /*! \name static stat elem */
65 /*! \{ */
67 static StatElemDesc<StatIntElem> statNDirectionalLights;
69 /*! \} */
70 /*---------------------------------------------------------------------*/
71 /*! \name Set */
72 /*! \{ */
74 void setDirection( Real32 rX,
75 Real32 rY,
76 Real32 rZ);
77 void setDirection(const Vec3f &direction);
79 /*! \} */
80 /*---------------------------------------------------------------------*/
81 /*! \name Sync */
82 /*! \{ */
84 virtual void changed(ConstFieldMaskArg whichField,
85 UInt32 origin,
86 BitVector detail);
88 /*! \} */
89 /*---------------------------------------------------------------------*/
90 /*! \name Chunk */
91 /*! \{ */
93 virtual void makeChunk(void);
95 /*! \} */
96 /*---------------------------------------------------------------------*/
97 /*! \name LightEngine */
98 /*! \{ */
100 virtual void callLightEngineEnter(RenderAction *ract);
101 virtual void callLightEngineLeave(RenderAction *ract);
103 /*! \} */
104 /*---------------------------------------------------------------------*/
105 /*! \name Dump */
106 /*! \{ */
108 virtual void dump( UInt32 uiIndent = 0,
109 const BitVector bvFlags = 0) const;
111 /*! \} */
112 /*========================= PROTECTED ===============================*/
114 protected:
116 typedef DirectionalLightBase Inherited;
118 /*---------------------------------------------------------------------*/
119 /*! \name Constructors */
120 /*! \{ */
122 DirectionalLight(void);
123 DirectionalLight(const DirectionalLight &source);
125 /*! \} */
126 /*---------------------------------------------------------------------*/
127 /*! \name Destructors */
128 /*! \{ */
130 virtual ~DirectionalLight(void);
132 /*! \} */
133 /*---------------------------------------------------------------------*/
134 /*! \name Init */
135 /*! \{ */
137 static void initMethod(InitPhase ePhase);
139 /*! \} */
140 /*---------------------------------------------------------------------*/
141 /*! \name Actions */
142 /*! \{ */
144 Action::ResultE renderEnter(Action *action);
145 Action::ResultE renderLeave(Action *action);
147 /*! \} */
148 /*========================== PRIVATE ================================*/
150 private:
152 friend class FieldContainer;
153 friend class DirectionalLightBase;
155 /*! \brief prohibit default function (move to 'public' if needed) */
156 void operator =(const DirectionalLight &source);
159 typedef DirectionalLight *DirectionalLightP;
161 OSG_END_NAMESPACE
163 #include "OSGDirectionalLightBase.inl"
164 #include "OSGDirectionalLight.inl"
166 #endif /* _OSGDIRECTIONALLIGHT_H_ */