Also ich hab eine Sphere erstellt und möchte für meine Präsentation morgen nur wissen, was genau diese Methode macht.
Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
[h=3]setInfluencingBounds[/h] public void setInfluencingBounds(Bounds region) <dl><dd>Sets the Light's influencing region to the specified bounds. This is used when the influencing bounding leaf is set to null.
</dd><dd><dl><dt>Parameters:</dt><dd><code>region</code> - the bounds that contains the Light's new influencing region. </dd><dt>Throws: </dt><dd><code>CapabilityNotSetException</code> - if appropriate capability is not set and this object is part of live or compiled scene graph</dd></dl> </dd></dl>
package thebox;
import com.sun.j3d.utils.universe.SimpleUniverse;
import com.sun.j3d.utils.geometry.Sphere;
import javax.media.j3d.BranchGroup;
import javax.media.j3d.BoundingSphere;
import javax.media.j3d.DirectionalLight;
import javax.vecmath.Color3f;
import javax.vecmath.Point3d;
import javax.vecmath.Vector3f;
public class Sphere1
{
public static void main( String[] args ) {
new Sphere1();
}
public Sphere1()
{
SimpleUniverse universe = new SimpleUniverse();
BranchGroup group = new BranchGroup();
group.addChild(new Sphere(0.5f));
Color3f light1Color = new Color3f(3.9f, 0.1f, 8.1f);
BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
Vector3f light1Direction = new Vector3f(4.0f, -7.0f, -12.0f);
DirectionalLight light1 = new DirectionalLight(light1Color, light1Direction);
light1.setInfluencingBounds(bounds);
group.addChild(light1);
universe.getViewingPlatform().setNominalViewingTransform();
universe.addBranchGraph(group);
}
}