00001 // Filename: dcMolecularField.h 00002 // Created by: drose (05Oct00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #ifndef DCMOLECULARFIELD_H 00020 #define DCMOLECULARFIELD_H 00021 00022 #include "dcbase.h" 00023 #include "dcField.h" 00024 00025 class DCAtomicField; 00026 00027 //////////////////////////////////////////////////////////////////// 00028 // Class : DCMolecularField 00029 // Description : A single molecular field of a Distributed Class, as 00030 // read from a .dc file. This represents a combination 00031 // of two or more related atomic fields, that will often 00032 // be treated as a unit. 00033 //////////////////////////////////////////////////////////////////// 00034 class EXPCL_DIRECT DCMolecularField : public DCField { 00035 PUBLISHED: 00036 virtual DCMolecularField *as_molecular_field(); 00037 00038 int get_num_atomics() const; 00039 DCAtomicField *get_atomic(int n) const; 00040 00041 public: 00042 DCMolecularField(); 00043 virtual void write(ostream &out, int indent_level = 0) const; 00044 virtual void generate_hash(HashGenerator &hash) const; 00045 00046 public: 00047 // These members define the primary interface to the molecular field 00048 // definition as read from the file. 00049 typedef pvector<DCAtomicField *> Fields; 00050 Fields _fields; 00051 }; 00052 00053 #endif 00054 00055