// Deductor.h -- Analysis of 1D Mondrian scenes // // // DESCRIPTION // // Copyright © Timothy Bahls, Daniel Scharstien 2004. // /////////////////////////////////////////////////////////////////////////// // unknown float value #define UNKNOWN -9876 #define UNKNOWNF -9876.5f #define MAX 1234.5f #define MIN -1234.5f #ifndef WIN32 #define __max(a,b) (((a) > (b)) ? (a) : (b)) #define __min(a,b) (((a) < (b)) ? (a) : (b)) #endif #include "Scene.h" class CRegion { public: int id; // its own index int nFrames; float minVel; float maxVel; float minLen; float maxLen; float*minmin; //lowest possible value of left edge in each frame float*maxmin; //highest possible value of left edge in each frame float*minmax; //lowest possible value of right edge in each frame float*maxmax; //highest possible value of right edge in each frame int*xmins; //minimum seen value in each frame int*xmaxes; //maximum seen value in each frame int*leftIDs; //id of region to the left int*rightIDs;//id of region to the right bool change; // constructor CRegion(int id, int inFrames); CRegion(){} //default bool operator == (CRegion); bool limitV(int f1, int f2, float*minA, float*maxA); bool limitP(int f1, int f2, float*&minA, float*&maxA); bool restrictVel(); bool restrictLen(); bool restrictPosition(); inline bool max(int &a,int b){if(b>a){a=b; return true;}return false;} inline bool min(int &a,int b){if(ba){a=b; return true;}return false;} inline bool min(float &a,float b){if(b