40 double oldLine = m_cam->
Line();
41 double oldSample = m_cam->Sample();
42 int oldBand = m_cam->Band();
43 double newLine = imagePoint.line + 0.5;
44 double newSample = imagePoint.sample + 0.5;
45 int newBand = imagePoint.band + 1;
47 bool imagePtChanged = oldLine != newLine ||
48 oldSample != newSample ||
49 (!m_cam->IsBandIndependent() && oldBand != newBand);
51 m_cam->SetBand(newBand);
52 m_cam->SetImage(newSample, newLine);
55 vector<double> lookBF = m_cam->lookDirectionBodyFixed();
56 SensorUtilities::Vec lookVec = {lookBF[0], lookBF[1], lookBF[2]};
58 vector<double> lookJ2000 = m_cam->lookDirectionJ2000();
59 SensorUtilities::Vec lookVecJ2000 = {lookJ2000[0], lookJ2000[1], lookJ2000[2]};
61 vector<double> posBF(3);
62 m_cam->instrumentBodyFixedPosition(&posBF[0]);
64 SensorUtilities::Vec sensorPos = {1000 * posBF[0], 1000 * posBF[1], 1000 * posBF[2]};
66 double sensorTime = m_cam->time().Et();
68 SensorUtilities::ObserverState sensorState = {
76 m_cam->SetBand(oldBand);
77 m_cam->SetImage(oldSample, oldLine);
97 double oldLine = m_cam->Line();
98 double oldSample = m_cam->Sample();
99 double oldBand = m_cam->Band();
101 bool groundPtChanged = !(oldGroundPt == newGroundPt);
103 if (groundPtChanged) {
104 m_cam->SetGround(newGroundPt);
107 vector<double> lookBF = m_cam->lookDirectionBodyFixed();
108 SensorUtilities::Vec lookVec = {lookBF[0], lookBF[1], lookBF[2]};
110 vector<double> lookJ2000 = m_cam->lookDirectionJ2000();
111 SensorUtilities::Vec lookVecJ2000 = {lookJ2000[0], lookJ2000[1], lookJ2000[2]};
113 vector<double> posBF(3);
114 m_cam->instrumentBodyFixedPosition(&posBF[0]);
116 SensorUtilities::Vec sensorPos = {1000 * posBF[0], 1000 * posBF[1], 1000 * posBF[2]};
118 double sensorTime = m_cam->time().Et();
120 SensorUtilities::ImagePt imagePoint = {
122 m_cam->Sample() - 0.5,
125 SensorUtilities::ObserverState sensorState = {
132 if (groundPtChanged) {
133 m_cam->SetBand(oldBand);
134 m_cam->SetImage(oldSample, oldLine);