aboutsummaryrefslogtreecommitdiff
path: root/fly-tools/FrameInfo.cpp
blob: d00e4cd644df9af0e5634e0e45fe5635b8ea33cb (plain)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
 *  FrameInfo.cpp
 *  
 *
 *  Created by Md. Alimoor Reza on 6/26/10.
 *  Copyright 2010 Drexel University. All rights reserved.
 *
 */

#include "FrameInfo.h"

FrameInfo::FrameInfo(int frameNo, vector<FlyObject > fOVector, bool isSingleBlob) {
	this->frameNo = frameNo;
	this->fOVector = fOVector;
	this->isSingleBlob = isSingleBlob;

}
FrameInfo::FrameInfo(const FrameInfo &f) {
	this->frameNo = f.getFrameNo();
	this->fOVector = f.getFOVector();
	this->isSingleBlob = f.getIsSingleBlob();
	
}
int FrameInfo::getFrameNo() const {
	return frameNo;
}
bool FrameInfo::getIsSingleBlob() const {
	return isSingleBlob;
}
vector<FlyObject > FrameInfo::getFOVector() const{
	return fOVector;
}

void FrameInfo::setFrameNo(int fn) {
	this->frameNo = fn;
}
void FrameInfo::setIsSingleBlob(bool isSingleBlob)  {
	this->isSingleBlob = isSingleBlob;
}
void FrameInfo::setFOVector(vector<FlyObject > fov)  {
	this->fOVector = fov;

//	cout << "setting fov \n";
//	FlyObject a = fOVector[0];
//	pair<double,double> av = a.getVelocityV();
//	cout << "velocity "<<av.first<<","<<av.second<<endl;
//
//	FlyObject b = fOVector[1];
//	pair<double,double> bv = b.getVelocityV();
//	cout << "velocity "<<bv.first<<","<<bv.second<<endl;
	
	
	
}
void FrameInfo ::swapTheFlyObject() {
	if (fOVector.size() > 1) {
		cout << "swapping\n";
		FlyObject a = fOVector[0];
		fOVector[0] = fOVector[1];
		fOVector[1] = a;
	}
}
void FrameInfo::output(ostream &out) {
	out<<"FrameNo			: "<<frameNo<<endl;
	out<<"IsSingleBlob		: "<<isSingleBlob<<endl;
//	out<<"fOVector size "<<fOVector.size()<<endl;
	for (int i=0; i<fOVector.size(); i++) {
		FlyObject a = fOVector[i];
//		out<<"FlyObject "<<i<<endl;
		a.output(out);
	}
}