// (2) There is no hint, so use the default bounds radius and do the
// optimal layout
//
// (3) There is a hint that says do not do the optimal layout, so we
// will just put the Cell right on top of the avatar.
BoundingVolumeHint hint = state.getBoundingVolumeHint();
logger.info("Using bounding volume hint " + hint.getBoundsHint() +
", do placement=" + hint.isDoSystemPlacement());
if (hint != null && hint.isDoSystemPlacement() == true) {
// Case (1): We have a bounds hint and we want to do the layout,
// so we find the distance away from the avatar and also the height
// above the ground.
BoundingVolume boundsHint = hint.getBoundsHint();
transform = CellPlacementUtils.getCellTransform(manager, boundsHint,
viewTransform);
}
else if (hint == null) {
// Case (2): Do the optimal placement using the default radius.
BoundingVolume boundsHint = new BoundingSphere(DEFAULT_RADIUS, Vector3f.ZERO);
transform = CellPlacementUtils.getCellTransform(manager, boundsHint,
viewTransform);
}
else if (hint != null && hint.isDoSystemPlacement() == false) {
// Case (3): The Cell will take care of its own placement, use
// the origin of the avatar as the initial placement.
// Issue 998: make sure this is actually the current location of
// the avatar, and not the origin. This guarantees that the