Janis Streib
01.02.22 d05d799d9774291f7bc15de4819510b457b20ffd
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
d05d79 39 bool CG4Hub::IsSenActive(int i)
JS 40 {
41     return m_senActive[i];
42 }
4244cc 43
JS 44
45 void CG4Hub::SetId(int id)
46 {
47     m_id=id;
48 }
49 //#include <stdio.h>
50 float (*CG4Hub::GetPnoData())[6]
51 {
52     return m_pno;
53 }