00001 /* 00002 * ssgLocal.h 00003 * 00004 * Part of Fly! Legacy project 00005 * 00006 * Copyright 2003 Chris Wallace 00007 * 00008 * Fly! Legacy is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * Fly! Legacy is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with Fly! Legacy; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 * 00022 */ 00023 00029 #include <plib/ssg.h> 00030 #include "../Include/Pod.h" 00031 00032 00033 #ifndef _SSGLOCAL_H_ 00034 #define _SSGLOCAL_H_ 00035 00037 // 00038 // Custom SSG functions 00039 // 00040 00041 // ssgLoadRAW.cpp 00042 // ssgTexture *ssgLoadTexturePBM (PODFILE* pRaw, PODFILE* pAct, 00043 // ssgTextureInfo* info); 00044 00046 // 00047 // class ssgKeyframeTransform 00048 // 00049 // This class represents a variable transform that is controlled by 00050 // the value of a single scalar keyframe. It differs from an 00051 // SSG Tween object in that only the transform is interpolated, 00052 // not any of the vertex, colour, texture coords, etc. 00053 // 00054 // ssgKeyframeTransform.cpp 00055 00056 #define _SSG_TYPE_KEYFRAMETRANSFORM 0x00008000 00057 00058 inline int ssgTypeKeyframeTransform() 00059 { 00060 return _SSG_TYPE_KEYFRAMETRANSFORM | ssgTypeTransform(); 00061 } 00062 00063 typedef struct { 00064 float frame; 00065 sgCoord transform; 00066 } SKeyframe; 00067 00068 class ssgKeyframeTransform : public ssgTransform 00069 { 00070 protected: 00071 int nFrames; 00072 float min, max; 00073 int next; 00074 SKeyframe *data; 00075 00076 public: 00077 ssgKeyframeTransform (int n, float min = 0.0f, float max = 1.0f) ; 00078 virtual ~ssgKeyframeTransform (void) ; 00079 00080 virtual void addKeyframe (float frame, sgCoord *xform ) ; 00081 virtual void setKeyframe (float frame); 00082 }; 00083 00084 #endif
|
|
Documentation generated by
|