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); }
/** * Takes the plane and center information and creates the correct vertex,normal,color,texture,index information to * represent the OrientedBox. */ public void computeInformation() { setVertexData(); setNormalData(); setTextureData(); setIndexData(); }
public static void setBoundsColor(final ReadOnlyColorRGBA color) { boundingBox.setDefaultColor(color); boundingOB.setDefaultColor(color); boundingSphere.setDefaultColor(color); }
/** * 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(); }
computeCorners(); if (_meshData.getVertexBuffer() == null) { _meshData.setVertexBuffer(BufferUtils.createVector3Buffer(24));
public static void setBoundsColor(final ReadOnlyColorRGBA color) { boundingBox.setDefaultColor(color); boundingOB.setDefaultColor(color); boundingSphere.setDefaultColor(color); }
/** * 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(); }
computeCorners(); if (_meshData.getVertexBuffer() == null) { _meshData.setVertexBuffer(BufferUtils.createVector3Buffer(24));
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); }
/** * Takes the plane and center information and creates the correct vertex,normal,color,texture,index information to * represent the OrientedBox. */ public void computeInformation() { setVertexData(); setNormalData(); setTextureData(); setIndexData(); }