本文整理汇总了C++中ArTransform::doInvTransform方法的典型用法代码示例。如果您正苦于以下问题:C++ ArTransform::doInvTransform方法的具体用法?C++ ArTransform::doInvTransform怎么用?C++ ArTransform::doInvTransform使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArTransform
的用法示例。
在下文中一共展示了ArTransform::doInvTransform方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: packetHandler
/**
This is the packet handler for the PB9 data, which is sent via the micro
controller, to the client. This will read the data from the packets,
and then call processReadings to filter add the data to the current and
cumulative buffers.
*/
AREXPORT bool ArIrrfDevice::packetHandler(ArRobotPacket *packet)
{
int /*portNum,*/ i, dist, packetCounter;
double conv;
ArTransform packetTrans;
std::list<ArSensorReading *>::iterator it;
ArSensorReading *reading;
ArPose pose;
ArTransform encoderTrans;
ArPose encoderPose;
pose = myRobot->getPose();
conv = 2.88;
packetTrans.setTransform(pose);
packetCounter = myRobot->getCounter();
if (packet->getID() != 0x10)
return false;
// Which Aux port the IRRF is connected to
//portNum =
packet->bufToByte2();
encoderTrans = myRobot->getEncoderTransform();
encoderPose = encoderTrans.doInvTransform(pose);
i = 0;
for (i=0, it = myRawReadings->begin();it != myRawReadings->end();it++, i++)
{
reading = (*it);
dist = (int) ((packet->bufToUByte2()) / conv);
reading->newData(dist, pose, encoderPose, packetTrans, packetCounter, packet->getTimeReceived());
}
myLastReading.setToNow();
processReadings();
return true;
}
示例2: main
int main(void)
{
ArPose p1(100, 100, 0), p2(1000, 1000, 90), p3;
ArTransform trans;
trans.setTransform(p1);
p3.setPose(-900,-900,0);
p3 = trans.doTransform(p3);
p3.log();
p2.setPose(200, 200, 0);
trans.setTransform(p1, p2);
p3.setPose(0,0,0);
p3 = trans.doInvTransform(p3);
p3.log();
}