Diff of /trunk/contrib/brl/bseg/boxm2/pyscripts/vpgl_adaptor.py [r36932] .. [r36933]  Maximize  Restore

Switch to side-by-side view

--- a/trunk/contrib/brl/bseg/boxm2/pyscripts/vpgl_adaptor.py
+++ b/trunk/contrib/brl/bseg/boxm2/pyscripts/vpgl_adaptor.py
@@ -27,7 +27,7 @@
   cam = dbvalue(id,type);
   return cam;
 #Scale = (scale_u, scale_v), ppoint = (u,v), center = (x,y,z), look_pt = (x,y,z), up = (x,y,z);
-def create_perspective_camera( scale, ppoint, center, look_pt,up ) :
+def create_perspective_camera( scale, ppoint, center, look_pt,up = [0,1,0] ) :
   boxm2_batch.init_process("vpglCreatePerspectiveCameraProcess");
   boxm2_batch.set_input_double(0, scale[0]);
   boxm2_batch.set_input_double(1, ppoint[0]);
@@ -39,32 +39,11 @@
   boxm2_batch.set_input_double(7, look_pt[0]);
   boxm2_batch.set_input_double(8, look_pt[1]);
   boxm2_batch.set_input_double(9, look_pt[2]);
-  boxm2_batch.set_input_double(10, up[0]);
-  boxm2_batch.set_input_double(11, up[1]);
-  boxm2_batch.set_input_double(12, up[2]);
-  boxm2_batch.run_process();
-  (id,type) = boxm2_batch.commit_output(0);
-  cam = dbvalue(id,type);
-  return cam;
-def create_perspective_camera( scale, ppoint, center, look_pt ) :
-  boxm2_batch.init_process("vpglCreatePerspectiveCameraProcess");
-  boxm2_batch.set_input_double(0, scale[0]);
-  boxm2_batch.set_input_double(1, ppoint[0]);
-  boxm2_batch.set_input_double(2, scale[1]);
-  boxm2_batch.set_input_double(3, ppoint[1]);
-  boxm2_batch.set_input_double(4, center[0]);
-  boxm2_batch.set_input_double(5, center[1]);
-  boxm2_batch.set_input_double(6, center[2]);
-  boxm2_batch.set_input_double(7, look_pt[0]);
-  boxm2_batch.set_input_double(8, look_pt[1]);
-  boxm2_batch.set_input_double(9, look_pt[2]);
-  # boxm2_batch.set_input_double(10, up[0]);
-  # boxm2_batch.set_input_double(11, up[1]);
-  # boxm2_batch.set_input_double(12, up[2]);
-  boxm2_batch.run_process();
-  (id,type) = boxm2_batch.commit_output(0);
-  cam = dbvalue(id,type);
-  return cam;
+  boxm2_batch.run_process();
+  (id,type) = boxm2_batch.commit_output(0);
+  cam = dbvalue(id,type);
+  return cam;
+
 
 def create_perspective_camera_from_kml(ni, nj, right_fov, top_fov, altitude, heading, tilt, roll, cent_x, cent_y) :
   boxm2_batch.init_process("vpglCreatePerspCameraFromKMLProcess");

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks