From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/a06216.html | 197 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 docs/doxygen/nel/a06216.html (limited to 'docs/doxygen/nel/a06216.html') diff --git a/docs/doxygen/nel/a06216.html b/docs/doxygen/nel/a06216.html new file mode 100644 index 00000000..1c4dc249 --- /dev/null +++ b/docs/doxygen/nel/a06216.html @@ -0,0 +1,197 @@ + + +NeL: ps_attrib_maker_bin_op.h Source File + + + +
+

ps_attrib_maker_bin_op.h

Go to the documentation of this file.
00001 
+00007 /* Copyright, 2001 Nevrax Ltd.
+00008  *
+00009  * This file is part of NEVRAX NEL.
+00010  * NEVRAX NEL is free software; you can redistribute it and/or modify
+00011  * it under the terms of the GNU General Public License as published by
+00012  * the Free Software Foundation; either version 2, or (at your option)
+00013  * any later version.
+00014 
+00015  * NEVRAX NEL is distributed in the hope that it will be useful, but
+00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
+00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+00018  * General Public License for more details.
+00019 
+00020  * You should have received a copy of the GNU General Public License
+00021  * along with NEVRAX NEL; see the file COPYING. If not, write to the
+00022  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+00023  * MA 02111-1307, USA.
+00024  */
+00025 
+00026 #ifndef NL_PS_ATTRIB_MAKER_BIN_OP_H
+00027 #define NL_PS_ATTRIB_MAKER_BIN_OP_H
+00028 
+00029 #include "nel/misc/types_nl.h"
+00030 #include "ps_attrib_maker.h"
+00031 #include "ps_plane_basis.h"
+00032 #include "nel/misc/rgba.h"
+00033 #include <memory>
+00034 
+00035 namespace NL3D {
+00036 
+00037 
+00039 struct CPSBinOp
+00040 {
+00041         enum BinOp
+00042         {
+00043                 selectArg1 = 0,
+00044                 selectArg2,
+00045                 modulate,
+00046                 add,
+00047                 subtract,
+00048                 last
+00049         };
+00050 };
+00051 
+00053 const uint PSBinOpBufSize = 1024;
+00054 
+00063 template <class T> class CPSAttribMakerBinOp : public CPSAttribMaker<T>
+00064 {
+00065 public:
+00067 
+00068 
+00072                 CPSAttribMakerBinOp();
+00073 
+00075                 CPSAttribMakerBinOp(const CPSAttribMakerBinOp &other);
+00076 
+00078                 virtual ~CPSAttribMakerBinOp();
+00079 
+00080                 
+00081                 
+00083 
+00085 
+00086                 virtual T               get                       (CPSLocated *loc, uint32 index); 
+00087                 virtual void   *make              (CPSLocated *loc,
+00088                                                                            uint32 startIndex,
+00089                                                                            void *tab,
+00090                                                                            uint32 stride,
+00091                                                                            uint32 numAttrib,
+00092                                                                            bool allowNoCopy = false,
+00093                                                                            uint32 srcStep = (1 << 16)
+00094                                                                           ) const;
+00095                 
+00096                 virtual void    make4             (CPSLocated *loc,
+00097                                                                            uint32 startIndex,
+00098                                                                            void *tab,
+00099                                                                            uint32 stride,
+00100                                                                            uint32 numAttrib,
+00101                                                                            uint32 srcStep = (1 << 16)
+00102                                                                           ) const;      
+00103 
+00104                 virtual void    makeN             (CPSLocated *loc,
+00105                                                                            uint32 startIndex,
+00106                                                                            void *tab,
+00107                                                                            uint32 stride,
+00108                                                                            uint32 numAttrib,
+00109                                                                            uint32 nbReplicate,
+00110                                                                            uint32 srcStep = (1 << 16)
+00111                                                                           ) const;      
+00112 
+00113                 virtual void    serial            (NLMISC::IStream &f) throw(NLMISC::EStream);                  
+00114                 virtual void    deleteElement (uint32 index);   
+00115                 virtual void    newElement        (CPSLocated *emitterLocated, uint32 emitterIndex);    
+00116                 virtual void    resize            (uint32 capacity, uint32 nbPresentElements);
+00118 
+00120 
+00121 
+00125                 void setArg(uint argNb, CPSAttribMaker<T> *arg)
+00126                 {
+00127                         nlassert(argNb < 2);
+00128                         delete _Arg[argNb];
+00129                         _Arg[argNb] = arg;
+00130                         if (arg->hasMemory())
+00131                         {
+00132                                 arg->resize(_MaxSize, _Size);
+00133                         }               
+00134                 }
+00135 
+00139                 CPSAttribMaker<T> *getArg(uint argNb)
+00140                 {
+00141                         nlassert(argNb < 2);
+00142                         return _Arg[argNb];
+00143                 }
+00144 
+00148                 const CPSAttribMaker<T> *getArg(uint argNb) const
+00149                 {
+00150                         nlassert(argNb < 2);
+00151                         return _Arg[argNb];
+00152                 }
+00154 
+00156 
+00157 
+00160                 void setOp(CPSBinOp::BinOp op)
+00161                 {
+00162                         nlassert(supportOp(op));
+00163                         _Op = op;
+00164                 }
+00165 
+00167                 bool supportOp(CPSBinOp::BinOp op) { return true; }
+00168                 
+00170                 CPSBinOp::BinOp getOp(void) const { return _Op; }
+00172 
+00173         // from CPSAttribMaker
+00174         virtual T getMinValue(void) const { return T() ; /* no mean by default */ }     
+00175         virtual T getMaxValue(void) const { return T() ; /* no mean by default */ }
+00176 
+00177 protected:
+00178         void   *makePrivate     (T *buf1,
+00179                                                  T *buf2,
+00180                                                  CPSLocated *loc,
+00181                                                  uint32 startIndex,
+00182                                                  void *tab,
+00183                                                  uint32 stride,
+00184                                                  uint32 numAttrib,
+00185                                                  bool allowNoCopy = false,
+00186                                                  uint32 srcStep = (1 << 16)
+00187                                                 ) const;
+00188         
+00189         void    make4Private    (T *buf1,
+00190                                                          T *buf2,
+00191                                                          CPSLocated *loc,
+00192                                                          uint32 startIndex,
+00193                                                          void *tab,
+00194                                                          uint32 stride,
+00195                                                          uint32 numAttrib,
+00196                                                          uint32 srcStep = (1 << 16)
+00197                                                         ) const;
+00198 
+00199         void    makeNPrivate  (T *buf1,
+00200                                                    T *buf2,
+00201                                                    CPSLocated *loc,
+00202                                                    uint32 startIndex,
+00203                                                    void *tab,
+00204                                                    uint32 stride,
+00205                                                    uint32 numAttrib,
+00206                                                    uint32 nbReplicate,
+00207                                                    uint32 srcStep = (1 << 16)
+00208                                                   ) const;
+00209         
+00210         CPSBinOp::BinOp   _Op; // the operator being used
+00211         CPSAttribMaker<T> *_Arg[2]; // the arguments for the binary operator            
+00212         void clean(void);       
+00213         uint32 _Size, _MaxSize;
+00214 };
+00215 
+00216 
+00217 } // NL3D
+00218 
+00219 #include "3d/ps_attrib_maker_bin_op_inline.h"
+00220 
+00221 
+00222 #endif // NL_PS_ATTRIB_MAKER_BIN_OP_H
+00223 
+00224 /* End of ps_attrib_maker_bin_op.h */
+

Generated on Tue Mar 16 06:32:24 2004 for NeL by + +doxygen +1.3.6
+ + -- cgit v1.2.1