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 / Whats vector? is it better?

Author
Message
kfoong
23
Years of Service
User Offline
Joined: 28th Jan 2003
Location: Australia
Posted: 1st Jun 2003 14:20
In the language there are some Vector things. What is it? Is it better? Easier?
Heh heh... Mule...
http://www.stellarblue.vze.com/
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 1st Jun 2003 15:35

m_Vector3 as dword : p_Vector3 as dword
m_Vector3 = 1
p_Vector3 = make vector3( m_Vector )


you can now set this like
set vector3 m_Vector,1.0,1.0,1.0

and then use it to position an object like
position object 1,m_Vector
as it is identical to writing
position object 1,1.0,1.0,1.0

the main benifit is far far cleaner code, another benifit is making use of dbpro 3dmaths code.

but you can also always use the pointer like

*p_Vector3 = 1.0
*p_Vector3 = 1.0
*p_Vector3 = 1.0
position object 1,m_Vector3

but still at the end of the day it is just about having 3 values as one like a type, but you can pass them.

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!

Login to post a reply

Server time is: 2026-07-11 11:42:33
Your offset time is: 2026-07-11 11:42:33