diff --git a/panda/src/gobj/geomVertexArrayData.I b/panda/src/gobj/geomVertexArrayData.I index 65c38b4de8..df8c35acf4 100644 --- a/panda/src/gobj/geomVertexArrayData.I +++ b/panda/src/gobj/geomVertexArrayData.I @@ -365,26 +365,6 @@ get_current_thread() const { return _current_thread; } -//////////////////////////////////////////////////////////////////// -// Function: GeomVertexArrayDataHandle::get_object -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -INLINE const GeomVertexArrayData *GeomVertexArrayDataHandle:: -get_object() const { - return _object; -} - -//////////////////////////////////////////////////////////////////// -// Function: GeomVertexArrayDataHandle::get_object -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -INLINE GeomVertexArrayData *GeomVertexArrayDataHandle:: -get_object() { - return _object; -} - //////////////////////////////////////////////////////////////////// // Function: GeomVertexArrayDataHandle::get_read_pointer // Access: Public @@ -403,9 +383,29 @@ get_read_pointer(bool force) const { return _cdata->_buffer.get_read_pointer(force); } +//////////////////////////////////////////////////////////////////// +// Function: GeomVertexArrayDataHandle::get_object +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE const GeomVertexArrayData *GeomVertexArrayDataHandle:: +get_object() const { + return _object; +} + +//////////////////////////////////////////////////////////////////// +// Function: GeomVertexArrayDataHandle::get_object +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE GeomVertexArrayData *GeomVertexArrayDataHandle:: +get_object() { + return _object; +} + //////////////////////////////////////////////////////////////////// // Function: GeomVertexArrayDataHandle::get_array_format -// Access: Public +// Access: Published // Description: //////////////////////////////////////////////////////////////////// INLINE const GeomVertexArrayFormat *GeomVertexArrayDataHandle:: @@ -415,7 +415,7 @@ get_array_format() const { //////////////////////////////////////////////////////////////////// // Function: GeomVertexArrayDataHandle::get_usage_hint -// Access: Public +// Access: Published // Description: //////////////////////////////////////////////////////////////////// INLINE GeomVertexArrayDataHandle::UsageHint GeomVertexArrayDataHandle:: diff --git a/panda/src/gobj/geomVertexArrayData.h b/panda/src/gobj/geomVertexArrayData.h index d03f50b3fe..04a4a68809 100644 --- a/panda/src/gobj/geomVertexArrayData.h +++ b/panda/src/gobj/geomVertexArrayData.h @@ -257,13 +257,14 @@ public: ALLOC_DELETED_CHAIN_DECL(GeomVertexArrayDataHandle); INLINE Thread *get_current_thread() const; - INLINE const GeomVertexArrayData *get_object() const; - INLINE GeomVertexArrayData *get_object(); INLINE const unsigned char *get_read_pointer(bool force) const; unsigned char *get_write_pointer(); PUBLISHED: + INLINE const GeomVertexArrayData *get_object() const; + INLINE GeomVertexArrayData *get_object(); + INLINE const GeomVertexArrayFormat *get_array_format() const; INLINE UsageHint get_usage_hint() const; diff --git a/panda/src/gobj/geomVertexReader.I b/panda/src/gobj/geomVertexReader.I index 3502d05c0d..7c7f8acd48 100644 --- a/panda/src/gobj/geomVertexReader.I +++ b/panda/src/gobj/geomVertexReader.I @@ -295,6 +295,16 @@ set_column(const InternalName *name) { return false; } +//////////////////////////////////////////////////////////////////// +// Function: GeomVertexReader::clear +// Access: Published +// Description: Resets the GeomVertexReader to the initial state. +//////////////////////////////////////////////////////////////////// +INLINE void GeomVertexReader:: +clear() { + (*this) = GeomVertexReader(_current_thread); +} + //////////////////////////////////////////////////////////////////// // Function: GeomVertexReader::has_column // Access: Published diff --git a/panda/src/gobj/geomVertexReader.h b/panda/src/gobj/geomVertexReader.h index d81d84cc1c..9c0b75035e 100644 --- a/panda/src/gobj/geomVertexReader.h +++ b/panda/src/gobj/geomVertexReader.h @@ -92,6 +92,7 @@ PUBLISHED: INLINE bool set_column(const InternalName *name); bool set_column(int array, const GeomVertexColumn *column); + INLINE void clear(); INLINE bool has_column() const; INLINE int get_array() const; INLINE const GeomVertexColumn *get_column() const; diff --git a/panda/src/gobj/geomVertexRewriter.I b/panda/src/gobj/geomVertexRewriter.I index e01df998f6..0deeac3eb5 100644 --- a/panda/src/gobj/geomVertexRewriter.I +++ b/panda/src/gobj/geomVertexRewriter.I @@ -248,6 +248,17 @@ set_column(int array, const GeomVertexColumn *column) { return GeomVertexReader::set_column(array, column); } +//////////////////////////////////////////////////////////////////// +// Function: GeomVertexRewriter::clear +// Access: Published +// Description: Resets the GeomVertexRewriter to the initial state. +//////////////////////////////////////////////////////////////////// +INLINE void GeomVertexRewriter:: +clear() { + GeomVertexWriter::clear(); + GeomVertexReader::clear(); +} + //////////////////////////////////////////////////////////////////// // Function: GeomVertexRewriter::has_column // Access: Published diff --git a/panda/src/gobj/geomVertexRewriter.h b/panda/src/gobj/geomVertexRewriter.h index 5dcc4dda17..517b66e202 100644 --- a/panda/src/gobj/geomVertexRewriter.h +++ b/panda/src/gobj/geomVertexRewriter.h @@ -63,6 +63,7 @@ PUBLISHED: INLINE bool set_column(const InternalName *name); INLINE bool set_column(int array, const GeomVertexColumn *column); + INLINE void clear(); INLINE bool has_column() const; INLINE int get_array() const; INLINE const GeomVertexColumn *get_column() const; diff --git a/panda/src/gobj/geomVertexWriter.I b/panda/src/gobj/geomVertexWriter.I index 40527575d8..2dd402c754 100644 --- a/panda/src/gobj/geomVertexWriter.I +++ b/panda/src/gobj/geomVertexWriter.I @@ -292,6 +292,16 @@ set_column(const InternalName *name) { return false; } +//////////////////////////////////////////////////////////////////// +// Function: GeomVertexWriter::clear +// Access: Published +// Description: Resets the GeomVertexWriter to the initial state. +//////////////////////////////////////////////////////////////////// +INLINE void GeomVertexWriter:: +clear() { + (*this) = GeomVertexWriter(_current_thread); +} + //////////////////////////////////////////////////////////////////// // Function: GeomVertexWriter::has_column // Access: Published diff --git a/panda/src/gobj/geomVertexWriter.h b/panda/src/gobj/geomVertexWriter.h index c2fa29af1d..2fac5391dc 100644 --- a/panda/src/gobj/geomVertexWriter.h +++ b/panda/src/gobj/geomVertexWriter.h @@ -104,6 +104,7 @@ PUBLISHED: INLINE bool set_column(const string &name); INLINE bool set_column(const InternalName *name); bool set_column(int array, const GeomVertexColumn *column); + INLINE void clear(); INLINE bool has_column() const; INLINE int get_array() const;