gpt4 book ai didi

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

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

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

WireBox.setBuffer介绍

暂无

代码示例

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

public WireBox(float xExt, float yExt, float zExt){
  updatePositions(xExt,yExt,zExt);
  setBuffer(Type.Index, 2,
      new short[]{
         0, 1,
         1, 2,
         2, 3,
         3, 0,
         4, 5,
         5, 6,
         6, 7,
         7, 4,
         0, 4,
         1, 5,
         2, 6,
         3, 7,
      }
  );
  setMode(Mode.Lines);
  updateCounts();
}

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

public void updatePositions(float xExt, float yExt, float zExt){
  VertexBuffer pvb = getBuffer(Type.Position);
  FloatBuffer pb;
  if (pvb == null){
    pvb = new VertexBuffer(Type.Position);
    pb = BufferUtils.createVector3Buffer(8);
    pvb.setupData(Usage.Dynamic, 3, Format.Float, pb);
    setBuffer(pvb);
  }else{
    pb = (FloatBuffer) pvb.getData();
    pvb.updateData(pb);
  }
  pb.rewind();
  pb.put(
    new float[]{
      -xExt, -yExt,  zExt,
       xExt, -yExt,  zExt,
       xExt,  yExt,  zExt,
      -xExt,  yExt,  zExt,
      -xExt, -yExt, -zExt,
       xExt, -yExt, -zExt,
       xExt,  yExt, -zExt,
      -xExt,  yExt, -zExt,
    }
  );
  updateBound();
}

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

public WireBox(float xExt, float yExt, float zExt){
  updatePositions(xExt,yExt,zExt);
  setBuffer(Type.Index, 2,
      new short[]{
         0, 1,
         1, 2,
         2, 3,
         3, 0,
         4, 5,
         5, 6,
         6, 7,
         7, 4,
         0, 4,
         1, 5,
         2, 6,
         3, 7,
      }
  );
  setMode(Mode.Lines);
  updateCounts();
}

代码示例来源:origin: info.projectkyoto/mms-engine

public WireBox(float xExt, float yExt, float zExt){
  updatePositions(xExt,yExt,zExt);
  setBuffer(Type.Index, 2,
      new short[]{
         0, 1,
         1, 2,
         2, 3,
         3, 0,
         4, 5,
         5, 6,
         6, 7,
         7, 4,
         0, 4,
         1, 5,
         2, 6,
         3, 7,
      }
  );
  setMode(Mode.Lines);
  updateCounts();
}

代码示例来源:origin: info.projectkyoto/mms-engine

public void updatePositions(float xExt, float yExt, float zExt){
  VertexBuffer pvb = getBuffer(Type.Position);
  FloatBuffer pb;
  if (pvb == null){
    pvb = new VertexBuffer(Type.Position);
    pb = BufferUtils.createVector3Buffer(8);
    pvb.setupData(Usage.Dynamic, 3, Format.Float, pb);
    setBuffer(pvb);
  }else{
    pb = (FloatBuffer) pvb.getData();
    pvb.updateData(pb);
  }
  pb.rewind();
  pb.put(
    new float[]{
      -xExt, -yExt,  zExt,
       xExt, -yExt,  zExt,
       xExt,  yExt,  zExt,
      -xExt,  yExt,  zExt,
      -xExt, -yExt, -zExt,
       xExt, -yExt, -zExt,
       xExt,  yExt, -zExt,
      -xExt,  yExt, -zExt,
    }
  );
  updateBound();
}

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

public void updatePositions(float xExt, float yExt, float zExt){
  VertexBuffer pvb = getBuffer(Type.Position);
  FloatBuffer pb;
  if (pvb == null){
    pvb = new VertexBuffer(Type.Position);
    pb = BufferUtils.createVector3Buffer(8);
    pvb.setupData(Usage.Dynamic, 3, Format.Float, pb);
    setBuffer(pvb);
  }else{
    pb = (FloatBuffer) pvb.getData();
    pvb.updateData(pb);
  }
  pb.rewind();
  pb.put(
    new float[]{
      -xExt, -yExt,  zExt,
       xExt, -yExt,  zExt,
       xExt,  yExt,  zExt,
      -xExt,  yExt,  zExt,
      -xExt, -yExt, -zExt,
       xExt, -yExt, -zExt,
       xExt,  yExt, -zExt,
      -xExt,  yExt, -zExt,
    }
  );
  updateBound();
}

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