@Override public XData acceptData(XNameSpace ns, XBinaryTokenStream tokens) { String name = tokens.optionalName(); tokens.required(XBinaryToken.OBRACE); float[] value = new float[16]; for (int i = 0; i < 16; i++) { value[i] = tokens.requiredFloat(); } tokens.required(XBinaryToken.CBRACE); return new XDFrameTransformMatrix(ns.getFile(), name, value); }
@Override public XData acceptData(XNameSpace ns, XTextTokenStream tokens) { String name = tokens.optionalName(); tokens.required(XTextToken.OBRACE); float[] value = new float[16]; for (int i = 0; i < 16; i++) { if (i > 0) tokens.requiredSeparator(); value[i] = tokens.requiredFloat(); } tokens.optional(XTextToken.COMMA); tokens.required(XTextToken.SEMICOLON); tokens.optional(XTextToken.SEMICOLON); tokens.required(XTextToken.CBRACE); return new XDFrameTransformMatrix(ns.getFile(), name, value); }