abies,
BTW, can I go through source and try to refactor 'if ( this instanceof SomeClass )' in few places to overridden methods ?
I just reviewed Java3D docs and think that we should add implementation of cloneNodeComponent(boolean forceDuplicate) and duplicateNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate) to GeomContainer override them in TriangleArray, QuadArray etc. so the code of Morph.buildCompatibleGeometry(...) will transform to
private void buildCompatibleGeometry(GeometryArray a) {
setGeometry((GeometryArray) a.cloneNodeComponent(true));
}
Will be great if you can do this - just send patch file to Issues and I will review and apply it.
BTW, I think that for duplicating geometries we can treat GeomDataInterfaces as elementary types and duplicate them always (not taking care of forceDuplicate flag).
Also looks like we should introduce private no-parameter constructors in some classes (PointArray, LineArray etc.) to follow design of cloneNodeComponent(...).
Yuri