private ShapeRenderer allocateRenderer(int shapeID, Graphics3D g3d) {
String className = JmolConstants.getShapeClassName(shapeID) + "Renderer";
try {
Class shapeClass = Class.forName(className);
ShapeRenderer renderer = (ShapeRenderer) shapeClass.newInstance();
renderer.setViewerG3dShapeID(viewer, g3d, shapeID);
return renderer;
} catch (Exception e) {
Logger.error("Could not instantiate renderer:" + className, e);
}
return null;