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

OSGShaderParameterMatrixBase.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 ShaderParameterMatrix
00049  **                                                                         **
00050  *****************************************************************************
00051 \*****************************************************************************/
00052 
00053 
00054 #ifndef _OSGSHADERPARAMETERMATRIXBASE_H_
00055 #define _OSGSHADERPARAMETERMATRIXBASE_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 <OSGShaderParameter.h> // Parent
00069 
00070 #include <OSGMatrixFields.h> // Value type
00071 
00072 #include <OSGShaderParameterMatrixFields.h>
00073 
00074 OSG_BEGIN_NAMESPACE
00075 
00076 class ShaderParameterMatrix;
00077 class BinaryDataHandler;
00078 
00080 
00081 class OSG_SYSTEMLIB_DLLMAPPING ShaderParameterMatrixBase : public ShaderParameter
00082 {
00083   private:
00084 
00085     typedef ShaderParameter    Inherited;
00086 
00087     /*==========================  PUBLIC  =================================*/
00088   public:
00089 
00090     typedef ShaderParameterMatrixPtr  Ptr;
00091 
00092     enum
00093     {
00094         ValueFieldId = Inherited::NextFieldId,
00095         NextFieldId  = ValueFieldId + 1
00096     };
00097 
00098     static const OSG::BitVector ValueFieldMask;
00099 
00100 
00101     static const OSG::BitVector MTInfluenceMask;
00102 
00103     /*---------------------------------------------------------------------*/
00107     static        FieldContainerType &getClassType    (void); 
00108     static        UInt32              getClassTypeId  (void); 
00109 
00111     /*---------------------------------------------------------------------*/
00115     virtual       FieldContainerType &getType  (void); 
00116     virtual const FieldContainerType &getType  (void) const; 
00117 
00118     virtual       UInt32              getContainerSize(void) const;
00119 
00121     /*---------------------------------------------------------------------*/
00125            SFMatrix            *getSFValue          (void);
00126 
00127            Matrix              &getValue          (void);
00128      const Matrix              &getValue          (void) const;
00129 
00131     /*---------------------------------------------------------------------*/
00135      void setValue          ( const Matrix &value );
00136 
00138     /*---------------------------------------------------------------------*/
00143     /*---------------------------------------------------------------------*/
00147     virtual UInt32 getBinSize (const BitVector         &whichField);
00148     virtual void   copyToBin  (      BinaryDataHandler &pMem,
00149                                const BitVector         &whichField);
00150     virtual void   copyFromBin(      BinaryDataHandler &pMem,
00151                                const BitVector         &whichField);
00152 
00153 
00155     /*---------------------------------------------------------------------*/
00159     static  ShaderParameterMatrixPtr      create          (void); 
00160     static  ShaderParameterMatrixPtr      createEmpty     (void); 
00161 
00164     /*---------------------------------------------------------------------*/
00168     virtual FieldContainerPtr     shallowCopy     (void) const; 
00169 
00171     /*=========================  PROTECTED  ===============================*/
00172   protected:
00173 
00174     /*---------------------------------------------------------------------*/
00178     SFMatrix            _sfValue;
00179 
00181     /*---------------------------------------------------------------------*/
00185     ShaderParameterMatrixBase(void);
00186     ShaderParameterMatrixBase(const ShaderParameterMatrixBase &source);
00187 
00189     /*---------------------------------------------------------------------*/
00193     virtual ~ShaderParameterMatrixBase(void); 
00194 
00196     /*---------------------------------------------------------------------*/
00200 #if !defined(OSG_FIXED_MFIELDSYNC)
00201     void executeSyncImpl(      ShaderParameterMatrixBase *pOther,
00202                          const BitVector         &whichField);
00203 
00204     virtual void   executeSync(      FieldContainer    &other,
00205                                const BitVector         &whichField);
00206 #else
00207     void executeSyncImpl(      ShaderParameterMatrixBase *pOther,
00208                          const BitVector         &whichField,
00209                          const SyncInfo          &sInfo     );
00210 
00211     virtual void   executeSync(      FieldContainer    &other,
00212                                const BitVector         &whichField,
00213                                const SyncInfo          &sInfo);
00214 
00215     virtual void execBeginEdit     (const BitVector &whichField,
00216                                           UInt32     uiAspect,
00217                                           UInt32     uiContainerSize);
00218 
00219             void execBeginEditImpl (const BitVector &whichField,
00220                                           UInt32     uiAspect,
00221                                           UInt32     uiContainerSize);
00222 
00223     virtual void onDestroyAspect(UInt32 uiId, UInt32 uiAspect);
00224 #endif
00225 
00227     /*==========================  PRIVATE  ================================*/
00228   private:
00229 
00230     friend class FieldContainer;
00231 
00232     static FieldDescription   *_desc[];
00233     static FieldContainerType  _type;
00234 
00235 
00236     // prohibit default functions (move to 'public' if you need one)
00237     void operator =(const ShaderParameterMatrixBase &source);
00238 };
00239 
00240 //---------------------------------------------------------------------------
00241 //   Exported Types
00242 //---------------------------------------------------------------------------
00243 
00244 
00245 typedef ShaderParameterMatrixBase *ShaderParameterMatrixBaseP;
00246 
00247 typedef osgIF<ShaderParameterMatrixBase::isNodeCore,
00248               CoredNodePtr<ShaderParameterMatrix>,
00249               FieldContainer::attempt_to_create_CoredNodePtr_on_non_NodeCore_FC
00250               >::_IRet ShaderParameterMatrixNodePtr;
00251 
00252 typedef RefPtr<ShaderParameterMatrixPtr> ShaderParameterMatrixRefPtr;
00253 
00254 OSG_END_NAMESPACE
00255 
00256 #define OSGSHADERPARAMETERMATRIXBASE_HEADER_CVSID "@(#)$Id: OSGShaderParameterMatrixBase.h,v 1.5 2005/07/20 00:08:59 vossg Exp $"
00257 
00258 #endif /* _OSGSHADERPARAMETERMATRIXBASE_H_ */

Generated on Thu Aug 25 04:09:32 2005 for OpenSG by  doxygen 1.4.3