N.setZ((double)RP.z);
}
public void addGraph(Cat RG,boolean add) {
for(int i=0;i<size();i++) {
IVertex V=vertices[i];
RankedData RD=(RankedData)RG.rawVertexData(V.key);
//Object RS=RG.getSelected(V.key);
Object RS=getIFilter().filterVertex(RD);
// V = key + data
Vertex3D GV;
int shape=setShape(RD,V);
Color3f color=comp2col(RD.component,RD.hyper);
if(add) {
if(shape<Shape.maxSimple)
GV=jworld.addVertex(shape,color,V);
else {
Shape dataShape=new Shape(color);
GV=jworld.addVertex(dataShape.toNode(shape,RS),RS); //$$
}
}
else GV=(Vertex3D)(V.key);
MobilePoint N=new MobilePoint(RS,RD,GV,radius,size());
V.data=N; // V contains N && N contains V - careful with toString!!!
initPosition(V,N);
}
for(int i=0;i<size();i++) {
IVertex F=vertices[i];
MobilePoint MFrom=(MobilePoint)(F.data);
Vertex3D From=MFrom.V;
IEdge[] es=F.outLinks;
for(int j=0;j<es.length;j++) {
IEdge E=es[j];
IVertex T=vertices[E.to];
MobilePoint MTo=(MobilePoint)(T.data);
Vertex3D To=MTo.V;
if(add) E.data=jworld.addEdge(From,To,E.data); //$$
}
}