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.

DarkBASIC Professional Discussion / Draw and manipulate a line in 3d space

Author
Message
Dante Labon
17
Years of Service
User Offline
Joined: 13th Oct 2002
Location:
Posted: 28th Oct 2002 23:48
Anyboby know a way to do this ?
The Darthster
17
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 29th Oct 2002 00:30
If you know the exact coefficients used by the dbpro 3d engine then you can draw your own dots and lines in 3d space. Unfortunately I haven't quite worked this out yet. You could try using two objects as end points and drawing a line between the object screen x and y of each one.
Dante Labon
17
Years of Service
User Offline
Joined: 13th Oct 2002
Location:
Posted: 29th Oct 2002 00:48
Yeah, I have been trying for a while now to do it
I may just have to make a 4 view editor (like 3d studio)
and do the lines in 2d and somehow translate them to 3d.
That seems like an even bigger pain in the arse.
Object deformation (eg. bend with mouse move) would work, but it aint in DB pro (at least I dont know of it).

ChipOne
17
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Canada
Posted: 29th Oct 2002 01:47
how thick a line?

you could just use a plain, scale it to 10% on one axis, and then to whatever length you need on the other axis (to match from point to point).

only problem becomes visibility with camera movement...

-= i only do what my rice krispies tell me to do =-
rapscaLLion
17
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 29th Oct 2002 04:24
well.. just a suggestion, no idea if it will actually work but: Make a primitive triangle in DBP, with 1 point at say, 10,10,10, and the other TWO points at say 25,30,12. Then you can either color the triangle or make it wireframe... or both.

Alex Wanuch
aka rapscaLLion
Get the DB Weekly Newsletter at www.dbwn.cjb.net
Dante Labon
17
Years of Service
User Offline
Joined: 13th Oct 2002
Location:
Posted: 29th Oct 2002 10:56
Well, It's like if you are using 3d studio, and use the line tool in the perspective view. Click the mouse and one end of a line appears...drag the mouse with the other end of the line. Click again and the one line stops moving and begins another at the end of the first. Right click to end the line. It's hard to explain. I could avoid the line thing altogether if I could bend and deform a mesh in DBP, but I don't think it's possible. Bummer

rapscaLLion
17
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 29th Oct 2002 14:55
oh... that would be complicated!

Alex Wanuch
aka rapscaLLion
Get the DB Weekly Newsletter at www.dbwn.cjb.net
pathfinder
17
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 29th Oct 2002 15:08
what about making a 3 sided poly 1 unit long, have 2 of the points touching. Set the object to show up as mesh in DBPro then when the point command works scale the object by the distance? oh and have the 2 point side of the poly being the end which touches the object in the distance. The 1 point side touching the starting point. Dunno if it would ... actually but hey that would be my first guess after the dot thing.

pathfinder
17
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 29th Oct 2002 15:15
actually can you load a 2 point poly into dbpro cant say Ive ever tried?

the idea is if you make the line equal to 1 unit long when you times it by the real distance it becomes the same length ie if you want a line to go

from

0,0,0

to 0,0,400

scale the object by 400

if point doesnt work Iam sure there is some trig you could do to get the angle or use matrices?

ChipOne
17
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Canada
Posted: 29th Oct 2002 18:53
meshes in dbpro work off of triangles. if you tried to create a mesh/load a file with only two points, it wouldn't be valid from the point of view of the FVF spec that dbpro uses.

modding meshes from dbpro isn't too complicated, although, admittedly, i don't know what you're trying to do.

i have a simple excercise i did to illustrate mesh manipulation. i did it with a pain, as there are only two tri's to work with and i could easily tell the number of the points (by just counting clockwise around the tri's).

if you like, i could post up the sample code for you.

-= i only do what my rice krispies tell me to do =-
Dante Labon
17
Years of Service
User Offline
Joined: 13th Oct 2002
Location:
Posted: 29th Oct 2002 22:39
Thanks everybody for the help, but I have officially given up on the idea. There must be another way to accomplish the same thing, but not by me. What I was trying to make was a track creator for a stunt racer type game (eg. the road banks, loops, rolls and stuff). Oh well.

rapscaLLion
17
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 29th Oct 2002 23:04
oh...

Alex Wanuch
aka rapscaLLion
Get the DB Weekly Newsletter at www.dbwn.cjb.net

Login to post a reply

Server time is: 2020-07-14 20:52:42
Your offset time is: 2020-07-14 20:52:42