Panda3D

lerpblend.h

00001 // Filename: lerpblend.h
00002 // Created by:  frang (30May00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef __LERPBLEND_H__
00016 #define __LERPBLEND_H__
00017 
00018 #include "directbase.h"
00019 #include "typedReferenceCount.h"
00020 
00021 class EXPCL_DIRECT LerpBlendType : public TypedReferenceCount {
00022 PUBLISHED:
00023   LerpBlendType() {}
00024   virtual ~LerpBlendType();
00025   virtual PN_stdfloat operator()(PN_stdfloat) = 0;
00026 
00027 public:
00028   LerpBlendType(const LerpBlendType&);
00029   LerpBlendType& operator=(const LerpBlendType&);
00030 public:
00031   // now for typehandle stuff
00032   static TypeHandle get_class_type() {
00033     return _type_handle;
00034   }
00035   static void init_type() {
00036     TypedReferenceCount::init_type();
00037     register_type(_type_handle, "LerpBlendType",
00038                   TypedReferenceCount::get_class_type());
00039   }
00040   virtual TypeHandle get_type() const {
00041     return get_class_type();
00042   }
00043   virtual TypeHandle force_init_type() {
00044     init_type();
00045     return get_class_type();
00046   }
00047 private:
00048   static TypeHandle _type_handle;
00049 };
00050 
00051 class EXPCL_DIRECT EaseInBlendType : public LerpBlendType {
00052 PUBLISHED:
00053   EaseInBlendType() {}
00054   virtual ~EaseInBlendType();
00055   virtual PN_stdfloat operator()(PN_stdfloat);
00056 
00057 public:
00058   EaseInBlendType(const EaseInBlendType&);
00059   EaseInBlendType& operator=(const EaseInBlendType&);
00060 public:
00061   // now for typehandle stuff
00062   static TypeHandle get_class_type() {
00063     return _type_handle;
00064   }
00065   static void init_type() {
00066     TypedReferenceCount::init_type();
00067     register_type(_type_handle, "EaseInBlendType",
00068                   LerpBlendType::get_class_type());
00069   }
00070   virtual TypeHandle get_type() const {
00071     return get_class_type();
00072   }
00073   virtual TypeHandle force_init_type() {
00074     init_type();
00075     return get_class_type();
00076   }
00077 private:
00078   static TypeHandle _type_handle;
00079 };
00080 
00081 class EXPCL_DIRECT EaseOutBlendType : public LerpBlendType {
00082 PUBLISHED:
00083   EaseOutBlendType() {}
00084   virtual ~EaseOutBlendType();
00085   virtual PN_stdfloat operator()(PN_stdfloat);
00086 
00087 public:
00088   EaseOutBlendType(const EaseOutBlendType&);
00089   EaseOutBlendType& operator=(const EaseOutBlendType&);
00090 public:
00091   // now for typehandle stuff
00092   static TypeHandle get_class_type() {
00093     return _type_handle;
00094   }
00095   static void init_type() {
00096     TypedReferenceCount::init_type();
00097     register_type(_type_handle, "EaseOutBlendType",
00098                   LerpBlendType::get_class_type());
00099   }
00100   virtual TypeHandle get_type() const {
00101     return get_class_type();
00102   }
00103   virtual TypeHandle force_init_type() {
00104     init_type();
00105     return get_class_type();
00106   }
00107 private:
00108   static TypeHandle _type_handle;
00109 };
00110 
00111 class EXPCL_DIRECT EaseInOutBlendType : public LerpBlendType {
00112 PUBLISHED:
00113   EaseInOutBlendType() {}
00114   virtual ~EaseInOutBlendType();
00115   virtual PN_stdfloat operator()(PN_stdfloat);
00116 public:
00117   EaseInOutBlendType(const EaseInOutBlendType&);
00118   EaseInOutBlendType& operator=(const EaseInOutBlendType&);
00119 public:
00120   // now for typehandle stuff
00121   static TypeHandle get_class_type() {
00122     return _type_handle;
00123   }
00124   static void init_type() {
00125     TypedReferenceCount::init_type();
00126     register_type(_type_handle, "EaseInOutBlendType",
00127                   LerpBlendType::get_class_type());
00128   }
00129   virtual TypeHandle get_type() const {
00130     return get_class_type();
00131   }
00132   virtual TypeHandle force_init_type() {
00133     init_type();
00134     return get_class_type();
00135   }
00136 private:
00137   static TypeHandle _type_handle;
00138 };
00139 
00140 class EXPCL_DIRECT NoBlendType : public LerpBlendType {
00141 PUBLISHED:
00142   NoBlendType() {}
00143   virtual ~NoBlendType();
00144   virtual PN_stdfloat operator()(PN_stdfloat);
00145 public:
00146   NoBlendType(const NoBlendType&);
00147   NoBlendType& operator=(const NoBlendType&);
00148 public:
00149   // now for typehandle stuff
00150   static TypeHandle get_class_type() {
00151     return _type_handle;
00152   }
00153   static void init_type() {
00154     TypedReferenceCount::init_type();
00155     register_type(_type_handle, "NoBlendType",
00156                   LerpBlendType::get_class_type());
00157   }
00158   virtual TypeHandle get_type() const {
00159     return get_class_type();
00160   }
00161   virtual TypeHandle force_init_type() {
00162     init_type();
00163     return get_class_type();
00164   }
00165 private:
00166   static TypeHandle _type_handle;
00167 };
00168 
00169 #endif /* __LERPBLEND_H__ */
 All Classes Functions Variables Enumerations