@Test public void testAmbientFiltering() { geom.addLight(new AmbientLight()); checkFilteredLights(1); // Ambient lights must never be filtered // Test for bounding Sphere geom.setModelBound(new BoundingSphere(0.5f, Vector3f.ZERO)); checkFilteredLights(1); // Ambient lights must never be filtered }
@Test public void testDirectionalFiltering() { geom.addLight(new DirectionalLight(Vector3f.UNIT_Y)); checkFilteredLights(1); // Directional lights must never be filtered // Test for bounding Sphere geom.setModelBound(new BoundingSphere(0.5f, Vector3f.ZERO)); checkFilteredLights(1); // Directional lights must never be filtered }
sky.setQueueBucket(Bucket.Sky); sky.setCullHint(Spatial.CullHint.Never); sky.setModelBound(new BoundingSphere(Float.POSITIVE_INFINITY, Vector3f.ZERO));
collisionBox.setModelBound(new BoundingBox()); collisionBox.setLocalTranslation(new Vector3f(20, 95, 30)); collisionBox.setMaterial(matWire);
sl.setDirection(Vector3f.UNIT_Z); geom.setLocalTranslation(Vector3f.ZERO); geom.setModelBound(new BoundingSphere(1f, Vector3f.ZERO)); geom.setModelBound(new BoundingSphere(5f, Vector3f.ZERO)); checkFilteredLights(1);
geom.setModelBound(new BoundingSphere(1f, Vector3f.ZERO)); geom.setLocalTranslation(0, 0, 2); pl.setPosition(new Vector3f(0, 0, 2f));
public Spatial draw(DrawableCombiner3d dc, Primitive3d primitive, SpaceObject sobj, ViewportJMonkey vp) { float innerRadius = (float)((Torus3d) primitive).getInnerRadius(); float outerRadius = (float)((Torus3d) primitive).getOuterRadius(); int circleSamples = (int)((Torus3d) primitive).getCircleSamples(); int radialSamples = (int)((Torus3d) primitive).getRadialSamples(); torus = new Torus(circleSamples, radialSamples, innerRadius, outerRadius); geo = new Geometry(identifier, torus); geo.setModelBound(new BoundingBox()); return geo; }
public void setCurrentSequence(String name) { currentSequence = findSequence(name); currentIndex = 0; if (geometry.getMesh() == null) { geometry.setMesh(currentSequence[currentIndex]); geometry.setModelBound(new BoundingBox()); geometry.updateModelBound(); setModelBound(new BoundingBox()); updateModelBound(); } else if (currentSequence != null) { geometry.setMesh(currentSequence[currentIndex]); } else { System.err.println("Can't play animation " + name); return; } if (totalAnimationTime != 0) { animationFrameTime = totalAnimationTime / currentSequence.length; } }
sky.setQueueBucket(Bucket.Sky); sky.setCullHint(Spatial.CullHint.Never); sky.setModelBound(new BoundingSphere(Float.POSITIVE_INFINITY, Vector3f.ZERO));
sky.setQueueBucket(Bucket.Sky); sky.setCullHint(Spatial.CullHint.Never); sky.setModelBound(new BoundingSphere(Float.POSITIVE_INFINITY, Vector3f.ZERO));
sky.setQueueBucket(Bucket.Sky); sky.setCullHint(Spatial.CullHint.Never); sky.setModelBound(new BoundingSphere(Float.POSITIVE_INFINITY, Vector3f.ZERO));
geometry.setModelBound(new BoundingBox());
geom = new Geometry("model"); geom.setMesh(mesh.get().getA()); geom.setModelBound(new BoundingBox()); geom.updateModelBound(); applyMaterial(geom, polys, bindings);
geom = new Geometry("model"); geom.setMesh(mesh.get().getA()); geom.setModelBound(new BoundingBox()); geom.updateModelBound(); applyMaterial(geom, triangles, bindings);
geom = new Geometry("model"); geom.setMesh(mesh.get().getA()); geom.setModelBound(new BoundingBox()); geom.updateModelBound(); applyMaterial(geom, poly, bindings);