Browse Source

PfmFile::set_point() should allow NaN's

David Rose 9 years ago
parent
commit
775c69b53d
1 changed files with 4 additions and 4 deletions
  1. 4 4
      panda/src/pnmimage/pfmFile.I

+ 4 - 4
panda/src/pnmimage/pfmFile.I

@@ -82,7 +82,7 @@ get_point1(int x, int y) const {
  */
  */
 INLINE void PfmFile::
 INLINE void PfmFile::
 set_point1(int x, int y, PN_float32 point) {
 set_point1(int x, int y, PN_float32 point) {
-  nassertv(!cnan(point));
+  //nassertv(!cnan(point));
   nassertv(x >= 0 && x < _x_size &&
   nassertv(x >= 0 && x < _x_size &&
            y >= 0 && y < _y_size);
            y >= 0 && y < _y_size);
   _table[(y * _x_size + x) * _num_channels] = point;
   _table[(y * _x_size + x) * _num_channels] = point;
@@ -105,7 +105,7 @@ get_point2(int x, int y) const {
  */
  */
 INLINE void PfmFile::
 INLINE void PfmFile::
 set_point2(int x, int y, const LVecBase2f &point) {
 set_point2(int x, int y, const LVecBase2f &point) {
-  nassertv(!point.is_nan());
+  //nassertv(!point.is_nan());
   nassertv(x >= 0 && x < _x_size &&
   nassertv(x >= 0 && x < _x_size &&
            y >= 0 && y < _y_size);
            y >= 0 && y < _y_size);
   switch (_num_channels) {
   switch (_num_channels) {
@@ -202,7 +202,7 @@ get_point3(int x, int y) const {
  */
  */
 INLINE void PfmFile::
 INLINE void PfmFile::
 set_point3(int x, int y, const LVecBase3f &point) {
 set_point3(int x, int y, const LVecBase3f &point) {
-  nassertv(!point.is_nan());
+  //nassertv(!point.is_nan());
   nassertv(x >= 0 && x < _x_size &&
   nassertv(x >= 0 && x < _x_size &&
            y >= 0 && y < _y_size);
            y >= 0 && y < _y_size);
   switch (_num_channels) {
   switch (_num_channels) {
@@ -264,7 +264,7 @@ get_point4(int x, int y) const {
  */
  */
 INLINE void PfmFile::
 INLINE void PfmFile::
 set_point4(int x, int y, const LVecBase4f &point) {
 set_point4(int x, int y, const LVecBase4f &point) {
-  nassertv(!point.is_nan());
+  //nassertv(!point.is_nan());
   nassertv(x >= 0 && x < _x_size &&
   nassertv(x >= 0 && x < _x_size &&
            y >= 0 && y < _y_size);
            y >= 0 && y < _y_size);
   switch (_num_channels) {
   switch (_num_channels) {