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.

Dark GDK / 3d line

Author
Message
prasoc
15
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 8th Dec 2008 22:59
There is a 2d line function, but how would I cast a 3d line, so you supply 3 co-ords to draw?
prasoc
15
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 9th Dec 2008 08:04
is it really that hard to do a 3d line?
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 9th Dec 2008 09:37
prasoc - maybe you should give people a chance to answer Some of the experts are sleeping when you are waiting for an answer.

Niels Henriksen
www.tales-of-the-realms.com
if Microsoft can sell software with bugs, so can I.
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 9th Dec 2008 11:53
This is a vs2005 version of Cloggy's D3DFunc:

https://forumfiles.thegamecreators.com/download/1259621

Convert it to vs2008 (just open and go straight), it includes:

2d line: 'd3d_line'
2d boxes: 'd3d_box', 'd3d_boxAlpha'
3d lines: 'd3d_line3D'
3d dots: 'd3d_dot3D'

Note that 'InitD3DFunc()' must be called before using these ones.
sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 9th Dec 2008 12:19
Quote: "but how would I cast a 3d line, so you supply 3 co-ords to draw? "


A question to be asked:
Do you just want to draw a 3D line in the view window (like a menu item), or do you want an object (like a rope) in a game that is a 3D line?
prasoc
15
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 9th Dec 2008 18:12
I want to draw an object from one point to another point with 3 co-ords (ie. a rope)
prasoc
15
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 9th Dec 2008 19:07
Im getting this


What does that mean?
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 9th Dec 2008 22:08
You need the lib its in.
sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 10th Dec 2008 01:34 Edited at: 10th Dec 2008 01:38
Quote: "I want to draw an object from one point to another point with 3 co-ords (ie. a rope) "


Here is a rehash of some code created by "IanM".

It creates a single line mesh (if one can call it that) and uses the "dbSetObjectEmissive ()" function to give it whatever color you want. The mesh should be able to be extended to as many segments as you require.



I don't have the time at the moment to bundle it up nicely into a simple function call .......... Zuka do you have the time at the moment????

Anyway, hope it gives you some ideas.
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 10th Dec 2008 03:01 Edited at: 10th Dec 2008 03:02
2 minute class wrap.

EAT IT, IT TASTES LIKE OBJECTS!



Should work, didn't bother to test it.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th Dec 2008 05:34
Quote: "Should work, didn't bother to test it. "

Famous last words...

LOL
--Jason

sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 12th Dec 2008 07:02 Edited at: 12th Dec 2008 07:12
Just thought I would post a slightly better code fragment (should others be interested further down the line) so that it becomes a little clearer how to create multi-segment lines that are joined, as well as, that are not joined.


EDIT: Removed some left over comments from a previous example.
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.

Login to post a reply

Server time is: 2024-09-30 13:11:49
Your offset time is: 2024-09-30 13:11:49