David Rose před 14 roky
rodič
revize
a692e00a05

+ 6 - 0
pandatool/src/pfmprogs/pfmTrans.cxx

@@ -85,6 +85,11 @@ PfmTrans() {
      "3-d depth values encoded in the texture coordinates.",
      "3-d depth values encoded in the texture coordinates.",
      &PfmTrans::dispatch_none, &_got_vis_inverse);
      &PfmTrans::dispatch_none, &_got_vis_inverse);
 
 
+  add_option
+    ("vis2d", "", 60,
+     "Respect only the first two components of each depth value, ignoring z.",
+     &PfmTrans::dispatch_none, &_got_vis_2d);
+
   add_option
   add_option
     ("vistex", "texture.jpg", 60,
     ("vistex", "texture.jpg", 60,
      "Specifies the name of the texture to apply to the visualization.",
      "Specifies the name of the texture to apply to the visualization.",
@@ -129,6 +134,7 @@ bool PfmTrans::
 process_pfm(const Filename &input_filename, PfmFile &file) {
 process_pfm(const Filename &input_filename, PfmFile &file) {
   file.set_zero_special(_got_zero_special);
   file.set_zero_special(_got_zero_special);
   file.set_vis_inverse(_got_vis_inverse);
   file.set_vis_inverse(_got_vis_inverse);
+  file.set_vis_2d(_got_vis_2d);
 
 
   if (_got_resize) {
   if (_got_resize) {
     file.resize(_resize[0], _resize[1]);
     file.resize(_resize[0], _resize[1]);

+ 1 - 0
pandatool/src/pfmprogs/pfmTrans.h

@@ -54,6 +54,7 @@ private:
   bool _got_reverse;
   bool _got_reverse;
   bool _got_zero_special;
   bool _got_zero_special;
   bool _got_vis_inverse;
   bool _got_vis_inverse;
+  bool _got_vis_2d;
   bool _got_resize;
   bool _got_resize;
   int _resize[2];
   int _resize[2];