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 / Axis cross for editor?

Author
Message
Hayer
20
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 24th Jun 2010 18:14
Hi

Im not sure if it is called "axis cross", but my english is pretty bad sooo

I've been trying to make a "clone" of that for like 4-5 hours now but can get it to work properly - so now I am turning to the forums.

And I was wondering if anyone had some example code lying around? or just a snippet from a program?

I've attached a image for better explenation. It is marked with a red circle.. too obvious :3

Keep it simple.
Questions? Mail me
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 24th Jun 2010 19:27
It's called a Gizmo or 3d Gizmo. I posted a example somewhere awhile back, though don't have a clue where, will have a wonder. Though if you look at how a gizmo works, you can figure out how to make them, not that hard when you really look at them.

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 24th Jun 2010 19:28
What I would do is make a model of it (maybe in a modeling program?) and position it where it needs to be, and the further the camera is away from the object, the larger you scale it so it appears not to change size. Then I would also make it draw over everything else with the following command : disable object zdepth <object number>

TheComet

Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 24th Jun 2010 19:38 Edited at: 24th Jun 2010 19:41
Ok, couldn't find the really new one, or extract it from my edit cause it's heavy built into other stuff like selection which you will end up doing. But I found an example of my old one, maybe you can get some examples from this, also includes two selection types:

Tip: It's long, so for quick highlighting, click and hold the un-open code box from underneath and drag up over it and it will highlight all the code in the box.


I changed a ton of stuff here, the new one is about only 10 percent of this one, but this was a good first attempt I think.

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
Hayer
20
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 24th Jun 2010 20:03
@TheComet

Thanks, but already know about the z-depth ;]

Keep it simple.
Questions? Mail me
Alfa x
20
Years of Service
User Offline
Joined: 1st Jul 2006
Location: Colombia
Posted: 24th Jun 2010 20:25
Hi,
tehre are two options.

You can make a 3D object that is an arrow, and join them to make the axis cross.

or

You could use cloggy DLL and paint 3d arrows.

Cheers.
paul5147
20
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot &amp; Sunny
Posted: 24th Jun 2010 20:45
Example using the d3d plugin as mentioned.
Just pass the function the object number to apply it to.

Also uses matrix1 plugin.
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 24th Jun 2010 21:47
Hi all.
@Sasuke
Great code !!... I`ll keep it

cheers.

I'm not a grumpy grandpa
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 24th Jun 2010 22:20 Edited at: 24th Jun 2010 22:23
chafari, cheers and keep away

In the end, I think I used d3d plugin for the lines and 3 hidden quads that faced the the camera off their axis. The plains were used to select each axis. It works exactly like 3ds Max's one, plus there's a scaler and rotation gizmo (not fun to make). The selection was improved dramatically and got rid of using show object bounds cause it's performance hungry and went with a shader for the selected objects. Also adding snapping, remember to add this to your editors, very useful.

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 24th Jun 2010 22:43
Thanks Sasuke....I like the way you select objects...super !!.I will use it on my own editor

Cheers.

I'm not a grumpy grandpa

Login to post a reply

Server time is: 2026-07-25 08:29:36
Your offset time is: 2026-07-25 08:29:36