当前位置: 首页>>代码示例>>Java>>正文


Java XML.getFloat方法代码示例

本文整理汇总了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");
}
 
开发者ID:poqudrof,项目名称:PapARt,代码行数:19,代码来源:ProjectiveDeviceCalibration.java

示例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();
}
 
开发者ID:poqudrof,项目名称:PapARt,代码行数:24,代码来源:HomographyCalibration.java

示例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);
}
 
开发者ID:poqudrof,项目名称:PapARt,代码行数:18,代码来源:PlaneCalibration.java

示例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"));
}
 
开发者ID:linux-man,项目名称:ptmx,代码行数:14,代码来源:Ptmx.java

示例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;
}
 
开发者ID:poqudrof,项目名称:PapARt,代码行数:8,代码来源:PlaneCalibration.java

示例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);
}
 
开发者ID:poqudrof,项目名称:PapARt,代码行数:13,代码来源:PlanarTouchCalibration.java


注:本文中的processing.data.XML.getFloat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。