本文整理汇总了Java中processing.data.XML.getFloat方法的典型用法代码示例。如果您正苦于以下问题:Java XML.getFloat方法的具体用法?Java XML.getFloat怎么用?Java XML.getFloat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类processing.data.XML
的用法示例。
在下文中一共展示了XML.getFloat方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMatFrom
import processing.data.XML; //导入方法依赖的package包/类
private void getMatFrom(XML node, PMatrix3D matrix) {
matrix.m00 = node.getFloat("m00");
matrix.m01 = node.getFloat("m01");
matrix.m02 = node.getFloat("m02");
matrix.m03 = node.getFloat("m03");
matrix.m10 = node.getFloat("m10");
matrix.m11 = node.getFloat("m11");
matrix.m12 = node.getFloat("m12");
matrix.m13 = node.getFloat("m13");
matrix.m20 = node.getFloat("m20");
matrix.m21 = node.getFloat("m21");
matrix.m22 = node.getFloat("m22");
matrix.m23 = node.getFloat("m23");
matrix.m30 = node.getFloat("m30");
matrix.m31 = node.getFloat("m31");
matrix.m32 = node.getFloat("m32");
matrix.m33 = node.getFloat("m33");
}
示例2: loadFrom
import processing.data.XML; //导入方法依赖的package包/类
@Override
public void loadFrom(PApplet parent, String fileName) {
XML root = parent.loadXML(fileName);
XML homographyNode = root.getChild(HOMOGRAPHY_XML_NAME);
pmatrix = new PMatrix3D();
pmatrix.m00 = homographyNode.getFloat("m00");
pmatrix.m01 = homographyNode.getFloat("m01");
pmatrix.m02 = homographyNode.getFloat("m02");
pmatrix.m03 = homographyNode.getFloat("m03");
pmatrix.m10 = homographyNode.getFloat("m10");
pmatrix.m11 = homographyNode.getFloat("m11");
pmatrix.m12 = homographyNode.getFloat("m12");
pmatrix.m13 = homographyNode.getFloat("m13");
pmatrix.m20 = homographyNode.getFloat("m20");
pmatrix.m21 = homographyNode.getFloat("m21");
pmatrix.m22 = homographyNode.getFloat("m22");
pmatrix.m23 = homographyNode.getFloat("m23");
pmatrix.m30 = homographyNode.getFloat("m30");
pmatrix.m31 = homographyNode.getFloat("m31");
pmatrix.m32 = homographyNode.getFloat("m32");
pmatrix.m33 = homographyNode.getFloat("m33");
initMat();
}
示例3: loadFrom
import processing.data.XML; //导入方法依赖的package包/类
@Override
public void loadFrom(PApplet parent, String fileName) {
XML root = parent.loadXML(fileName);
XML planeNode = root.getChild(PLANE_XML_NAME);
XML posNode = planeNode.getChild(PLANE_POS_XML_NAME);
XML normalNode = planeNode.getChild(PLANE_NORMAL_XML_NAME);
XML heightNode = planeNode.getChild(PLANE_HEIGHT_XML_NAME);
Vec3D position = getVectorFrom(posNode);
Vec3D normal = getVectorFrom(normalNode);
float h = heightNode.getFloat(PLANE_HEIGHT_XML_NAME);
this.plane = new Plane();
plane.set(position);
plane.normal.set(normal);
setHeight(h);
}
示例4: loadTmxProperties
import processing.data.XML; //导入方法依赖的package包/类
private void loadTmxProperties(XML e){
this.version = e.getFloat("version");
this.orientation = e.getString("orientation");
this.renderorder = e.getString("renderorder");
this.mapwidth = e.getInt("width");
this.mapheight = e.getInt("height");
this.tilewidth = e.getInt("tilewidth");
this.tileheight = e.getInt("tileheight");
this.staggerindex = 0; if(e.hasAttribute("staggerindex")) if(e.getString("staggerindex").equals("even")) this.staggerindex = 1;
this.staggeraxis = "x"; if(e.hasAttribute("staggeraxis")) this.staggeraxis = e.getString("staggeraxis");
this.hexsidelength = 0; if(e.hasAttribute("hexsidelength")) this.hexsidelength = e.getInt("hexsidelength");
this.backgroundcolor = parent.color(80, 80, 80); if(e.hasAttribute("backgroundcolor")) this.backgroundcolor = this.readColor(e.getString("backgroundcolor"));
}
示例5: getVectorFrom
import processing.data.XML; //导入方法依赖的package包/类
private Vec3D getVectorFrom(XML node) {
Vec3D v = new Vec3D();
v.x = node.getFloat(X_XML_NAME);
v.y = node.getFloat(Y_XML_NAME);
v.z = node.getFloat(Z_XML_NAME);
return v;
}
示例6: getFrom
import processing.data.XML; //导入方法依赖的package包/类
private void getFrom(XML xml) {
maximumDistance = xml.getFloat(MAX_DIST_XML_NAME);
minimumComponentSize = xml.getInt(MIN_COPO_SIZE_XML_NAME);
minimumHeight = xml.getFloat(MIN_HEIGHT_XML_NAME);
maximumRecursion = xml.getInt(MAX_RECURSION_XML_NAME);
searchDepth = xml.getInt(SEARCH_DEPTH_XML_NAME);
precision = xml.getInt(PRECISION_XML_NAME);
trackingForgetTime = xml.getInt(TRACKING_FORGET_TIME_XML_NAME);
trackingMaxDistance = xml.getFloat(TRACKING_MAX_DIST_TIME_XML_NAME);
}