diff --git a/contrib/src/rplight/shadowSource.h b/contrib/src/rplight/shadowSource.h index 84b00a197b..3f3d15fe15 100644 --- a/contrib/src/rplight/shadowSource.h +++ b/contrib/src/rplight/shadowSource.h @@ -30,6 +30,7 @@ #include "pandabase.h" #include "luse.h" +#include "memoryBase.h" #include "transformState.h" #include "look_at.h" #include "compose_matrix.h" @@ -48,7 +49,7 @@ * and a view-projection matrix. The shadow manager regenerates the shadow maps * using the data from the shadow sources. */ -class ShadowSource { +class ShadowSource : public MemoryBase { public: ShadowSource(); @@ -78,14 +79,13 @@ public: inline const BoundingSphere& get_bounds() const; private: - int _slot; - bool _needs_update; - size_t _resolution; LMatrix4 _mvp; LVecBase4i _region; LVecBase4 _region_uv; - BoundingSphere _bounds; + int _slot; + bool _needs_update; + size_t _resolution; }; #include "shadowSource.I" diff --git a/direct/src/motiontrail/cMotionTrail.h b/direct/src/motiontrail/cMotionTrail.h index fdb5ba1f56..bb42001ffc 100644 --- a/direct/src/motiontrail/cMotionTrail.h +++ b/direct/src/motiontrail/cMotionTrail.h @@ -21,11 +21,12 @@ #include "geomVertexWriter.h" #include "geomTriangles.h" #include "luse.h" +#include "memoryBase.h" #include "nurbsCurveEvaluator.h" #include "plist.h" #include "epvector.h" -class CMotionTrailVertex { +class CMotionTrailVertex : public MemoryBase { public: LPoint4 _vertex; LVecBase4 _start_color; diff --git a/dtool/src/prc/configFlags.h b/dtool/src/prc/configFlags.h index f4b95757d6..c034760667 100644 --- a/dtool/src/prc/configFlags.h +++ b/dtool/src/prc/configFlags.h @@ -17,6 +17,7 @@ #include "dtoolbase.h" #include "numeric_types.h" #include "atomicAdjust.h" +#include "memoryBase.h" /** * This class is the base class of both ConfigVariable and ConfigVariableCore. diff --git a/dtool/src/prc/configVariableBase.h b/dtool/src/prc/configVariableBase.h index ac256f1e8d..56ff035e5c 100644 --- a/dtool/src/prc/configVariableBase.h +++ b/dtool/src/prc/configVariableBase.h @@ -21,6 +21,7 @@ #include "configVariableManager.h" #include "vector_string.h" #include "pset.h" +#include "memoryBase.h" // Use this macro to wrap around a description passed to a ConfigVariable // constructor. This allows the description to be completely compiled out, so @@ -42,7 +43,7 @@ * and/or ConfigDeclaration, more or less duplicating the interface presented * there. */ -class EXPCL_DTOOL_PRC ConfigVariableBase : public ConfigFlags { +class EXPCL_DTOOL_PRC ConfigVariableBase : public ConfigFlags, public MemoryBase { protected: INLINE ConfigVariableBase(const std::string &name, ValueType type); ConfigVariableBase(const std::string &name, ValueType type, diff --git a/dtool/src/prc/configVariableCore.h b/dtool/src/prc/configVariableCore.h index 8849cc401b..d9dcb7658d 100644 --- a/dtool/src/prc/configVariableCore.h +++ b/dtool/src/prc/configVariableCore.h @@ -18,6 +18,7 @@ #include "configFlags.h" #include "configPageManager.h" #include "pnotify.h" +#include "memoryBase.h" #include @@ -31,7 +32,7 @@ class ConfigDeclaration; * make() method, which may return a shared instance. Once created, these * objects are never destructed. */ -class EXPCL_DTOOL_PRC ConfigVariableCore : public ConfigFlags { +class EXPCL_DTOOL_PRC ConfigVariableCore : public ConfigFlags, public MemoryBase { private: ConfigVariableCore(const std::string &name); ConfigVariableCore(const ConfigVariableCore &templ, const std::string &name); diff --git a/panda/src/bullet/bulletAllHitsRayResult.h b/panda/src/bullet/bulletAllHitsRayResult.h index 0153e424a8..88ebdfcdc0 100644 --- a/panda/src/bullet/bulletAllHitsRayResult.h +++ b/panda/src/bullet/bulletAllHitsRayResult.h @@ -20,13 +20,14 @@ #include "bullet_utils.h" #include "luse.h" +#include "memoryBase.h" #include "pandaNode.h" #include "collideMask.h" /** * */ -struct EXPCL_PANDABULLET BulletRayHit { +struct EXPCL_PANDABULLET BulletRayHit : public MemoryBase { PUBLISHED: INLINE static BulletRayHit empty(); @@ -61,7 +62,7 @@ private: /** * */ -struct EXPCL_PANDABULLET BulletAllHitsRayResult : public btCollisionWorld::AllHitsRayResultCallback { +struct EXPCL_PANDABULLET BulletAllHitsRayResult : public btCollisionWorld::AllHitsRayResultCallback, public MemoryBase { PUBLISHED: INLINE static BulletAllHitsRayResult empty(); diff --git a/panda/src/bullet/bulletClosestHitRayResult.h b/panda/src/bullet/bulletClosestHitRayResult.h index fd351d3aac..8cd043a22e 100644 --- a/panda/src/bullet/bulletClosestHitRayResult.h +++ b/panda/src/bullet/bulletClosestHitRayResult.h @@ -20,13 +20,14 @@ #include "bullet_utils.h" #include "luse.h" +#include "memoryBase.h" #include "pandaNode.h" #include "collideMask.h" /** * */ -struct EXPCL_PANDABULLET BulletClosestHitRayResult : public btCollisionWorld::ClosestRayResultCallback { +struct EXPCL_PANDABULLET BulletClosestHitRayResult : public btCollisionWorld::ClosestRayResultCallback, public MemoryBase { PUBLISHED: INLINE static BulletClosestHitRayResult empty(); diff --git a/panda/src/bullet/bulletClosestHitSweepResult.h b/panda/src/bullet/bulletClosestHitSweepResult.h index 2581cd34ff..4cdb09da20 100644 --- a/panda/src/bullet/bulletClosestHitSweepResult.h +++ b/panda/src/bullet/bulletClosestHitSweepResult.h @@ -20,13 +20,14 @@ #include "bullet_utils.h" #include "luse.h" +#include "memoryBase.h" #include "pandaNode.h" #include "collideMask.h" /** * */ -struct EXPCL_PANDABULLET BulletClosestHitSweepResult : public btCollisionWorld::ClosestConvexResultCallback { +struct EXPCL_PANDABULLET BulletClosestHitSweepResult : public btCollisionWorld::ClosestConvexResultCallback, public MemoryBase { PUBLISHED: INLINE static BulletClosestHitSweepResult empty(); diff --git a/panda/src/device/inputDeviceManager.h b/panda/src/device/inputDeviceManager.h index 66381c79e0..f82167c7bb 100644 --- a/panda/src/device/inputDeviceManager.h +++ b/panda/src/device/inputDeviceManager.h @@ -30,7 +30,7 @@ class WinRawInputDevice; * * @since 1.10.0 */ -class EXPCL_PANDA_DEVICE InputDeviceManager { +class EXPCL_PANDA_DEVICE InputDeviceManager : public MemoryBase { protected: InputDeviceManager(); ~InputDeviceManager() = default; diff --git a/panda/src/device/trackerData.h b/panda/src/device/trackerData.h index 7fdd756bb6..aba9fb6420 100644 --- a/panda/src/device/trackerData.h +++ b/panda/src/device/trackerData.h @@ -20,7 +20,7 @@ /** * Stores the kinds of data that a tracker might output. */ -class EXPCL_PANDA_DEVICE TrackerData { +class EXPCL_PANDA_DEVICE TrackerData : public MemoryBase { public: INLINE TrackerData(); INLINE TrackerData(const TrackerData ©); diff --git a/panda/src/egg/eggTransform.h b/panda/src/egg/eggTransform.h index 671a3b1155..529b84d174 100644 --- a/panda/src/egg/eggTransform.h +++ b/panda/src/egg/eggTransform.h @@ -16,6 +16,7 @@ #include "pandabase.h" #include "luse.h" +#include "memoryBase.h" #include "eggObject.h" /** @@ -26,7 +27,7 @@ * This may be either a 3-d transform, and therefore described by a 4x4 * matrix, or a 2-d transform, described by a 3x3 matrix. */ -class EXPCL_PANDA_EGG EggTransform { +class EXPCL_PANDA_EGG EggTransform : public MemoryBase { PUBLISHED: EggTransform(); EggTransform(const EggTransform ©); diff --git a/panda/src/gobj/samplerState.h b/panda/src/gobj/samplerState.h index bef695cd83..c161d48206 100644 --- a/panda/src/gobj/samplerState.h +++ b/panda/src/gobj/samplerState.h @@ -17,8 +17,8 @@ #include "pandabase.h" #include "typedObject.h" -#include "namable.h" #include "luse.h" +#include "memoryBase.h" #include "numeric_types.h" #include "bamReader.h" #include "config_gobj.h" @@ -33,7 +33,7 @@ class SamplerContext; * can be used to sample the same texture using different settings in * different places. */ -class EXPCL_PANDA_GOBJ SamplerState { +class EXPCL_PANDA_GOBJ SamplerState : public MemoryBase { PUBLISHED: enum FilterType { // Mag Filter and Min Filter diff --git a/panda/src/grutil/shaderTerrainMesh.h b/panda/src/grutil/shaderTerrainMesh.h index a0b8541e85..a0e0180bdd 100644 --- a/panda/src/grutil/shaderTerrainMesh.h +++ b/panda/src/grutil/shaderTerrainMesh.h @@ -102,7 +102,7 @@ private: Thread *current_thread) const; // Chunk data - struct Chunk { + struct Chunk : public MemoryBase { // Depth, starting at 0 size_t depth; @@ -115,12 +115,12 @@ private: // Children, in the order (0, 0) (1, 0) (0, 1) (1, 1) Chunk* children[4]; - // Chunk heights, used for culling - PN_stdfloat avg_height, min_height, max_height; - // Edge heights, used for lod computation, in the same order as the children LVector4 edges; + // Chunk heights, used for culling + PN_stdfloat avg_height, min_height, max_height; + // Last CLOD factor, stored while computing LOD, used for seamless transitions between lods PN_stdfloat last_clod; diff --git a/panda/src/linmath/lmatrix4_src.h b/panda/src/linmath/lmatrix4_src.h index e3cec2090f..5400f0872b 100644 --- a/panda/src/linmath/lmatrix4_src.h +++ b/panda/src/linmath/lmatrix4_src.h @@ -16,7 +16,7 @@ class FLOATNAME(UnalignedLMatrix4); /** * This is a 4-by-4 transform matrix. */ -class EXPCL_PANDA_LINMATH ALIGN_LINMATH FLOATNAME(LMatrix4) { +class EXPCL_PANDA_LINMATH ALIGN_LINMATH FLOATNAME(LMatrix4) : public MemoryBase { public: typedef FLOATTYPE numeric_type; typedef const FLOATTYPE *iterator; diff --git a/panda/src/linmath/lvecBase4_src.h b/panda/src/linmath/lvecBase4_src.h index 129b427c2d..8e9fe9a81d 100644 --- a/panda/src/linmath/lvecBase4_src.h +++ b/panda/src/linmath/lvecBase4_src.h @@ -20,7 +20,7 @@ class FLOATNAME(UnalignedLVecBase4); /** * This is the base class for all three-component vectors and points. */ -class EXPCL_PANDA_LINMATH ALIGN_LINMATH FLOATNAME(LVecBase4) { +class EXPCL_PANDA_LINMATH ALIGN_LINMATH FLOATNAME(LVecBase4) : public MemoryBase { PUBLISHED: typedef FLOATTYPE numeric_type; typedef const FLOATTYPE *iterator; diff --git a/panda/src/mathutil/perlinNoise.h b/panda/src/mathutil/perlinNoise.h index a109c43d56..aafd9c2712 100644 --- a/panda/src/mathutil/perlinNoise.h +++ b/panda/src/mathutil/perlinNoise.h @@ -18,6 +18,7 @@ #include "pvector.h" #include "vector_int.h" #include "luse.h" +#include "memoryBase.h" #include "randomizer.h" /** @@ -25,7 +26,7 @@ * dimensions of Perlin noise implementation. The base class just collects * the common functionality. */ -class EXPCL_PANDA_MATHUTIL PerlinNoise { +class EXPCL_PANDA_MATHUTIL PerlinNoise : public MemoryBase { protected: PerlinNoise(int table_size, unsigned long seed); PerlinNoise(const PerlinNoise ©); diff --git a/panda/src/mathutil/triangulator.h b/panda/src/mathutil/triangulator.h index 0514917cfd..f0c7ca4c75 100644 --- a/panda/src/mathutil/triangulator.h +++ b/panda/src/mathutil/triangulator.h @@ -16,6 +16,7 @@ #include "pandabase.h" #include "luse.h" +#include "memoryBase.h" #include "vector_int.h" /** @@ -29,7 +30,7 @@ * * It works strictly on 2-d points. See Triangulator3 for 3-d points. */ -class EXPCL_PANDA_MATHUTIL Triangulator { +class EXPCL_PANDA_MATHUTIL Triangulator : public MemoryBase { PUBLISHED: Triangulator(); diff --git a/panda/src/pgraph/shaderInput.h b/panda/src/pgraph/shaderInput.h index dbbf617ff0..2901ccb60d 100644 --- a/panda/src/pgraph/shaderInput.h +++ b/panda/src/pgraph/shaderInput.h @@ -37,7 +37,7 @@ * This is a small container class that can hold any one of the value types * that can be passed as input to a shader. */ -class EXPCL_PANDA_PGRAPH ShaderInput { +class EXPCL_PANDA_PGRAPH ShaderInput : public MemoryBase { PUBLISHED: // Used when binding texture images. enum AccessFlags { diff --git a/panda/src/pnmimage/pnmImageHeader.h b/panda/src/pnmimage/pnmImageHeader.h index 7030e06d2e..6e21ddca98 100644 --- a/panda/src/pnmimage/pnmImageHeader.h +++ b/panda/src/pnmimage/pnmImageHeader.h @@ -20,6 +20,7 @@ #include "typedObject.h" #include "filename.h" +#include "memoryBase.h" #include "pnotify.h" #include "pmap.h" #include "pvector.h" @@ -37,7 +38,7 @@ class PNMWriter; * image except the image data itself. It's the sort of information you * typically read from the image file's header. */ -class EXPCL_PANDA_PNMIMAGE PNMImageHeader { +class EXPCL_PANDA_PNMIMAGE PNMImageHeader : public MemoryBase { PUBLISHED: INLINE PNMImageHeader(); INLINE PNMImageHeader(const PNMImageHeader ©); diff --git a/panda/src/text/textGraphic.h b/panda/src/text/textGraphic.h index d8a3e1a476..9d6115ef5e 100644 --- a/panda/src/text/textGraphic.h +++ b/panda/src/text/textGraphic.h @@ -17,6 +17,7 @@ #include "pandabase.h" #include "config_text.h" +#include "memoryBase.h" #include "nodePath.h" /** @@ -34,7 +35,7 @@ * within this rectangle, but if it does not, it may visually overlap with * nearby text. */ -class EXPCL_PANDA_TEXT TextGraphic { +class EXPCL_PANDA_TEXT TextGraphic : public MemoryBase { PUBLISHED: INLINE TextGraphic(); INLINE explicit TextGraphic(const NodePath &model, const LVecBase4 &frame); diff --git a/panda/src/text/textProperties.h b/panda/src/text/textProperties.h index aca592e30b..cc6c0b4992 100644 --- a/panda/src/text/textProperties.h +++ b/panda/src/text/textProperties.h @@ -18,6 +18,7 @@ #include "config_text.h" #include "luse.h" +#include "memoryBase.h" #include "textFont.h" #include "pointerTo.h" #include "renderState.h" @@ -38,7 +39,7 @@ * the string; each nested TextProperties structure modifies the appearance of * subsequent text within the block. */ -class EXPCL_PANDA_TEXT TextProperties { +class EXPCL_PANDA_TEXT TextProperties : public MemoryBase { PUBLISHED: enum Alignment { A_left,