use of com.ardor3d.ui.text.BMText in project energy3d by concord-consortium.
the class Roof method drawLabels.
@Override
public int drawLabels(int printSequence) {
for (final Spatial roofPartNode : roofPartsRoot.getChildren()) {
if (roofPartNode.getSceneHints().getCullHint() != CullHint.Always) {
final String text = "(" + (printSequence++ + 1) + ")";
final BMText label = (BMText) ((Node) roofPartNode).getChild(3);
label.getSceneHints().setCullHint(CullHint.Inherit);
label.setText(text);
}
}
return printSequence;
}
use of com.ardor3d.ui.text.BMText in project energy3d by concord-consortium.
the class HousePart method drawLabels.
public int drawLabels(int printSequence) {
if (!isPrintable()) {
return printSequence;
}
final String text = "(" + (printSequence++ + 1) + ")";
final BMText label = fetchBMText(text, 0);
final Vector3 offset;
if (original == null) {
offset = getNormal().multiply(0.5, null);
} else {
offset = new Vector3(0, labelOffset, 0);
}
root.getTransform().applyInverseVector(offset);
offset.addLocal(getCenter());
label.setTranslation(offset);
return printSequence;
}
Aggregations