use of raytracer.objects.PlyObject in project narchy by automenta.
the class BowlingScene method createSphereLights.
protected void createSphereLights() throws Exception {
Transformation t = new Transformation();
// Lampe mit Gl�hbirne hinzuf�gen:
add(new SphereLight(new Vector3d(0.0, -1.75, 4.65), 0.05, sphereLight));
t.reset();
PlyObject ply = new PlyObject("ply/lamp2.ply", new ReflectiveShader(0.2f, new PhongShader(new ColorShader(ColorEx.WHITE), new Vector3f(0.3f, 0.3f, 0.3f), new Vector3f(0.4f, 0.4f, 0.4f), new Vector3f(0.7f, 0.7f, 0.7f))));
t.scale(0.15, 0.15, 0.15);
t.move(0.0, -1.1, 4.65);
ply.center();
ply.transform(t);
add(ply);
// Lampe mit Gl�hbirne hinzuf�gen:
add(new SphereLight(new Vector3d(4.2, -1.75, 4.65), 0.05, sphereLight));
t.reset();
ply = new PlyObject("ply/lamp2.ply", new ReflectiveShader(0.2f, new PhongShader(new ColorShader(ColorEx.WHITE), new Vector3f(0.3f, 0.3f, 0.3f), new Vector3f(0.4f, 0.4f, 0.4f), new Vector3f(0.7f, 0.7f, 0.7f))));
t.scale(0.15, 0.15, 0.15);
t.move(4.2, -1.1, 4.65);
ply.center();
ply.transform(t);
add(ply);
/*
// Lampe mit Gl�hbirne hinzuf�gen:
add(new SphereLight(new Vector3d(0,-1.75,-0.2),0.1, sphereLight));
t.reset();
ply = new PlyObject("ply/lamp2.ply",
new ReflectiveShader(0.2f, new PhongShader(new ColorShader(ColorEx.WHITE), new Vector3f(0.3f, 0.3f, 0.3f), new Vector3f(0.4f, 0.4f, 0.4f), new Vector3f(0.7f, 0.7f, 0.7f))));
t.scale(0.15,0.15,0.15);
t.move(0,-1.1,-0.2);
ply.center();
ply.transform(t);
add(ply);
// Lampe mit Gl�hbirne hinzuf�gen:
add(new SphereLight(new Vector3d(4.2,-1.75,-0.2),0.1, sphereLight));
t.reset();
ply = new PlyObject("ply/lamp2.ply",
new ReflectiveShader(0.2f, new PhongShader(new ColorShader(ColorEx.WHITE), new Vector3f(0.3f, 0.3f, 0.3f), new Vector3f(0.4f, 0.4f, 0.4f), new Vector3f(0.7f, 0.7f, 0.7f))));
t.scale(0.15,0.15,0.15);
t.move(4.2,-1.1,-0.2);
ply.center();
ply.transform(t);
add(ply);*/
}
Aggregations