commit | author | age
|
4244cc
|
1 |
// G4Hub.cpp: implementation of the CG4Hub class.
|
JS |
2 |
//
|
|
3 |
//////////////////////////////////////////////////////////////////////
|
|
4 |
|
|
5 |
|
|
6 |
#include "G4Hub.h"
|
|
7 |
#include <string.h>
|
|
8 |
|
|
9 |
//////////////////////////////////////////////////////////////////////
|
|
10 |
// Construction/Destruction
|
|
11 |
//////////////////////////////////////////////////////////////////////
|
|
12 |
CG4Hub::CG4Hub()
|
|
13 |
{
|
|
14 |
memset(m_col,0,sizeof(float)*3); // black
|
|
15 |
for (int i=0;i<3;i++)
|
|
16 |
m_senActive[i]=false;
|
|
17 |
}
|
|
18 |
|
|
19 |
CG4Hub::~CG4Hub()
|
|
20 |
{
|
|
21 |
}
|
|
22 |
|
|
23 |
void CG4Hub::SetPnoData(float *pno,int sens)
|
|
24 |
{
|
|
25 |
// float scale=2.0f;
|
|
26 |
// float scale=0.01;
|
|
27 |
float scale=1.0f;
|
|
28 |
memcpy(m_pno[sens],pno,sizeof(float)*6);
|
|
29 |
for (int i=0;i<3;i++)
|
|
30 |
m_pno[sens][i]*=scale;
|
|
31 |
m_senActive[sens]=true;
|
|
32 |
}
|
|
33 |
|
|
34 |
int CG4Hub::GetId()
|
|
35 |
{
|
|
36 |
return m_id;
|
|
37 |
}
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
void CG4Hub::SetId(int id)
|
|
42 |
{
|
|
43 |
m_id=id;
|
|
44 |
}
|
|
45 |
//#include <stdio.h>
|
|
46 |
float (*CG4Hub::GetPnoData())[6]
|
|
47 |
{
|
|
48 |
return m_pno;
|
|
49 |
}
|