help with raycasting

Im using the raycasting code from the wiki, however I keep getting the error;
Code:
'RaycastOne' : is not a member of 'b2World'


what am i doing wrong, I copied this code from the wiki, assuming it was right, or am I using a old version of box2d without raycasting, or has it been deprecated. I looked through the source code for box2d I have and it wasn't there, which was a little confusing.


any help would be very gratefully accepted.


here is the code I am using;
Code:
//raycast
   b2Segment segment;
b2Vec2 start(5.0f,0.0f);
b2Vec2 direction(1.0f,0.0f);
//Set to world width + world height to be sure of infinite ray
float32 maxLength = 10000;
segment.p1 = start;
segment.p2 = start + maxLength * direction;

float32 lambda=1;
b2Vec2 normal;
b2Shape* shape = myWorld->RaycastOne(segment,&lambda,&normal,false,NULL);
if(shape){
   b2Vec2 collisionPoint = (1 - lambda) * segment.p1 + lambda * segment.p2;
   // Do something...
   glBegin(GL_LINES);
glVertex2f(start.x,start.y);
glVertex2f(collisionPoint.x,collisionPoint.y);
glEnd();
}else{
glBegin(GL_LINES);
glVertex2f(start.x,start.y);
glVertex2f(segment.p2.x,segment.p2.y);
glEnd();
}
Don't worry guys, my stupid mistake, I'm working with an older version of box2d
I've got the same problem but I'm using version 2.0.1 which as far as I can tell is the current version. Was there another one released? help plz...
Thanks for replying, everyone. It appears we have a decent cross-section of people here and a lot of well thought-out discussion. 😆
simulationcredit
Sorry, if that was a jab at me, um, I think there may be a newer version, if you check the svn, it is newer than the one on the homepage
I am trying to "get" the name of the terrain texture my character is currently standing on using a ray cast. The problem is, I never learned ANYTHING about ray casting, so I have no idea where to begin. 🙄
simulation credit immo - Simulation credit immo. L’Internet a rendu encore plus facile d’obtenir de l’aide pour trouver le credit immo.
um, Im on holiday at the moment (away from my beautiful code) so I cant give you code or examples, however I do know that when you raycast it returns a fixture (albeit, indirectly)

Because of the recent overhaul of box2d my source code at the top of this is wrong, however the current version of box2d does somthing similar, instead of returning a shape however it returns a fixture, and from this you can get a body.

sorry if this is confusing, however I havent got any of my own reference material at the moment, however as soon as I get a chance I will post some code for you....

Original thread: https://box2d.org/forum/viewtopic.php?t=3287