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 / DBC: Is there a way to retrieve the matrix scale and tile size?

Author
Message
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 28th Sep 2006 12:44
Hello,

I have a program that generates and links several matrices together with varying sizes. I was wondering if there was a way to query one of them and get back the tile size or the scale (number of points?).

I'm trying to avoid rewriting the matrix generation code to include capturing the matrix number and dimensions. I was hoping there was an "after the fact" solution.

Enjoy your day.
Gamers for sale
19
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 28th Sep 2006 14:39 Edited at: 28th Sep 2006 14:46
I think you can just get the matrix size. (1000,1000 or what ever it is) and divide that number by the amount of tiles there are to get a measurement of each tile. Define the tile length as a varible storing the length of the tile so you can use that as one unit. Then from there you could get the points positions.

I don't know how to query them but I think this will work for what you are doing then with this you can query them.

Is this what you meant?

Quote: "I'm trying to avoid rewriting the matrix generation code to include capturing the matrix number and dimensions. I was hoping there was an "after the fact" solution."


For this can't you just have a temperary matrix then just write it to memory, delete all matrixs, then reload the ones that you want?

Let me know if this works or if I can help.

Dark World in development.

Real physics engine, position objects, particles, lights, and event areas. Click and create each aspect of the game and load it to a main file that will run the game. Use it with or without dark basic.

Due Date: Nov 2007
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Sep 2006 15:43
One of my utility plugins allows you to get this information ... if you are using DBPro. Are you?

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 28th Sep 2006 20:48 Edited at: 28th Sep 2006 20:50
Thank you for responding.

@Gamers For Sale:
The trick is that the tile size and scale are unknowns and the goal is to find out what they are. For example, if there was a random matrix generator that generated 20 matrices of varying dimensions one at a time through the same loop, instead of creating variables or a file to hold the dimensions and matrix number as they are being created, I want to be able to get the dimensions of a particluar matrix later on. I was wondering if there was a way to do that.

@IanM
I'm using DarkBASIC Classic Enhanced (DBC). I took a look at your links and there seems to be a lot of useful utilities. Question, do you have a means of accessing the memory where objects are loaded or created? Or for that matter, the matrices? In terms of objects, I'm not just asking about make memblock from mesh - but where the direct X file is loaded in memory and what is happening to the templates? Part of my plan is to be able to get the name of the textures and materials that are loaded in with a direct X file - but I digress - back to the matrix question, would there be a utility that works with DBC and getting the matrix info?

If not, I'll just recode the program to store the information as the matrices are being created.

Enjoy your day.
Gamers for sale
19
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 29th Sep 2006 23:32 Edited at: 29th Sep 2006 23:33
Is this right? You want to get the dimentions of the matrix from memory after it was being created. Kind of like a mesh but not of a file, but from the memory of the matrix.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 30th Sep 2006 00:03
@GFS
Yeah that sounds about right. I was wondering if there was a method similar to how Object Size X() Object Size Y() Object Size Z() Object Size() - works.

Enjoy your day.
D Ogre
21
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 30th Sep 2006 00:24
There are no such functions in DBC to return the values in question.

Unless you can find some kind of dll (plugin) that will do this in DBC,
you will just have to use variables and/or files to store the information
for later retrieval I'm afraid.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 30th Sep 2006 01:17
Thank you all for your help!

Enjoy your day.
Gamers for sale
19
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 30th Sep 2006 05:43
Just branching off of what D Ogre said. I have looked under the commands and didn't find anyway of doing this and you would have to find some dll that would have the commands to do this. I also looked in DBpro and there is a few commands in it that I think would help with what you are doing.

Login to post a reply

Server time is: 2024-11-26 09:34:37
Your offset time is: 2024-11-26 09:34:37