File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,13 @@ Polyline2Data Polyline2DataHolder::data() const
2929 };
3030}
3131
32+ void Polyline2DataHolder::reset ()
33+ {
34+ nodes_.resize ( 0 );
35+ points_.resize ( 0 );
36+ orgs_.resize ( 0 );
37+ }
38+
3239size_t Polyline2DataHolder::heapBytes ( const Polyline2& polyline )
3340{
3441 return sizeof ( Node2 ) * polyline.getAABBTree ().nodes ().size ()
@@ -58,6 +65,13 @@ Polyline3Data Polyline3DataHolder::data() const
5865 };
5966}
6067
68+ void Polyline3DataHolder::reset ()
69+ {
70+ nodes_.resize ( 0 );
71+ points_.resize ( 0 );
72+ orgs_.resize ( 0 );
73+ }
74+
6175size_t Polyline3DataHolder::heapBytes ( const Polyline3& polyline )
6276{
6377 return sizeof ( Node3 ) * polyline.getAABBTree ().nodes ().size ()
Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ class Polyline2DataHolder
2424 MRCUDA_API Polyline2Data data () const ;
2525 operator Polyline2Data () const { return data (); }
2626
27+ // / Resets data buffers.
28+ MRCUDA_API void reset ();
29+
2730 // / Computes the GPU memory amount required to allocate data for the polyline.
2831 MRCUDA_API static size_t heapBytes ( const Polyline2& polyline );
2932
@@ -45,6 +48,9 @@ class Polyline3DataHolder
4548 MRCUDA_API Polyline3Data data () const ;
4649 operator Polyline3Data () const { return data (); }
4750
51+ // / Resets data buffers.
52+ MRCUDA_API void reset ();
53+
4854 // / Computes the GPU memory amount required to allocate data for the polyline.
4955 MRCUDA_API static size_t heapBytes ( const Polyline3& polyline );
5056
You can’t perform that action at this time.
0 commit comments