PeriDyno
1.0.0
Loading...
Searching...
No Matches
D:
Peridyno
peridyno
src
Core
STL
STLBuffer.h
Go to the documentation of this file.
1
#ifndef STLBUFFER_H
2
#define STLBUFFER_H
3
4
#include "Platform.h"
5
6
namespace
dyno
7
{
13
template
<
typename
T>
14
class
STLBuffer
15
{
16
public
:
17
using
iterator
=
T
* ;
18
19
DYN_FUNC
STLBuffer
() {};
20
21
DYN_FUNC
void
reserve
(
T
* beg,
uint
buffer_size) {
22
m_startLoc
= beg;
23
m_maxSize
= buffer_size;
24
}
25
26
DYN_FUNC
uint
max_size
() {
return
m_maxSize
; }
27
28
// DYN_FUNC inline T& operator[] (unsigned int) { return m_startLoc[i]; }
29
// DYN_FUNC inline const T& operator[] (unsigned int) const { return m_startLoc[i]; }
30
31
protected
:
32
DYN_FUNC
inline
T
*
bufferEnd
() {
33
return
m_startLoc
+
m_maxSize
;
34
}
35
36
uint
m_maxSize
= 0;
37
38
T
*
m_startLoc
=
nullptr
;
39
};
40
}
41
42
#endif
// STLBUFFER_H
dyno::STLBuffer::reserve
DYN_FUNC void reserve(T *beg, uint buffer_size)
Definition
STLBuffer.h:21
dyno::STLBuffer::bufferEnd
DYN_FUNC T * bufferEnd()
Definition
STLBuffer.h:32
dyno::STLBuffer::STLBuffer
DYN_FUNC STLBuffer()
Definition
STLBuffer.h:19
dyno::STLBuffer::iterator
T * iterator
Definition
STLBuffer.h:17
dyno::STLBuffer::m_maxSize
uint m_maxSize
Definition
STLBuffer.h:36
dyno::STLBuffer::max_size
DYN_FUNC uint max_size()
Definition
STLBuffer.h:26
dyno::STLBuffer::m_startLoc
T * m_startLoc
Definition
STLBuffer.h:38
T
#define T(t)
dyno
This is an implementation of AdditiveCCD based on peridyno.
Definition
Array.h:25
dyno::uint
unsigned int uint
Definition
VkProgram.h:14
Generated by
1.13.2