fiore@3: #pragma once fiore@3: fiore@3: #include fiore@3: #include "stdafx.h" fiore@3: #include "utils.h" fiore@3: fiore@3: fiore@3: /* this class uses the java haptic object lists to provide nodes * fiore@3: * and edges to draw to the graphic and haptic managers */ fiore@3: class CollectionsManager fiore@3: { fiore@3: public: fiore@3: struct NodeData { fiore@3: jdouble x; fiore@3: jdouble y; fiore@3: jint hapticId; fiore@3: jint diagramId; fiore@3: fiore@3: NodeData(){} fiore@3: private : fiore@3: NodeData(const NodeData& n){/* avoid mistakenly copy construction calls */} fiore@3: }; fiore@3: fiore@3: struct EdgeData{ fiore@3: jdouble *x; fiore@3: jdouble *y; fiore@3: bool **adjMatrix; fiore@3: jint hapticId; fiore@3: jint diagramId; fiore@3: jint stipplePattern; fiore@3: jsize nodeStart; fiore@3: jdouble attractPoint[2]; fiore@3: void setSize(unsigned int s){ fiore@3: size = s; fiore@3: if(s > previousSize){ fiore@3: /* delete the old memory */ fiore@3: delete [] x; fiore@3: delete [] y; fiore@3: for(unsigned int i=0; i