WireframeLinesBlend extends WireframeLinesBlendIterable { @Override protected int getBlendEndpoint() { if (getRenderCap() < 0) { return pointsCollection.size() - 2; } else { return super.getBlendEndpoint(); } } WireframeLinesBlend(Vector3 origin, Collection<ReadonlyVector3> relativePoints);  WireframeLinesBlend(Collection<ReadonlyVector3> absolutePoints);   }
@Test public void testGetSetRenderCapAndBlendEndpoint() { ArrayList<ReadonlyVector3> arr = new ArrayList<ReadonlyVector3>(); arr.add(new Vector3(1.0, 2.0, 3.0)); arr.add(new Vector3(4.0, 5.0, 6.0)); arr.add(new Vector3(7.0, 8.0, 9.0)); arr.add(new Vector3(10.0, 11.0, 12.0)); arr.add(new Vector3(13.0, 14.0, 15.0)); WireframeLinesBlend shape = new WireframeLinesBlend(arr); assertEquals(-1, shape.getRenderCap()); assertEquals(3, shape.getBlendEndpoint()); shape.setRenderCap(0); assertEquals(0, shape.getRenderCap()); assertEquals(-1, shape.getBlendEndpoint()); shape.setRenderCap(2); assertEquals(2, shape.getRenderCap()); assertEquals(1, shape.getBlendEndpoint()); shape.setRenderCap(50); assertEquals(50, shape.getRenderCap()); assertEquals(49, shape.getBlendEndpoint()); shape.setRenderCap(-20); assertEquals(-20, shape.getRenderCap()); assertEquals(3, shape.getBlendEndpoint()); shape.setRenderCap(Integer.MAX_VALUE); assertEquals(Integer.MAX_VALUE, shape.getRenderCap()); assertEquals(Integer.MAX_VALUE-1, shape.getBlendEndpoint()); shape.setRenderCap(Integer.MIN_VALUE); assertEquals(Integer.MIN_VALUE, shape.getRenderCap()); assertEquals(3, shape.getBlendEndpoint()); }