exportNode((Node)enumeration.nextElement(), ignoreTransparency, ignoreConstantShader, silk, parentTransformations);
}
} else if (node instanceof Link) {
exportNode(((Link)node).getSharedGroup(), ignoreTransparency, ignoreConstantShader, silk, parentTransformations);
} else if (node instanceof Shape3D) {
Shape3D shape = (Shape3D)node;
Appearance appearance = shape.getAppearance();
RenderingAttributes renderingAttributes = appearance != null
? appearance.getRenderingAttributes() : null;
TransparencyAttributes transparencyAttributes = appearance != null
? appearance.getTransparencyAttributes() : null;
// Ignore invisible shapes and fully transparency shapes without a texture
if ((renderingAttributes == null
|| renderingAttributes.getVisible())
&& (transparencyAttributes == null
|| transparencyAttributes.getTransparency() != 1)) {
String shapeName = (String)shape.getUserData();
// Build a unique object name
String uuid = UUID.randomUUID().toString();
String appearanceName = null;
TexCoordGeneration texCoordGeneration = null;
if (appearance != null) {
texCoordGeneration = appearance.getTexCoordGeneration();
appearanceName = "shader" + uuid;
boolean mirror = shapeName != null
&& shapeName.startsWith(ModelManager.MIRROR_SHAPE_PREFIX);
exportAppearance(appearance, appearanceName, mirror, ignoreTransparency, ignoreConstantShader, silk);
}
// Export object geometries
for (int i = 0, n = shape.numGeometries(); i < n; i++) {
String objectNameBase = "object" + uuid + "-" + i;
// Always ignore normals on walls
String [] objectsName = exportNodeGeometry(shape.getGeometry(i), parentTransformations, texCoordGeneration,
objectNameBase);
if (objectsName != null) {
for (String objectName : objectsName) {
if (appearanceName != null) {
this.sunflow.parameter("shaders", new String [] {appearanceName});