Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Finding an Object's Position within a .X File

Author
Message
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 10th Jan 2004 15:31
Just interested to know if I make an object in a 3d modelling program and offset it to a position that isn't the origin, can I then find out what position that I offseted it to through memblocks or some other method? This would greatly help for speeding up the program by not checking objects within a certain range, however, I can't do this without knowing their true position within the .X file. I know I can get each vertex position of the object but if it's a complex object then I'd end up having to check every vertex in the object and the result would probably slow the program down even more.

Anyone know if it's possible? Thanks.


"Computers are useless they can only give you answers."
AramusM
20
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 10th Jan 2004 19:56
You could write a small app to process each of your objects and save that data to a file. then load that file when you load you objects in your main program and hold that data in an array that can be updated when an object moves. Could even make a small quad tree to hold this data and make checking even faster.

Login to post a reply

Server time is: 2024-09-21 15:34:48
Your offset time is: 2024-09-21 15:34:48