mirror of
https://github.com/glest/glest-source.git
synced 2025-08-16 13:23:59 +02:00
merging in all Will's changes
This commit is contained in:
@@ -30,21 +30,20 @@ private:
|
||||
Vec3f *vertices;
|
||||
Vec3f *normals;
|
||||
|
||||
//std::map<std::string, Vec3f *> cacheVertices;
|
||||
//std::map<std::string, Vec3f *> cacheNormals;
|
||||
int raw_frame_ofs;
|
||||
|
||||
std::map<float, std::map<bool, Vec3f *> > cacheVertices;
|
||||
std::map<float, std::map<bool, Vec3f *> > cacheNormals;
|
||||
static bool enableCache;
|
||||
static bool enableInterpolation;
|
||||
|
||||
void update(const Vec3f* src, Vec3f* &dest, float t, bool cycle);
|
||||
|
||||
public:
|
||||
InterpolationData(const Mesh *mesh);
|
||||
~InterpolationData();
|
||||
|
||||
static void setEnableCache(bool enabled) { enableCache = enabled; }
|
||||
static void setEnableInterpolation(bool enabled) { enableInterpolation = enabled; }
|
||||
|
||||
const Vec3f *getVertices() const {return vertices==NULL? mesh->getVertices(): vertices;}
|
||||
const Vec3f *getNormals() const {return normals==NULL? mesh->getNormals(): normals;}
|
||||
const Vec3f *getVertices() const {return !vertices || !enableInterpolation? mesh->getVertices()+raw_frame_ofs: vertices;}
|
||||
const Vec3f *getNormals() const {return !normals || !enableInterpolation? mesh->getNormals()+raw_frame_ofs: normals;}
|
||||
|
||||
void update(float t, bool cycle);
|
||||
void updateVertices(float t, bool cycle);
|
||||
|
@@ -275,18 +275,11 @@ public:
|
||||
string getColorDescription() const;
|
||||
virtual string getUniquePickName() const = 0;
|
||||
|
||||
static void resetUniqueColors();
|
||||
|
||||
protected:
|
||||
|
||||
void recycleUniqueColor();
|
||||
|
||||
private:
|
||||
unsigned char uniqueColorID[COLOR_COMPONENTS];
|
||||
|
||||
static unsigned char nextColorID[COLOR_COMPONENTS];
|
||||
static vector<vector<unsigned char> > nextColorIDReuseList;
|
||||
static map<string,bool> usedColorIDList;
|
||||
static int nextColorID;
|
||||
static const int k, p;
|
||||
static Mutex mutexNextColorID;
|
||||
|
||||
static auto_ptr<PixelBufferWrapper> pbo;
|
||||
|
Reference in New Issue
Block a user