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 / one (or three) variable that contains the position of all vertexes in a model

Author
Message
PAGAN_old
18
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 25th Oct 2008 07:12
This is probably something basic, but i am not smart enough to figure out how this is done.

i have a model, and i need to make one (if that cant be done, ill settle with 3 variables xyz) variable that contains the position of every vertex in the model.
i know you i have to use loops to figure this out but for some reason every time i tackle this it confuses the hell out of me and i am left with a headache.

Very confusing consept

i am new to vertexdata, just started playing with this today

just to avoid being flamed, most of whatever i learned about vertex data came from the search function of this forum.

dont hate people who rip you off,cheat and get away with it, learn from them
Captain IceT
16
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Boat Murdered, and Im still laughing!
Posted: 25th Oct 2008 14:11
Well, I'm new to modeling to, but it seems to me that the object itself contains all that data. You can use it with VERTEX DATA commands.

If you MUST have it in a separate variable, try a user created type like this:



"Dwarf Fortress has taught me that all the world's problems would be substantially reduced had our parent civilizations never minted more than four stacks of coins."
- DwarfFortressWiki
Dabbler
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: Minnesota
Posted: 25th Oct 2008 16:50
@PAGAN

Look in The GameCreators newsletter, issue 41, for a tutorial on vertex data commands.

I hope this helps cure the headche.


Whatever...
calcyman
17
Years of Service
User Offline
Joined: 31st Aug 2007
Location: The Uncertainty Principle
Posted: 25th Oct 2008 18:14
Quote: "i need to make one (if that cant be done, ill settle with 3 variables xyz)"


You can do it in one variable - a (3*n) float or (n) vector3d array. You'll need to make your own UDT for a vector.

The absolute best way to do this is to use a memblock, which stores 12 bytes for each position.



The optomist's right, The pessimist's right.
PAGAN_old
18
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 26th Oct 2008 04:20
this is supposed to be outside of the main loop right?

dont hate people who rip you off,cheat and get away with it, learn from them

Login to post a reply

Server time is: 2024-11-24 20:07:07
Your offset time is: 2024-11-24 20:07:07