Some problems of update function

zckczy

04-05-2010 07:17:48

Hello:
I want to use PagedGeometry with MFC, I creat a mesh as the ground in my program,and I rewrite the HeightFunction.But when I call the grass->update function,the program is dead :x . Who can help me solove this problem?Thank you!
I create a ray then query the mesh and get the information about it, I use the hit point's Y coordinate as the heitght.
If there have some problems that i use a mesh as the ground and the method I get the height?
My english is poor, so if I don't expressed clearly,I am sorry.

Fish

04-05-2010 13:48:54

Can you be more specific about what 'dead' means? Does it crash? What error do you get? Do you have a debug stack trace to show where it dies? What have you done already to try and troubleshoot the problem?

Paged Geometry does not care what kind of geometry or what algorithm you use to determine the height value.

- Fish

zckczy

05-05-2010 06:37:41

:D Thank you!
When I debugg the program,it is no response and no tips.From the task manager of the System I can see the program "Not responsing".
Because I can get the Y coordinate of the mesh when use the other two cooridinates,I don't know if there have some problems about the Height function.
I find the program dies when it call the mgr->update() at line 222 of file PagedGeometry.cpp.
Thanks for your help!

Fish

05-05-2010 12:56:53

line 222 in the current version of PagedGeometry.cpp is:
if (deltaTime == 0){
I don't see how the app can crash there, so you must be using an older version of PagedGeometry.

1) Please post a call stack trace.
2) Please take a look at the documentation that comes with Paged Geometry and make sure you are initializing the library correctly and providing it with correct data.
3) Use your debugging skills, place break points, review variables as you single step.

- Fish

zckczy

06-05-2010 01:12:11

Thank you!
My PagedGeometry's version is 1.05.I know why my program is not responsing when running, because my function of getting the terrain height is so inefficient that it is not responsing :( .
Thank you very much.