void render(short colixA, short colixB, byte endcaps, int diameter, int xA, int yA, int zA, int xB, int yB, int zB) {
		if (diameter > (g3d.width + g3d.height) * MAX_FIX)
			return;
		// XIE: begin: deal with long sticks to prevent huge raster arrays from being produced
		dxB = xB - xA;
		dyB = yB - yA;
		if (dxB * dxB + dyB * dyB > 4.0 * g3d.width * g3d.width)
			return;
		// XIE: end
		dzB = zB - zA;
		int r = diameter / 2 + 1;
		int codeMinA = line3d.clipCode(xA - r, yA - r, zA - r);
		int codeMaxA = line3d.clipCode(xA + r, yA + r, zA + r);
		int codeMinB = line3d.clipCode(xB - r, yB - r, zB - r);
		int codeMaxB = line3d.clipCode(xB + r, yB + r, zB + r);
		// all bits 0 --> no clipping
		notClipped = ((codeMinA | codeMaxA | codeMinB | codeMaxB) == 0);
		// any two bits same in all cases --> fully clipped
		if ((codeMinA & codeMaxB & codeMaxA & codeMinB) != 0)
			return; // fully clipped;
		zShift = g3d.getZShift((zA + zB) >> 1);

		if (diameter <= 1) {
			line3d
					.plotLineDelta(g3d.getColixArgb(colixA), Graphics3D.isColixTranslucent(colixA), g3d
							.getColixArgb(colixB), Graphics3D.isColixTranslucent(colixB), xA, yA, zA, dxB, dyB, dzB,
							notClipped);
			return;
		}
		drawBackside = (!notClipped || endcaps == Graphics3D.ENDCAPS_FLAT);
		this.diameter = diameter;
		this.xA = xA;
		this.yA = yA;
		this.zA = zA;
		this.endcaps = endcaps;
		shadesA = g3d.getShades(this.colixA = colixA);
		shadesB = g3d.getShades(this.colixB = colixB);
		isScreenedA = (colixA & Graphics3D.TRANSLUCENT_MASK) != 0;
		isScreenedB = (colixB & Graphics3D.TRANSLUCENT_MASK) != 0;

		calcArgbEndcap(true);

		generateBaseEllipse();

		if (endcaps == Graphics3D.ENDCAPS_FLAT)
			renderFlatEndcap(true);
		for (int i = rasterCount; --i >= 0;)
			plotRaster(i);
		if (endcaps == Graphics3D.ENDCAPS_SPHERICAL)
			renderSphericalEndcaps();
	}