From 19abb0ec93f967ebd4f5eb3b86980ec7737f625d Mon Sep 17 00:00:00 2001 From: Ansgar Philippsen <ansgar.philippsen@gmail.com> Date: Mon, 11 Oct 2010 15:25:26 -0400 Subject: [PATCH] fixed gfx examples --- examples/gfx/ambient_occlusion1.py | 7 +------ examples/gfx/ambient_occlusion2.py | 3 ++- examples/gfx/hsc_hemilight.py | 2 +- examples/gfx/shadow_mapping.py | 11 ++--------- examples/gfx/transp.py | 11 ++--------- 5 files changed, 8 insertions(+), 26 deletions(-) diff --git a/examples/gfx/ambient_occlusion1.py b/examples/gfx/ambient_occlusion1.py index 80b8268aa..df0d8a7fe 100644 --- a/examples/gfx/ambient_occlusion1.py +++ b/examples/gfx/ambient_occlusion1.py @@ -1,4 +1,4 @@ -s=io.LoadSurface("../surf/sdh","msms") +s=io.LoadSurface("../demos/data/sh2","msms") scene.Add(gfx.Surface("s",s)) # alternative shading mode @@ -17,8 +17,3 @@ scene.SetAmbientOcclusionWeight(1.0) # AO algorithms 0-3, default is 1 scene.SetAmbientOcclusionMode(1) -# orientation -scene.SetRTC(geom.Mat4(0.827929,-0.460893,-0.319547,29.688, - 0.174973,0.753608,-0.633609,19.9405, - 0.532839,0.468671,0.704578,73.0075, - -5.4704,1.54823,-116,1)) diff --git a/examples/gfx/ambient_occlusion2.py b/examples/gfx/ambient_occlusion2.py index d22af87f3..ce9bc0a40 100644 --- a/examples/gfx/ambient_occlusion2.py +++ b/examples/gfx/ambient_occlusion2.py @@ -1,4 +1,5 @@ -e=io.LoadPDB("../entity/sdh.pdb") + +e=io.LoadPDB("../demos/data/sdh.pdb") scene.Add(gfx.Entity("x",gfx.CPK,e.Select("chain=A"))) # fast spheres with 3D sprites, default diff --git a/examples/gfx/hsc_hemilight.py b/examples/gfx/hsc_hemilight.py index b02b76f31..91a4b8c4f 100644 --- a/examples/gfx/hsc_hemilight.py +++ b/examples/gfx/hsc_hemilight.py @@ -1,4 +1,4 @@ -e=io.LoadPDB("../entity/sdh.pdb") +e=io.LoadPDB("../demos/data/sdh.pdb") scene.Add(gfx.Entity("x",gfx.HSC,e.Select("chain=A"))) scene["x"].GetOptions(gfx.HSC).SetTubeRadius(0.6) # spiral helices (default) diff --git a/examples/gfx/shadow_mapping.py b/examples/gfx/shadow_mapping.py index bba436139..f4260ca31 100644 --- a/examples/gfx/shadow_mapping.py +++ b/examples/gfx/shadow_mapping.py @@ -1,4 +1,4 @@ -s=io.LoadSurface("../surf/sdh","msms") +s=io.LoadSurface("../demos/data/sh2","msms") scene.Add(gfx.Surface("s",s)) # alternative shading mode @@ -11,12 +11,5 @@ scene["s"].SetOutlineMode(3) # turn on realtime shadow mapping scene.SetShadow(True) -# this influences the size of the shadow map -# size = (quality+1)*256, up to quality=8 -scene.SetShadowQuality(1) # default +scene.SetShadowQuality(3) # default -# orientation -scene.SetRTC(geom.Mat4(0.827929,-0.460893,-0.319547,29.688, - 0.174973,0.753608,-0.633609,19.9405, - 0.532839,0.468671,0.704578,73.0075, - -5.4704,1.54823,-116,1)) diff --git a/examples/gfx/transp.py b/examples/gfx/transp.py index dba10b4c9..76468f0ca 100644 --- a/examples/gfx/transp.py +++ b/examples/gfx/transp.py @@ -1,5 +1,5 @@ -e=io.LoadPDB("../entity/sdh.pdb") -s=io.LoadSurface("../surf/sdh","msms") +e=io.LoadPDB("../demos/data/sh2.pdb") +s=io.LoadSurface("../demos/data/sh2","msms") scene.Add(gfx.Entity("x",gfx.HSC,e.Select("chain=A"))) scene["x"].SetColor(gfx.Color(0.9,0.95,1.0)) @@ -11,10 +11,3 @@ scene["s"].SetOpacity(0.4) scene["s"].SetMat(0,1,0,0) scene.bg=gfx.WHITE - -scene.SetRTC(geom.Mat4(-0.589889,-0.594876,0.546034,28.2245, - 0.806165,-0.472502,0.356147,20.1685, - 0.0461388,0.65028,0.758291,73.5665, - -3.52709,1.72253,-120,1)) - - -- GitLab