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 / Matrix Editor Help Please?

Author
Message
Disco Stu
21
Years of Service
User Offline
Joined: 22nd Nov 2002
Location: Australia
Posted: 21st Jan 2004 03:52
Hey everyone,
Well recently I decided to make a matrix editor in dbpro (just as a way of learning more about the matrix commands). So far I've been successful in making a mouse cursor object that you can move along the matrix, and raise/lower single matrix points by click near the point you want to edit. Now my problem is that I want to make it so that I can move more than one point at a time. Looking around at the other matrix editors I found that Magic World has a really nice way of doing it (ie: making a circle and checking to see whether or not the co-ordinates of the points on the matrix fall inside the radius of the circle).

My problem is that the only way I can think of doing this is by using a FOR / NEXT loop and going through every point of a matrix to see if it falls inside the radius. While this works fine, on a larger matrix (with more points) it would definitely start to slow down. So here is the crux of the issue, is there a way of localising (or refining) the loop in any way so that it doesn't have to go through all the matrix points?

I hope I've explained the problem with enough detail, and thanks in advance to any advice posted (it will be much appreciated).

Cheer,
Sina.

"Maybe if you ain't so good, I ain't so bad."--Tony Manero to Stephanie (Karen Lynn Gorney)
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 21st Jan 2004 18:36
if the gap between each point is for instance 100, and the radius is 500 you'd only need to check the points 5 tiles away.


GO TO THE ETERNAL DESTINY FORUMS!!! http://forums.eternaldestinyonline.com
Do it now!!!
Disco Stu
21
Years of Service
User Offline
Joined: 22nd Nov 2002
Location: Australia
Posted: 22nd Jan 2004 04:31
Hehe, hadn't thought about it that way. Guess it could work thanks .

"Maybe if you ain't so good, I ain't so bad."--Tony Manero to Stephanie (Karen Lynn Gorney)
Disco Stu
21
Years of Service
User Offline
Joined: 22nd Nov 2002
Location: Australia
Posted: 22nd Jan 2004 07:52
Hmm, just out of interest (and before this post dies), does anyone else have any suggestions?

While ReD_eye's suggestion would probably work quite well, are there other ways of doing?

Thanks again,
Sina.

"Maybe if you ain't so good, I ain't so bad."--Tony Manero to Stephanie (Karen Lynn Gorney)

Login to post a reply

Server time is: 2024-09-21 18:22:20
Your offset time is: 2024-09-21 18:22:20