3D line

Blitz3D Forums/Blitz3D Programming/3D line

Mathieu A(Posted 2003) [#1]
Hi, when I want to draw a 3D line. The line is behind all the 3D objects So I don't have the 3D perspective. Do you know a command or a tips which enable the Z buffer for 3D line.

Thanks


Simian(Posted 2003) [#2]
I don't think it's possible the way you mean.

You could use a long, thin cylinder entity to achieve the effect though.

You could pass the source and destination x,y,z coords to a function that creates a line entity and type, position it at the source coord, scale it along one axis to the distance between the source and destination coords and then point it at the destination before displaying it.

If your 3d line is always going to be drawn between 3d objects you don't even have to bother with 3d maths to figure out the length scaling, you can just pass the source and destination Entities and use EntityDistance.

Doing it this way means you can put some nice effects on your line and you can select and modify it easily.

Hope this is some help.


Al Mackey(Posted 2003) [#3]
I have to admit that the lack of support for lines and points in B3D has also irritated me a lot in the short time I've been using it. I've drawn lines myself from one part of a 3D scene to another using CameraProject and Line, but these are always in front of everything else. Lines are obviously supported by DX7, as you'd know if you ever messed with Wireframe, but there doesn't seem to be any B3D support for it.


jhocking(Posted 2003) [#4]
Wireframe does not "obviously" mean 3D lines are supported. Wireframe is simply a special rendering mode for 3D geometry; you need to have polygons to render as opposed to just a single edge.

This isn't to say 3D lines aren't supported (I have no idea) but Wireframe mode doesn't prove that.

Incidentally, why do you want to draw a 3D line? Just curious because nothing comes to my mind.


BlitzSupport(Posted 2003) [#5]
According to this M$DN page, it looks like 3D lines require DX9...?

I think the wireframe modes are rendered with 2D lines, BTW, and are handled by the gfx driver (since some drivers output nothing in wireframe mode)...


Incidentally, why do you want to draw a 3D line? Just curious because nothing comes to my mind.


Telegraph wires & lasers I suppose...


Michael Reitzenstein(Posted 2003) [#6]
According to this M$DN page, it looks like 3D lines require DX9...?

I love how Microsoft declares itself innovative and yet to draw a 3D line you have to first download a 30mb runtime :D