/** * Creates a new OrientedBox with the given name. * * @param name * The name of the new box. */ public OrientedBox(final String name) { super(name); _vectorStore = new Vector3[8]; for (int i = 0; i < _vectorStore.length; i++) { _vectorStore[i] = new Vector3(); } _texTopRight = new Vector2(1, 1); _texTopLeft = new Vector2(1, 0); _texBotRight = new Vector2(0, 1); _texBotLeft = new Vector2(0, 0); _center = new Vector3(0, 0, 0); _correctCorners = false; computeInformation(); }
/** * Creates a new OrientedBox with the given name. * * @param name * The name of the new box. */ public OrientedBox(final String name) { super(name); _vectorStore = new Vector3[8]; for (int i = 0; i < _vectorStore.length; i++) { _vectorStore[i] = new Vector3(); } _texTopRight = new Vector2(1, 1); _texTopLeft = new Vector2(1, 0); _texBotRight = new Vector2(0, 1); _texBotLeft = new Vector2(0, 0); _center = new Vector3(0, 0, 0); _correctCorners = false; computeInformation(); }
public static void drawOBB(final OrientedBoundingBox box, final Renderer r) { boundingOB.getCenter().set(box.getCenter()); boundingOB.getxAxis().set(box.getXAxis()); boundingOB.getYAxis().set(box.getYAxis()); boundingOB.getZAxis().set(box.getZAxis()); boundingOB.getExtent().set(box.getExtent()); boundingOB.computeInformation(); boundingOB.draw(r); }
public static void drawOBB(final OrientedBoundingBox box, final Renderer r) { boundingOB.getCenter().set(box.getCenter()); boundingOB.getxAxis().set(box.getXAxis()); boundingOB.getYAxis().set(box.getYAxis()); boundingOB.getZAxis().set(box.getZAxis()); boundingOB.getExtent().set(box.getExtent()); boundingOB.computeInformation(); boundingOB.draw(r); }