forked from beltoforion/Galaxy-Renderer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTypes.cpp
52 lines (43 loc) · 1.34 KB
/
Types.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include "Types.h"
//--- Standard includes ------------------------------------------------------------------
#include <cassert>
#include <cstdlib>
//----------------------------------------------------------------------------------------
ParticleData::ParticleData()
:m_pState(NULL)
,m_pAuxState(NULL)
{}
//----------------------------------------------------------------------------------------
ParticleData::ParticleData(PODState *pState, PODAuxState *pAuxState)
:m_pState(pState)
,m_pAuxState(pAuxState)
{
assert(m_pState);
assert(m_pAuxState);
}
//----------------------------------------------------------------------------------------
ParticleData::ParticleData(const ParticleData &ref)
:m_pState(ref.m_pState)
,m_pAuxState(ref.m_pAuxState)
{}
//----------------------------------------------------------------------------------------
ParticleData& ParticleData::operator=(const ParticleData &ref)
{
if (this!=&ref)
{
m_pState = ref.m_pState;
m_pAuxState = ref.m_pAuxState;
}
return *this;
}
//----------------------------------------------------------------------------------------
void ParticleData::Reset()
{
m_pState = NULL;
m_pAuxState = NULL;
}
//----------------------------------------------------------------------------------------
bool ParticleData::IsNull() const
{
return m_pState && m_pAuxState;
}