use of cbit.vcell.render.Vect3d in project vcell by virtualcell.
the class XmlReader method getCSGScale.
private CSGScale getCSGScale(Element param) throws XmlParseException {
String name = unMangle(param.getAttributeValue(XMLTags.NameAttrTag));
String scaleXStr = unMangle(param.getAttributeValue(XMLTags.CSGScaleXTag));
String scaleYStr = unMangle(param.getAttributeValue(XMLTags.CSGScaleYTag));
String scaleZStr = unMangle(param.getAttributeValue(XMLTags.CSGScaleZTag));
Vect3d scaleAxis = new Vect3d(Double.parseDouble(scaleXStr), Double.parseDouble(scaleYStr), Double.parseDouble(scaleZStr));
CSGScale csgScale = new CSGScale(name, scaleAxis);
// Retrieve CSGNode - CSGScale element should have one child
Object[] elements = param.getChildren().toArray();
if (elements.length > 1) {
throw new XmlParseException("CSGScale element cannot have more than one child element");
}
CSGNode csgChildNode = getCSGNode((Element) elements[0]);
csgScale.setChild(csgChildNode);
return csgScale;
}
Aggregations