lwoSurfaceBlockTransform.cxx 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /**
  2. * PANDA 3D SOFTWARE
  3. * Copyright (c) Carnegie Mellon University. All rights reserved.
  4. *
  5. * All use of this software is subject to the terms of the revised BSD
  6. * license. You should have received a copy of this license along
  7. * with this source code in a file named "LICENSE."
  8. *
  9. * @file lwoSurfaceBlockTransform.cxx
  10. * @author drose
  11. * @date 2001-04-24
  12. */
  13. #include "lwoSurfaceBlockTransform.h"
  14. #include "lwoInputFile.h"
  15. #include "dcast.h"
  16. #include "indent.h"
  17. TypeHandle LwoSurfaceBlockTransform::_type_handle;
  18. /**
  19. * Reads the data of the chunk in from the given input file, if possible. The
  20. * ID and length of the chunk have already been read. stop_at is the byte
  21. * position of the file to stop at (based on the current position at
  22. * in->get_bytes_read()). Returns true on success, false otherwise.
  23. */
  24. bool LwoSurfaceBlockTransform::
  25. read_iff(IffInputFile *in, size_t stop_at) {
  26. LwoInputFile *lin = DCAST(LwoInputFile, in);
  27. _vec = lin->get_vec3();
  28. _envelope = lin->get_vx();
  29. return true;
  30. }
  31. /**
  32. *
  33. */
  34. void LwoSurfaceBlockTransform::
  35. write(std::ostream &out, int indent_level) const {
  36. indent(out, indent_level)
  37. << get_id() << " { vec = " << _vec
  38. << ", envelope = " << _envelope << " }\n";
  39. }