本文整理了Java中com.jme3.scene.Geometry.updateGeometricState()
方法的一些代码示例,展示了Geometry.updateGeometricState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry.updateGeometricState()
方法的具体详情如下:
包路径:com.jme3.scene.Geometry
类名称:Geometry
方法名:updateGeometricState
暂无
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public void simpleUpdate(float tpf){
Quaternion q = new Quaternion();
angle += tpf;
angle %= FastMath.TWO_PI;
q.fromAngles(angle, 0, angle);
offBox.setLocalRotation(q);
offBox.updateLogicalState(tpf);
offBox.updateGeometricState();
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public void simpleUpdate(float tpf){
Quaternion q = new Quaternion();
angle += tpf;
angle %= FastMath.TWO_PI;
q.fromAngles(angle, 0, angle);
offBox.setLocalRotation(q);
offBox.updateLogicalState(tpf);
offBox.updateGeometricState();
}
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public void simpleUpdate(float tpf){
Quaternion q = new Quaternion();
if (offView.isEnabled()) {
angle += tpf;
angle %= FastMath.TWO_PI;
q.fromAngles(angle, 0, angle);
offBox.setLocalRotation(q);
offBox.updateLogicalState(tpf);
offBox.updateGeometricState();
}
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public void update(){
super.update();
// do some animation
float tpf = timer.getTimePerFrame();
boxGeom.rotate(tpf * 2, tpf * 4, tpf * 3);
// dont forget to update the scenes
boxGeom.updateLogicalState(tpf);
boxGeom.updateGeometricState();
// render the viewports
renderManager.render(tpf, context.isRenderable());
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
private void checkFilteredLights(int expected) {
geom.updateGeometricState();
filter.setCamera(cam); // setCamera resets the intersection cache
list.clear();
filter.filterLights(geom, list);
assert list.size() == expected;
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public void simpleInitApp() {
Mesh mesh = new Mesh();
mesh.setBuffer(VertexBuffer.Type.Index, 1, BufferUtils.createIntBuffer(new int[]{1}));
mesh.setBuffer(VertexBuffer.Type.Position, 3, BufferUtils.createFloatBuffer(new float[]{0, 0, 0}));
mesh.setMode(Mesh.Mode.Points);
mesh.setBound(new BoundingBox(new Vector3f(0, 0, 0), 10, 10, 10));
mesh.updateCounts();
Geometry geometry = new Geometry("Test", mesh);
geometry.updateGeometricState();
geometry.setMaterial(new Material(assetManager, "Materials/Geom/SimpleGeom.j3md"));
//geometry.getMaterial().getAdditionalRenderState().setFaceCullMode(RenderState.FaceCullMode.Off);
//geometry.setMaterial(assetManager.loadMaterial("Materials/Geom/SimpleTess.j3md"));
rootNode.attachChild(geometry);
Geometry geometry1 = new Geometry("T1", new Sphere(10, 10, 1));
geometry1.setMaterial(new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"));
rootNode.attachChild(geometry1);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Before
public void setUp() {
filter = new DefaultLightFilter();
cam = new Camera(512, 512);
cam.setFrustumPerspective(45, 1, 1, 1000);
cam.setLocation(Vector3f.ZERO);
cam.lookAtDirection(Vector3f.UNIT_Z, Vector3f.UNIT_Y);
filter.setCamera(cam);
Box box = new Box(1, 1, 1);
geom = new Geometry("geom", box);
geom.setLocalTranslation(0, 0, 10);
geom.updateGeometricState();
list = new LightList(geom);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
frustumMdl.updateGeometricState();
return frustumMdl;
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
private Geometry createFrustum(Vector3f[] pts, int i) {
WireFrustum frustum = new WireFrustum(pts);
Geometry frustumMdl = new Geometry("f", frustum);
frustumMdl.setCullHint(Spatial.CullHint.Never);
frustumMdl.setShadowMode(ShadowMode.Off);
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
mat.getAdditionalRenderState().setWireframe(true);
frustumMdl.setMaterial(mat);
switch (i) {
case 0:
frustumMdl.getMaterial().setColor("Color", ColorRGBA.Pink);
break;
case 1:
frustumMdl.getMaterial().setColor("Color", ColorRGBA.Red);
break;
case 2:
frustumMdl.getMaterial().setColor("Color", ColorRGBA.Green);
break;
case 3:
frustumMdl.getMaterial().setColor("Color", ColorRGBA.Blue);
break;
default:
frustumMdl.getMaterial().setColor("Color", ColorRGBA.White);
break;
}
frustumMdl.updateGeometricState();
return frustumMdl;
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
frustumMdl.updateGeometricState();
return frustumMdl;
代码示例来源:origin: us.ihmc/IHMCPerception
@Override
public void simpleUpdate(float tpf){
Quaternion q = new Quaternion();
angle += tpf;
angle %= FastMath.TWO_PI;
q.fromAngles(angle, 0, angle);
offBox.setLocalRotation(q);
offBox.updateLogicalState(tpf);
offBox.updateGeometricState();
}
代码示例来源:origin: us.ihmc/ihmc-perception
@Override
public void simpleUpdate(float tpf){
Quaternion q = new Quaternion();
angle += tpf;
angle %= FastMath.TWO_PI;
q.fromAngles(angle, 0, angle);
offBox.setLocalRotation(q);
offBox.updateLogicalState(tpf);
offBox.updateGeometricState();
}
代码示例来源:origin: net.sf.phat/phat-server
@Override
protected void controlUpdate(float fps) {
cont += fps;
if (cont > frecuency) {
synchronized (buf) {
if (imagCont > 0) {
if (texture == null) {
texture = new Texture2D(buf[index].getWidth(), buf[index].getHeight(), Image.Format.Depth24);
texture.setImage(awtLoader.load(buf[index], true));
display.getMaterial().setTexture("ColorMap", texture);
} else {
texture.setImage(awtLoader.load(buf[index], true));
display.updateGeometricState();
}
imagCont--;
}
}
cont = 0f;
}
}
代码示例来源:origin: info.projectkyoto/mms-engine
cubeModel.updateGeometricState();
代码示例来源:origin: info.projectkyoto/mms-engine
outGeom.updateGeometricState();
newGeoms.add(outGeom);
代码示例来源:origin: info.projectkyoto/mms-engine
geom.setLocalScale(bbox2.getXExtent(), bbox2.getYExtent(),
bbox2.getZExtent());
geom.updateGeometricState();
geom.setMaterial(mat);
rq.addToQueue(geom, Bucket.Opaque);
代码示例来源:origin: info.projectkyoto/mms-engine
geom.addLight(dl);
geom.addLight(dl2);
geom.updateGeometricState();
代码示例来源:origin: info.projectkyoto/mms-engine
private Geometry createFrustum(Vector3f[] pts, int i) {
WireFrustum frustum = new WireFrustum(pts);
Geometry frustumMdl = new Geometry("f", frustum);
frustumMdl.setCullHint(Spatial.CullHint.Never);
frustumMdl.setShadowMode(ShadowMode.Off);
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
mat.getAdditionalRenderState().setWireframe(true);
frustumMdl.setMaterial(mat);
switch (i) {
case 0:
frustumMdl.getMaterial().setColor("Color", ColorRGBA.Pink);
break;
case 1:
frustumMdl.getMaterial().setColor("Color", ColorRGBA.Red);
break;
case 2:
frustumMdl.getMaterial().setColor("Color", ColorRGBA.Green);
break;
case 3:
frustumMdl.getMaterial().setColor("Color", ColorRGBA.Blue);
break;
default:
frustumMdl.getMaterial().setColor("Color", ColorRGBA.White);
break;
}
frustumMdl.updateGeometricState();
return frustumMdl;
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
private Geometry createFrustum(Vector3f[] pts, int i) {
WireFrustum frustum = new WireFrustum(pts);
Geometry frustumMdl = new Geometry("f", frustum);
frustumMdl.setCullHint(Spatial.CullHint.Never);
frustumMdl.setShadowMode(ShadowMode.Off);
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
mat.getAdditionalRenderState().setWireframe(true);
frustumMdl.setMaterial(mat);
switch (i) {
case 0:
frustumMdl.getMaterial().setColor("Color", ColorRGBA.Pink);
break;
case 1:
frustumMdl.getMaterial().setColor("Color", ColorRGBA.Red);
break;
case 2:
frustumMdl.getMaterial().setColor("Color", ColorRGBA.Green);
break;
case 3:
frustumMdl.getMaterial().setColor("Color", ColorRGBA.Blue);
break;
default:
frustumMdl.getMaterial().setColor("Color", ColorRGBA.White);
break;
}
frustumMdl.updateGeometricState();
return frustumMdl;
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
frustumMdl.updateGeometricState();
return frustumMdl;
内容来源于网络,如有侵权,请联系作者删除!