fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / NodeCores / Groups / Light / OSGPointLight.h
blob89902acbe09f28f73192899da2746b7f7eb3cbb9
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 _OSGPOINTLIGHT_H_
40 #define _OSGPOINTLIGHT_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGConfig.h"
46 #include "OSGPointLightBase.h"
47 #include "OSGStatIntElem.h"
48 #include "OSGStatElemDesc.h"
50 OSG_BEGIN_NAMESPACE
52 /*! \brief Point Light
53 \ingroup GrpGroupLightObj
54 \ingroup GrpLibOSGGroup
55 \includebasedoc
58 class OSG_GROUP_DLLMAPPING PointLight : public PointLightBase
60 /*========================== PUBLIC =================================*/
62 public:
64 /*---------------------------------------------------------------------*/
65 /*! \name static stat elem */
66 /*! \{ */
68 static StatElemDesc<StatIntElem> statNPointLights;
70 /*! \} */
71 /*---------------------------------------------------------------------*/
72 /*! \name Access Fields */
73 /*! \{ */
75 void setPosition ( Real32 rX,
76 Real32 rY,
77 Real32 rZ );
78 void setPosition (const Pnt3f &pos );
80 void setAttenuation( Real32 rConstant ,
81 Real32 rLinear ,
82 Real32 rQuadratic);
84 /*! \} */
85 /*---------------------------------------------------------------------*/
86 /*! \name Chunk */
87 /*! \{ */
89 virtual void makeChunk(void);
91 /*! \} */
92 /*---------------------------------------------------------------------*/
93 /*! \name Sync */
94 /*! \{ */
96 virtual void changed(ConstFieldMaskArg whichField,
97 UInt32 origin,
98 BitVector detail);
100 /*! \} */
101 /*---------------------------------------------------------------------*/
102 /*! \name LightEngine */
103 /*! \{ */
105 virtual void callLightEngineEnter(RenderAction *ract);
106 virtual void callLightEngineLeave(RenderAction *ract);
108 /*! \} */
109 /*---------------------------------------------------------------------*/
110 /*! \name Dump */
111 /*! \{ */
113 virtual void dump( UInt32 uiIndent = 0,
114 const BitVector bvFlags = 0) const;
116 /*! \} */
117 /*========================= PROTECTED ===============================*/
119 protected:
121 typedef PointLightBase Inherited;
123 /*---------------------------------------------------------------------*/
124 /*! \name Constructors */
125 /*! \{ */
127 PointLight(void);
128 PointLight(const PointLight &source);
130 /*! \} */
131 /*---------------------------------------------------------------------*/
132 /*! \name Destructors */
133 /*! \{ */
135 virtual ~PointLight(void);
137 /*! \} */
138 /*---------------------------------------------------------------------*/
139 /*! \name Init */
140 /*! \{ */
142 static void initMethod(InitPhase ePhase);
144 /*! \} */
145 /*---------------------------------------------------------------------*/
146 /*! \name Actions */
147 /*! \{ */
149 Action::ResultE renderEnter(Action *action);
150 Action::ResultE renderLeave(Action *action);
152 /*! \} */
153 /*========================== PRIVATE ================================*/
155 private:
157 friend class FieldContainer;
158 friend class PointLightBase;
160 /*! \brief prohibit default function (move to 'public' if needed) */
161 void operator =(const PointLight &source);
164 typedef PointLight *PointLightP;
166 OSG_END_NAMESPACE
168 #include "OSGPointLightBase.inl"
169 #include "OSGPointLight.inl"
171 #endif /* _OSGPOINTLIGHT_H_ */