How can render a box having the position coordinates and its 8 vertexes/corners?

1

I’d like to highlight an object in Potree rendering a box frame (BoxVolume - Geometry) around it, having the position and the vertexes of the object

const volume: BoxVolume = new this.Potree.BoxVolume();
volume.clip = true;
volume.position.x = selectedClassInstance.centroid[0];
volume.position.y = selectedClassInstance.centroid[1];
volume.position.z = selectedClassInstance.centroid[2];
this.viewer.scene.addVolume(volume);

where centroid is an array containing [{x: number, y: number, z: number}] and I have also an array of coordinates for 8 vertex of the box. At this point I’m able to render a cube using the centroid variable (although I’d like to customise colour of the edges), but I don’t know where to set/put the vertexes coordinates in order to make the cube entirely wrapping my object