File: test_surf_clip.py

package info (click to toggle)
openstructure 2.11.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 206,240 kB
  • sloc: cpp: 188,571; python: 36,686; ansic: 34,298; fortran: 3,275; sh: 312; xml: 146; makefile: 29
file content (18 lines) | stat: -rw-r--r-- 553 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
struct=io.LoadEntity("sdh.pdb")
surf=io.LoadSurface("sdh","msms")
surf.Attach(struct,5.0)
go=gfx.Surface("surf",surf)
# this is broken
#go.clip=True
#go.clip_plane=geom.Vec4(0,0,-1,-130)
# this works, z offset to near clipping plane, must be >0
go.clip_offset=1
go.solid=True
go.solid_color=gfx.RGB(1,1,0)

scene.rtc=geom.Mat4(0.914075, -0.355397, 0.195293, 29.688, 0.405471, 0.7934, -0.45397, 19.9405, 0.00639453, 0.494153, 0.869337, 73.0075, 0, 0, -143.077, 1)

scene.Add(go)
scene.SetCenter(go.GetCenter())
scene.Autoslab()
scene.auto_autoslab=False