diff --git a/panda/src/chan/animChannelMatrixXfmTable.cxx b/panda/src/chan/animChannelMatrixXfmTable.cxx index ba698a3608..5f5b7b0365 100644 --- a/panda/src/chan/animChannelMatrixXfmTable.cxx +++ b/panda/src/chan/animChannelMatrixXfmTable.cxx @@ -273,6 +273,7 @@ set_table(char table_id, const CPTA_float &table) { if (table.size() > 1 && (int)table.size() < num_frames) { // The new table has an invalid number of frames--it doesn't match // the bundle's requirement. + nassertv(false); return; } diff --git a/panda/src/chan/animChannelMatrixXfmTable.h b/panda/src/chan/animChannelMatrixXfmTable.h index 0abb5637a5..3ebade9078 100644 --- a/panda/src/chan/animChannelMatrixXfmTable.h +++ b/panda/src/chan/animChannelMatrixXfmTable.h @@ -36,11 +36,11 @@ protected: AnimChannelMatrixXfmTable(); AnimChannelMatrixXfmTable(AnimGroup *parent, const AnimChannelMatrixXfmTable ©); -public: +PUBLISHED: AnimChannelMatrixXfmTable(AnimGroup *parent, const string &name); virtual ~AnimChannelMatrixXfmTable(); - +public: virtual bool has_changed(int last_frame, double last_frac, int this_frame, double this_frac); virtual void get_value(int frame, LMatrix4f &mat); @@ -52,12 +52,12 @@ public: virtual void get_pos(int frame, LVecBase3f &pos); virtual void get_shear(int frame, LVecBase3f &shear); +PUBLISHED: static INLINE bool is_valid_id(char table_id); void set_table(char table_id, const CPTA_float &table); INLINE CPTA_float get_table(char table_id) const; -PUBLISHED: void clear_all_tables(); INLINE bool has_table(char table_id) const; INLINE void clear_table(char table_id); diff --git a/panda/src/chan/animChannelScalarTable.I b/panda/src/chan/animChannelScalarTable.I index 65697e0966..b9b65cc635 100644 --- a/panda/src/chan/animChannelScalarTable.I +++ b/panda/src/chan/animChannelScalarTable.I @@ -13,6 +13,17 @@ //////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////// +// Function: AnimChannelScalarTable::get_table +// Access: Public +// Description: Returns a pointer to the table's data, +// if it exists, or NULL if it does not. +//////////////////////////////////////////////////////////////////// +INLINE CPTA_float AnimChannelScalarTable:: +get_table() const { + return _table; +} + //////////////////////////////////////////////////////////////////// // Function: AnimChannelScalarTable::has_table // Access: Published diff --git a/panda/src/chan/animChannelScalarTable.cxx b/panda/src/chan/animChannelScalarTable.cxx index 656316b1c6..7b39562fc0 100644 --- a/panda/src/chan/animChannelScalarTable.cxx +++ b/panda/src/chan/animChannelScalarTable.cxx @@ -120,6 +120,7 @@ set_table(const CPTA_float &table) { if (table.size() > 1 && (int)table.size() < num_frames) { // The new table has an invalid number of frames--it doesn't match // the bundle's requirement. + nassertv(false); return; } diff --git a/panda/src/chan/animChannelScalarTable.h b/panda/src/chan/animChannelScalarTable.h index 8f4396711b..23090f52d0 100644 --- a/panda/src/chan/animChannelScalarTable.h +++ b/panda/src/chan/animChannelScalarTable.h @@ -40,9 +40,10 @@ public: int this_frame, double this_frac); virtual void get_value(int frame, float &value); - void set_table(const CPTA_float &table); - PUBLISHED: + void set_table(const CPTA_float &table); + INLINE CPTA_float get_table() const; + INLINE bool has_table() const; INLINE void clear_table(); diff --git a/panda/src/chan/animGroup.h b/panda/src/chan/animGroup.h index 924575530d..bba4b3c53a 100644 --- a/panda/src/chan/animGroup.h +++ b/panda/src/chan/animGroup.h @@ -38,19 +38,17 @@ protected: AnimGroup(const string &name = ""); AnimGroup(AnimGroup *parent, const AnimGroup ©); -public: +PUBLISHED: // This is the normal AnimGroup constructor. AnimGroup(AnimGroup *parent, const string &name); virtual ~AnimGroup(); -PUBLISHED: int get_num_children() const; AnimGroup *get_child(int n) const; AnimGroup *find_child(const string &name) const; public: virtual TypeHandle get_value_type() const; - void sort_descendants(); PUBLISHED: diff --git a/panda/src/chan/partBundle.h b/panda/src/chan/partBundle.h index 758c1ff186..7fa3458f68 100644 --- a/panda/src/chan/partBundle.h +++ b/panda/src/chan/partBundle.h @@ -57,11 +57,10 @@ protected: // The copy constructor is protected; use make_copy() or copy_subgraph(). PartBundle(const PartBundle ©); -public: +PUBLISHED: PartBundle(const string &name = ""); virtual PartGroup *make_copy() const; -PUBLISHED: INLINE CPT(AnimPreloadTable) get_anim_preload() const; INLINE PT(AnimPreloadTable) modify_anim_preload(); INLINE void set_anim_preload(AnimPreloadTable *table); diff --git a/panda/src/chan/partBundleNode.h b/panda/src/chan/partBundleNode.h index 2ffea05c67..3ce5d2f7e8 100644 --- a/panda/src/chan/partBundleNode.h +++ b/panda/src/chan/partBundleNode.h @@ -31,7 +31,7 @@ // make it easy to store PartBundles in the scene graph. //////////////////////////////////////////////////////////////////// class EXPCL_PANDA_CHAN PartBundleNode : public PandaNode { -public: +PUBLISHED: INLINE PartBundleNode(const string &name, PartBundle *bundle); protected: diff --git a/panda/src/chan/partGroup.h b/panda/src/chan/partGroup.h index a8d3f3458c..96c54a5ddd 100644 --- a/panda/src/chan/partGroup.h +++ b/panda/src/chan/partGroup.h @@ -57,12 +57,12 @@ public: protected: // The default constructor is protected: don't try to create a // PartGroup without a parent. To create a PartGroup hierarchy, you - // must first create a PartBundle, and use that to create any + // must first create a PartBundle, and use that as the parent of any // subsequent children. INLINE PartGroup(const string &name = ""); INLINE PartGroup(const PartGroup ©); -public: +PUBLISHED: // This is the normal PartGroup constructor. PartGroup(PartGroup *parent, const string &name); virtual ~PartGroup(); @@ -70,7 +70,6 @@ public: virtual PartGroup *make_copy() const; PartGroup *copy_subgraph() const; -PUBLISHED: int get_num_children() const; PartGroup *get_child(int n) const; PartGroup *find_child(const string &name) const; diff --git a/panda/src/char/character.h b/panda/src/char/character.h index 9663b4a1d6..9e66b63927 100644 --- a/panda/src/char/character.h +++ b/panda/src/char/character.h @@ -42,10 +42,11 @@ class EXPCL_PANDA_CHAR Character : public PartBundleNode { protected: Character(const Character ©, bool copy_bundles); -public: +PUBLISHED: Character(const string &name); virtual ~Character(); +public: virtual PandaNode *make_copy() const; virtual PandaNode *dupe_for_flatten() const; @@ -163,8 +164,6 @@ public: private: static TypeHandle _type_handle; - - friend class CharacterMaker; }; #include "character.I" diff --git a/panda/src/char/characterJoint.h b/panda/src/char/characterJoint.h index 1e652418ff..cd241f876c 100644 --- a/panda/src/char/characterJoint.h +++ b/panda/src/char/characterJoint.h @@ -34,12 +34,13 @@ protected: CharacterJoint(); CharacterJoint(const CharacterJoint ©); -public: +PUBLISHED: CharacterJoint(Character *character, PartBundle *root, PartGroup *parent, const string &name, const LMatrix4f &initial_value); virtual ~CharacterJoint(); +public: virtual PartGroup *make_copy() const; virtual bool update_internals(PartBundle *root, PartGroup *parent, diff --git a/panda/src/char/characterJointBundle.cxx b/panda/src/char/characterJointBundle.cxx index 25c654e2cd..8732d5a2ac 100644 --- a/panda/src/char/characterJointBundle.cxx +++ b/panda/src/char/characterJointBundle.cxx @@ -23,7 +23,9 @@ TypeHandle CharacterJointBundle::_type_handle; //////////////////////////////////////////////////////////////////// // Function: CharacterJointBundle::Constructor // Access: Public -// Description: +// Description: Normally, there is no need to create a +// CharacterJointBundle directly. The Character node +// will automatically create one for itself. //////////////////////////////////////////////////////////////////// CharacterJointBundle:: CharacterJointBundle(const string &name) : PartBundle(name) { diff --git a/panda/src/char/characterJointBundle.h b/panda/src/char/characterJointBundle.h index 2fdff8dda9..245db13124 100644 --- a/panda/src/char/characterJointBundle.h +++ b/panda/src/char/characterJointBundle.h @@ -32,7 +32,7 @@ class EXPCL_PANDA_CHAR CharacterJointBundle : public PartBundle { protected: INLINE CharacterJointBundle(const CharacterJointBundle ©); -public: +PUBLISHED: CharacterJointBundle(const string &name = ""); virtual ~CharacterJointBundle(); diff --git a/panda/src/char/characterSlider.h b/panda/src/char/characterSlider.h index 556b28b271..c7e784789f 100644 --- a/panda/src/char/characterSlider.h +++ b/panda/src/char/characterSlider.h @@ -33,7 +33,7 @@ protected: CharacterSlider(); CharacterSlider(const CharacterSlider ©); -public: +PUBLISHED: CharacterSlider(PartGroup *parent, const string &name); virtual ~CharacterSlider(); diff --git a/panda/src/express/Sources.pp b/panda/src/express/Sources.pp index 2ce71f8507..949e22b011 100644 --- a/panda/src/express/Sources.pp +++ b/panda/src/express/Sources.pp @@ -43,7 +43,7 @@ pointerToVoid.I pointerToVoid.h \ profileTimer.I profileTimer.h \ pStatCollectorForwardBase.h \ - pta_uchar.h \ + pta_uchar.h pta_float.h \ ramfile.I ramfile.h \ referenceCount.I referenceCount.h \ stringDecoder.h stringDecoder.I \ @@ -54,7 +54,7 @@ trueClock.I trueClock.h \ typedReferenceCount.I typedReferenceCount.h typedef.h \ unicodeLatinMap.h \ - vector_uchar.h \ + vector_uchar.h vector_float.h \ virtualFileComposite.h virtualFileComposite.I virtualFile.h \ virtualFile.I virtualFileList.I virtualFileList.h virtualFileMount.h \ virtualFileMount.I virtualFileMountMultifile.h \ @@ -93,7 +93,7 @@ pointerToVoid.cxx \ profileTimer.cxx \ pStatCollectorForwardBase.cxx \ - pta_uchar.cxx \ + pta_uchar.cxx pta_float.cxx \ ramfile.cxx \ referenceCount.cxx \ stringDecoder.cxx \ @@ -104,7 +104,7 @@ trueClock.cxx \ typedReferenceCount.cxx \ unicodeLatinMap.cxx \ - vector_uchar.cxx \ + vector_uchar.cxx vector_float.cxx \ virtualFileComposite.cxx virtualFile.cxx virtualFileList.cxx \ virtualFileMount.cxx \ virtualFileMountMultifile.cxx virtualFileMountSystem.cxx \ @@ -151,7 +151,7 @@ pointerToVoid.I pointerToVoid.h \ profileTimer.I profileTimer.h \ pStatCollectorForwardBase.h \ - pta_uchar.h \ + pta_uchar.h pta_float.h \ ramfile.I ramfile.h \ referenceCount.I referenceCount.h \ stringDecoder.h stringDecoder.I \ @@ -162,7 +162,7 @@ trueClock.I trueClock.h \ typedReferenceCount.I typedReferenceCount.h typedef.h \ unicodeLatinMap.h \ - vector_uchar.h \ + vector_uchar.h vector_float.h \ virtualFileComposite.h virtualFileComposite.I virtualFile.h \ virtualFile.I virtualFileList.I virtualFileList.h virtualFileMount.h \ virtualFileMount.I virtualFileMountMultifile.h \ diff --git a/panda/src/express/config_express.N b/panda/src/express/config_express.N index de1457deca..507fce0ad0 100644 --- a/panda/src/express/config_express.N +++ b/panda/src/express/config_express.N @@ -45,6 +45,10 @@ forcetype iostream forcetype PointerToArray forcetype ConstPointerToArray - renametype PointerToArray PTAUchar renametype ConstPointerToArray CPTAUchar + +forcetype PointerToArray +forcetype ConstPointerToArray +renametype PointerToArray PTAFloat +renametype ConstPointerToArray CPTAFloat diff --git a/panda/src/express/express_composite2.cxx b/panda/src/express/express_composite2.cxx index e9a1fab8b8..5344b7b851 100644 --- a/panda/src/express/express_composite2.cxx +++ b/panda/src/express/express_composite2.cxx @@ -1,4 +1,5 @@ #include "pta_uchar.cxx" +#include "pta_float.cxx" #include "ramfile.cxx" #include "referenceCount.cxx" #include "stringDecoder.cxx" @@ -11,6 +12,7 @@ #include "typedReferenceCount.cxx" #include "unicodeLatinMap.cxx" #include "vector_uchar.cxx" +#include "vector_float.cxx" #include "virtualFile.cxx" #include "virtualFileComposite.cxx" #include "virtualFileList.cxx" diff --git a/panda/src/putil/pta_float.cxx b/panda/src/express/pta_float.cxx similarity index 100% rename from panda/src/putil/pta_float.cxx rename to panda/src/express/pta_float.cxx diff --git a/panda/src/putil/pta_float.h b/panda/src/express/pta_float.h similarity index 77% rename from panda/src/putil/pta_float.h rename to panda/src/express/pta_float.h index b43503d1c2..7dea9e9f69 100644 --- a/panda/src/putil/pta_float.h +++ b/panda/src/express/pta_float.h @@ -29,10 +29,10 @@ // rather than defining the pta again. //////////////////////////////////////////////////////////////////// -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, RefCountObj); -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, PointerToBase >); -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, PointerToArray) -EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, ConstPointerToArray) +EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEXPRESS, EXPTP_PANDAEXPRESS, RefCountObj); +EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEXPRESS, EXPTP_PANDAEXPRESS, PointerToBase >); +EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEXPRESS, EXPTP_PANDAEXPRESS, PointerToArray) +EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEXPRESS, EXPTP_PANDAEXPRESS, ConstPointerToArray) typedef PointerToArray PTA_float; typedef ConstPointerToArray CPTA_float; diff --git a/panda/src/putil/vector_float.cxx b/panda/src/express/vector_float.cxx similarity index 100% rename from panda/src/putil/vector_float.cxx rename to panda/src/express/vector_float.cxx diff --git a/panda/src/putil/vector_float.h b/panda/src/express/vector_float.h similarity index 95% rename from panda/src/putil/vector_float.h rename to panda/src/express/vector_float.h index 73552e4047..b88914eb5c 100644 --- a/panda/src/putil/vector_float.h +++ b/panda/src/express/vector_float.h @@ -28,8 +28,8 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// -#define EXPCL EXPCL_PANDA_PUTIL -#define EXPTP EXPTP_PANDA_PUTIL +#define EXPCL EXPCL_PANDAEXPRESS +#define EXPTP EXPTP_PANDAEXPRESS #define TYPE float #define NAME vector_float diff --git a/panda/src/putil/Sources.pp b/panda/src/putil/Sources.pp index cf805e1dd0..1528b73d6c 100644 --- a/panda/src/putil/Sources.pp +++ b/panda/src/putil/Sources.pp @@ -55,7 +55,7 @@ pbitops.I pbitops.h \ portalMask.h \ pta_double.h \ - pta_float.h pta_int.h \ + pta_int.h \ simpleHashMap.I simpleHashMap.h \ sparseArray.I sparseArray.h \ string_utils.I string_utils.N string_utils.h \ @@ -63,7 +63,7 @@ typedWritable.h typedWritableReferenceCount.I \ typedWritableReferenceCount.h updateSeq.I updateSeq.h \ uniqueIdAllocator.h \ - vector_double.h vector_float.h vector_typedWritable.h \ + vector_double.h vector_typedWritable.h \ vector_ushort.h vector_writable.h \ writableConfigurable.h \ writableParam.I writableParam.h @@ -100,7 +100,7 @@ nameUniquifier.cxx \ nodeCachedReferenceCount.cxx \ pbitops.cxx \ - pta_double.cxx pta_float.cxx \ + pta_double.cxx \ pta_int.cxx pta_ushort.cxx \ simpleHashMap.cxx \ sparseArray.cxx \ @@ -108,7 +108,7 @@ timedCycle.cxx typedWritable.cxx \ typedWritableReferenceCount.cxx updateSeq.cxx \ uniqueIdAllocator.cxx \ - vector_double.cxx vector_float.cxx \ + vector_double.cxx \ vector_typedWritable.cxx \ vector_ushort.cxx vector_writable.cxx \ writableConfigurable.cxx writableParam.cxx @@ -159,7 +159,7 @@ portalMask.h \ pbitops.I pbitops.h \ pta_double.h \ - pta_float.h pta_int.h pta_ushort.h \ + pta_int.h pta_ushort.h \ simpleHashMap.I simpleHashMap.h \ sparseArray.I sparseArray.h \ string_utils.I string_utils.h \ @@ -167,7 +167,7 @@ typedWritable.h typedWritableReferenceCount.I \ typedWritableReferenceCount.h updateSeq.I updateSeq.h \ uniqueIdAllocator.h \ - vector_double.h vector_float.h vector_typedWritable.h \ + vector_double.h vector_typedWritable.h \ vector_ushort.h vector_writable.h \ writableConfigurable.h writableParam.I \ writableParam.h diff --git a/panda/src/putil/putil_composite2.cxx b/panda/src/putil/putil_composite2.cxx index d0d864ecb8..9d5d779dd7 100644 --- a/panda/src/putil/putil_composite2.cxx +++ b/panda/src/putil/putil_composite2.cxx @@ -11,7 +11,6 @@ #include "nodeCachedReferenceCount.cxx" #include "pbitops.cxx" #include "pta_double.cxx" -#include "pta_float.cxx" #include "pta_int.cxx" #include "pta_ushort.cxx" #include "simpleHashMap.cxx" @@ -23,7 +22,6 @@ #include "updateSeq.cxx" #include "uniqueIdAllocator.cxx" #include "vector_double.cxx" -#include "vector_float.cxx" #include "vector_typedWritable.cxx" #include "vector_ushort.cxx" #include "vector_writable.cxx"