/**
* Sets the color and the texture applied to piece model.
*/
private void updatePieceOfFurnitureColorAndTexture(boolean waitTextureLoadingEnd) {
HomePieceOfFurniture piece = (HomePieceOfFurniture)getUserData();
Node filledModelNode = getFilledModelNode();
if (piece.getColor() != null) {
setColorAndTexture(filledModelNode, piece.getColor(), null, piece.getShininess(),
false, null, null, new HashSet<Appearance>());
} else if (piece.getTexture() != null) {
setColorAndTexture(filledModelNode, null, piece.getTexture(), piece.getShininess(),
waitTextureLoadingEnd, new Vector3f(piece.getWidth(), piece.getHeight(), piece.getDepth()),
ModelManager.getInstance().getSize(((Group)filledModelNode).getChild(0)), new HashSet<Appearance>());
} else {
// Set default material and texture of model
setColorAndTexture(filledModelNode, null, null, piece.getShininess(),
false, null, null, new HashSet<Appearance>());
}
}