gpt4 book ai didi

com.jme3.scene.debug.WireBox.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 00:43:05 31 4
gpt4 key购买 nike

本文整理了Java中com.jme3.scene.debug.WireBox.<init>()方法的一些代码示例,展示了WireBox.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WireBox.<init>()方法的具体详情如下:
包路径:com.jme3.scene.debug.WireBox
类名称:WireBox
方法名:<init>

WireBox.<init>介绍

暂无

代码示例

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public void putBox(Vector3f pos, float size, ColorRGBA color){
  putShape(new WireBox(size, size, size), color, 1).setLocalTranslation(pos);
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

/**
   * Create a geometry suitable for visualizing the specified bounding box.
   *
   * @param bbox the bounding box (not null)
   * @return a new Geometry instance in world space
   */
  public static Geometry makeGeometry(BoundingBox bbox) {
    float xExtent = bbox.getXExtent();
    float yExtent = bbox.getYExtent();
    float zExtent = bbox.getZExtent();
    WireBox mesh = new WireBox(xExtent, yExtent, zExtent);
    Geometry result = new Geometry("bounding box", mesh);

    Vector3f center = bbox.getCenter();
    result.setLocalTranslation(center);

    return result;
  }
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

/**
 * used by attachBoundChildren()
 */
private void attachBoundingBox(BoundingBox bb, Node parent) {
  WireBox wb = new WireBox(bb.getXExtent(), bb.getYExtent(), bb.getZExtent());
  Geometry g = new Geometry();
  g.setMesh(wb);
  g.setLocalTranslation(bb.getCenter());
  parent.attachChild(g);
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

WireBox box = new WireBox(bb.getXExtent(), bb.getYExtent(), bb.getZExtent());
Geometry geom = new Geometry(test.name + " bounds", box);
geom.setMaterial(new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"));
box = new WireBox(size, size, 0);
geom = new Geometry(test.name + " metric", box);
geom.setMaterial(new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"));

代码示例来源:origin: org.jmonkeyengine/jme3-core

/**
   * Create a geometry suitable for visualizing the specified bounding box.
   *
   * @param bbox the bounding box (not null)
   * @return a new Geometry instance in world space
   */
  public static Geometry makeGeometry(BoundingBox bbox) {
    float xExtent = bbox.getXExtent();
    float yExtent = bbox.getYExtent();
    float zExtent = bbox.getZExtent();
    WireBox mesh = new WireBox(xExtent, yExtent, zExtent);
    Geometry result = new Geometry("bounding box", mesh);

    Vector3f center = bbox.getCenter();
    result.setLocalTranslation(center);

    return result;
  }
}

代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-terrain

/**
 * used by attachBoundChildren()
 */
private void attachBoundingBox(BoundingBox bb, Node parent) {
  WireBox wb = new WireBox(bb.getXExtent(), bb.getYExtent(), bb.getZExtent());
  Geometry g = new Geometry();
  g.setMesh(wb);
  g.setLocalTranslation(bb.getCenter());
  parent.attachChild(g);
}

代码示例来源:origin: tonihele/OpenKeeper

private void setupVisualsForSelection() {
  matWireBox = new Material(this.app.getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md");
  matWireBox.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Off);
  matWireBox.setColor("Color", selectionColor.getColor());
  matWireBox.getAdditionalRenderState().setLineWidth(6);
  this.wireBox = new WireBox(MapLoader.TILE_WIDTH, MapLoader.TILE_WIDTH, MapLoader.TILE_WIDTH);
  this.wireBox.setDynamic();
  this.wireBoxGeo = new Geometry("wireBox", wireBox);
  this.wireBoxGeo.setMaterial(matWireBox);
  this.wireBoxGeo.setCullHint(CullHint.Never);
  this.wireBoxGeo.setShadowMode(RenderQueue.ShadowMode.Off);
  this.app.getRootNode().attachChild(this.wireBoxGeo);
}

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com