dcMolecularField.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // Filename: dcMolecularField.h
  2. // Created by: drose (05Oct00)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://www.panda3d.org/license.txt .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. #ifndef DCMOLECULARFIELD_H
  19. #define DCMOLECULARFIELD_H
  20. #include "dcbase.h"
  21. #include "dcField.h"
  22. class DCAtomicField;
  23. ////////////////////////////////////////////////////////////////////
  24. // Class : DCMolecularField
  25. // Description : A single molecular field of a Distributed Class, as
  26. // read from a .dc file. This represents a combination
  27. // of two or more related atomic fields, that will often
  28. // be treated as a unit.
  29. ////////////////////////////////////////////////////////////////////
  30. class EXPCL_DIRECT DCMolecularField : public DCField {
  31. PUBLISHED:
  32. virtual DCMolecularField *as_molecular_field();
  33. int get_num_atomics() const;
  34. DCAtomicField *get_atomic(int n) const;
  35. public:
  36. DCMolecularField();
  37. virtual void write(ostream &out, int indent_level = 0) const;
  38. virtual void generate_hash(HashGenerator &hash) const;
  39. public:
  40. // These members define the primary interface to the molecular field
  41. // definition as read from the file.
  42. typedef pvector<DCAtomicField *> Fields;
  43. Fields _fields;
  44. };
  45. #endif