Original Post
Hello all,
I was wondering if anyone is familer with the following http://www.mindcontrol.org/~hplus/epic/ entity interpolation code?
I have a few questions in relation to it:
1. Given the following extract http://pastebin.com/hab0chaU, could you explain the relevancy of the ReadPosition() call in the addSample function? do the values get modified in anway? I'm just not 100% on why this call is there, some clarification would be great. I'm still learning this interpolation process.
2. In the following function why is the X position the only one being passed in? instead of both x,y?
void DeliverPacket(Packet const &packet, double now)
{
intPos.AddSample(packet.time, now, &packet.pos.x);
}
Apologies for my naivety, I'm not awfully familer with C++ or a few of these concepts, any clarification would be greatly appreicated.
Thanks!
P.S I did pm hplus0603, the author of this sample, but yet had no response, however I can see he posts in this section quite a lot so if you're reading hplus0603, I'd be grateful if you could answer these questions, many thanks!
I was wondering if anyone is familer with the following http://www.mindcontrol.org/~hplus/epic/ entity interpolation code?
I have a few questions in relation to it:
1. Given the following extract http://pastebin.com/hab0chaU, could you explain the relevancy of the ReadPosition() call in the addSample function? do the values get modified in anway? I'm just not 100% on why this call is there, some clarification would be great. I'm still learning this interpolation process.
2. In the following function why is the X position the only one being passed in? instead of both x,y?
void DeliverPacket(Packet const &packet, double now)
{
intPos.AddSample(packet.time, now, &packet.pos.x);
}
Apologies for my naivety, I'm not awfully familer with C++ or a few of these concepts, any clarification would be greatly appreicated.
Thanks!
P.S I did pm hplus0603, the author of this sample, but yet had no response, however I can see he posts in this section quite a lot so if you're reading hplus0603, I'd be grateful if you could answer these questions, many thanks!