Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OSGSpotLightBase.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *               Copyright (C) 2000-2002 by the OpenSG Forum                 *
00006  *                                                                           *
00007  *                            www.opensg.org                                 *
00008  *                                                                           *
00009  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00010  *                                                                           *
00011 \*---------------------------------------------------------------------------*/
00012 /*---------------------------------------------------------------------------*\
00013  *                                License                                    *
00014  *                                                                           *
00015  * This library is free software; you can redistribute it and/or modify it   *
00016  * under the terms of the GNU Library General Public License as published    *
00017  * by the Free Software Foundation, version 2.                               *
00018  *                                                                           *
00019  * This library is distributed in the hope that it will be useful, but       *
00020  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00022  * Library General Public License for more details.                          *
00023  *                                                                           *
00024  * You should have received a copy of the GNU Library General Public         *
00025  * License along with this library; if not, write to the Free Software       *
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00027  *                                                                           *
00028 \*---------------------------------------------------------------------------*/
00029 /*---------------------------------------------------------------------------*\
00030  *                                Changes                                    *
00031  *                                                                           *
00032  *                                                                           *
00033  *                                                                           *
00034  *                                                                           *
00035  *                                                                           *
00036  *                                                                           *
00037 \*---------------------------------------------------------------------------*/
00038 
00039 /*****************************************************************************\
00040  *****************************************************************************
00041  **                                                                         **
00042  **                  This file is automatically generated.                  **
00043  **                                                                         **
00044  **          Any changes made to this file WILL be lost when it is          **
00045  **           regenerated, which can become necessary at any time.          **
00046  **                                                                         **
00047  **     Do not change this file, changes should be done in the derived      **
00048  **     class SpotLight
00049  **                                                                         **
00050  *****************************************************************************
00051 \*****************************************************************************/
00052 
00053 
00054 #ifndef _OSGSPOTLIGHTBASE_H_
00055 #define _OSGSPOTLIGHTBASE_H_
00056 #ifdef __sgi
00057 #pragma once
00058 #endif
00059 
00060 
00061 #include <OSGConfig.h>
00062 #include <OSGSystemDef.h>
00063 
00064 #include <OSGBaseTypes.h>
00065 #include <OSGRefPtr.h>
00066 #include <OSGCoredNodePtr.h>
00067 
00068 #include <OSGPointLight.h> // Parent
00069 
00070 #include <OSGVec3fFields.h> // Direction type
00071 #include <OSGReal32Fields.h> // SpotExponent type
00072 #include <OSGReal32Fields.h> // SpotCutOff type
00073 
00074 #include <OSGSpotLightFields.h>
00075 
00076 OSG_BEGIN_NAMESPACE
00077 
00078 class SpotLight;
00079 class BinaryDataHandler;
00080 
00082 
00083 class OSG_SYSTEMLIB_DLLMAPPING SpotLightBase : public PointLight
00084 {
00085   private:
00086 
00087     typedef PointLight    Inherited;
00088 
00089     /*==========================  PUBLIC  =================================*/
00090   public:
00091 
00092     typedef SpotLightPtr  Ptr;
00093 
00094     enum
00095     {
00096         DirectionFieldId    = Inherited::NextFieldId,
00097         SpotExponentFieldId = DirectionFieldId    + 1,
00098         SpotCutOffFieldId   = SpotExponentFieldId + 1,
00099         NextFieldId         = SpotCutOffFieldId   + 1
00100     };
00101 
00102     static const OSG::BitVector DirectionFieldMask;
00103     static const OSG::BitVector SpotExponentFieldMask;
00104     static const OSG::BitVector SpotCutOffFieldMask;
00105 
00106 
00107     static const OSG::BitVector MTInfluenceMask;
00108 
00109     /*---------------------------------------------------------------------*/
00113     static        FieldContainerType &getClassType    (void); 
00114     static        UInt32              getClassTypeId  (void); 
00115 
00117     /*---------------------------------------------------------------------*/
00121     virtual       FieldContainerType &getType  (void); 
00122     virtual const FieldContainerType &getType  (void) const; 
00123 
00124     virtual       UInt32              getContainerSize(void) const;
00125 
00127     /*---------------------------------------------------------------------*/
00131            SFVec3f             *getSFDirection      (void);
00132            SFReal32            *getSFSpotExponent   (void);
00133            SFReal32            *getSFSpotCutOff     (void);
00134 
00135            Vec3f               &getDirection      (void);
00136      const Vec3f               &getDirection      (void) const;
00137            Real32              &getSpotExponent   (void);
00138      const Real32              &getSpotExponent   (void) const;
00139            Real32              &getSpotCutOff     (void);
00140      const Real32              &getSpotCutOff     (void) const;
00141 
00143     /*---------------------------------------------------------------------*/
00147      void setDirection      ( const Vec3f &value );
00148      void setSpotExponent   ( const Real32 &value );
00149      void setSpotCutOff     ( const Real32 &value );
00150 
00152     /*---------------------------------------------------------------------*/
00157     /*---------------------------------------------------------------------*/
00161     virtual UInt32 getBinSize (const BitVector         &whichField);
00162     virtual void   copyToBin  (      BinaryDataHandler &pMem,
00163                                const BitVector         &whichField);
00164     virtual void   copyFromBin(      BinaryDataHandler &pMem,
00165                                const BitVector         &whichField);
00166 
00167 
00169     /*---------------------------------------------------------------------*/
00173     static  SpotLightPtr      create          (void); 
00174     static  SpotLightPtr      createEmpty     (void); 
00175 
00178     /*---------------------------------------------------------------------*/
00182     virtual FieldContainerPtr     shallowCopy     (void) const; 
00183 
00185     /*=========================  PROTECTED  ===============================*/
00186   protected:
00187 
00188     /*---------------------------------------------------------------------*/
00192     SFVec3f             _sfDirection;
00193     SFReal32            _sfSpotExponent;
00194     SFReal32            _sfSpotCutOff;
00195 
00197     /*---------------------------------------------------------------------*/
00201     SpotLightBase(void);
00202     SpotLightBase(const SpotLightBase &source);
00203 
00205     /*---------------------------------------------------------------------*/
00209     virtual ~SpotLightBase(void); 
00210 
00212     /*---------------------------------------------------------------------*/
00216 #if !defined(OSG_FIXED_MFIELDSYNC)
00217     void executeSyncImpl(      SpotLightBase *pOther,
00218                          const BitVector         &whichField);
00219 
00220     virtual void   executeSync(      FieldContainer    &other,
00221                                const BitVector         &whichField);
00222 #else
00223     void executeSyncImpl(      SpotLightBase *pOther,
00224                          const BitVector         &whichField,
00225                          const SyncInfo          &sInfo     );
00226 
00227     virtual void   executeSync(      FieldContainer    &other,
00228                                const BitVector         &whichField,
00229                                const SyncInfo          &sInfo);
00230 
00231     virtual void execBeginEdit     (const BitVector &whichField,
00232                                           UInt32     uiAspect,
00233                                           UInt32     uiContainerSize);
00234 
00235             void execBeginEditImpl (const BitVector &whichField,
00236                                           UInt32     uiAspect,
00237                                           UInt32     uiContainerSize);
00238 
00239     virtual void onDestroyAspect(UInt32 uiId, UInt32 uiAspect);
00240 #endif
00241 
00243     /*==========================  PRIVATE  ================================*/
00244   private:
00245 
00246     friend class FieldContainer;
00247 
00248     static FieldDescription   *_desc[];
00249     static FieldContainerType  _type;
00250 
00251 
00252     // prohibit default functions (move to 'public' if you need one)
00253     void operator =(const SpotLightBase &source);
00254 };
00255 
00256 //---------------------------------------------------------------------------
00257 //   Exported Types
00258 //---------------------------------------------------------------------------
00259 
00260 
00261 typedef SpotLightBase *SpotLightBaseP;
00262 
00263 typedef osgIF<SpotLightBase::isNodeCore,
00264               CoredNodePtr<SpotLight>,
00265               FieldContainer::attempt_to_create_CoredNodePtr_on_non_NodeCore_FC
00266               >::_IRet SpotLightNodePtr;
00267 
00268 typedef RefPtr<SpotLightPtr> SpotLightRefPtr;
00269 
00270 OSG_END_NAMESPACE
00271 
00272 #define OSGSPOTLIGHTBASE_HEADER_CVSID "@(#)$Id: FCBaseTemplate_h.h,v 1.38 2005/07/08 06:37:35 vossg Exp $"
00273 
00274 #endif /* _OSGSPOTLIGHTBASE_H_ */

Generated on Thu Aug 25 04:10:38 2005 for OpenSG by  doxygen 1.4.3