merging in all Will's changes

This commit is contained in:
Will
2013-11-29 02:12:34 +01:00
parent be3d4d300c
commit c6530c2783
9 changed files with 64 additions and 242 deletions

View File

@@ -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);

View File

@@ -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;