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
29
29
};
30
30
}
31
31
32
+ void Polyline2DataHolder::reset ()
33
+ {
34
+ nodes_.resize ( 0 );
35
+ points_.resize ( 0 );
36
+ orgs_.resize ( 0 );
37
+ }
38
+
32
39
size_t Polyline2DataHolder::heapBytes ( const Polyline2& polyline )
33
40
{
34
41
return sizeof ( Node2 ) * polyline.getAABBTree ().nodes ().size ()
@@ -58,6 +65,13 @@ Polyline3Data Polyline3DataHolder::data() const
58
65
};
59
66
}
60
67
68
+ void Polyline3DataHolder::reset ()
69
+ {
70
+ nodes_.resize ( 0 );
71
+ points_.resize ( 0 );
72
+ orgs_.resize ( 0 );
73
+ }
74
+
61
75
size_t Polyline3DataHolder::heapBytes ( const Polyline3& polyline )
62
76
{
63
77
return sizeof ( Node3 ) * polyline.getAABBTree ().nodes ().size ()
Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ class Polyline2DataHolder
24
24
MRCUDA_API Polyline2Data data () const ;
25
25
operator Polyline2Data () const { return data (); }
26
26
27
+ // / Resets data buffers.
28
+ MRCUDA_API void reset ();
29
+
27
30
// / Computes the GPU memory amount required to allocate data for the polyline.
28
31
MRCUDA_API static size_t heapBytes ( const Polyline2& polyline );
29
32
@@ -45,6 +48,9 @@ class Polyline3DataHolder
45
48
MRCUDA_API Polyline3Data data () const ;
46
49
operator Polyline3Data () const { return data (); }
47
50
51
+ // / Resets data buffers.
52
+ MRCUDA_API void reset ();
53
+
48
54
// / Computes the GPU memory amount required to allocate data for the polyline.
49
55
MRCUDA_API static size_t heapBytes ( const Polyline3& polyline );
50
56
You can’t perform that action at this time.
0 commit comments