< Zurück | Inhalt | Weiter >

From Primitive.java

//The data structure used to cache GeomBuffer objects static Hashtable geomCache = new Hashtable();


String strfloat(float x)

{

return (new Float(x)).toString();

}


// Add a GeomBuffer to the cache

protected void cacheGeometry( int kind, float a, float b, float c,

int d, int e, int flags, GeomBuffer geo)

{

String key = new String(kind+strfloat(a)+strfloat(b)+ strfloat(c)+d+e+flags);


geomCache.put(key, geo);

}


// Retrieve a GeomBuffer object