GuiObjectView Update
by Xavier "eXoDuS" Amado · 03/31/2003 (11:15 am) · 37 comments
Download Code File
I won't go into much explanations here, because I really don't have the time to do so now.
To install this simply copy the two provided files (guiObjectView.cc and guiObjectView.h) to the engine/gui/ directory and add them to your Visual Studio Project or your Gcc makefiles or whatever you are using.
I've added a new parameter callled parentName, here you have to pass in the parent's name you specified when loading the object. Here's an example:
Technically, I've added a new member variable to the mesh structure to store the parent index and made it use the parent object to obtain the translation matrix when drawing instead of using the main object's translation. This change allows you to mount objects on top of each other to do... dunno... complex illustrations in an object view. I've personally done this to be able to put together an engine. The picture shows a very rudimentary engine (programmer art) with 4 pieces: Block, Intake Manifold (mounted on Block), Carburator (mounted on Intake) and Alternator (mounted on Block).
I had to change a bit more of code in the already mounted checks and some more bits of code, but nothing fancy, you can compare both files to see all the changes.
Have fun and report any bugs.
Credits given to all the people that worked on this, in the source files.
I won't go into much explanations here, because I really don't have the time to do so now.
To install this simply copy the two provided files (guiObjectView.cc and guiObjectView.h) to the engine/gui/ directory and add them to your Visual Studio Project or your Gcc makefiles or whatever you are using.
I've added a new parameter callled parentName, here you have to pass in the parent's name you specified when loading the object. Here's an example:
View.setObject("Block", "base/data/shapes/engine/block.dts", "", "");
View.mountObject("Intake", "base/data/shapes/engine/intake.dts", "", "Block", "mount0", 0);
View.mountObject("Carb", "base/data/shapes/engine/carb.dts", "", "Intake", "mount0", 0);
View.mountObject("Alternator", "base/data/shapes/engine/alternator.dts", "", "Block", "mount1", 0);Technically, I've added a new member variable to the mesh structure to store the parent index and made it use the parent object to obtain the translation matrix when drawing instead of using the main object's translation. This change allows you to mount objects on top of each other to do... dunno... complex illustrations in an object view. I've personally done this to be able to put together an engine. The picture shows a very rudimentary engine (programmer art) with 4 pieces: Block, Intake Manifold (mounted on Block), Carburator (mounted on Intake) and Alternator (mounted on Block).
I had to change a bit more of code in the already mounted checks and some more bits of code, but nothing fancy, you can compare both files to see all the changes.
Have fun and report any bugs.
Credits given to all the people that worked on this, in the source files.
#22
The guiObject viewer appears to be losing objects, or mounting them in the wrong place.
I've got a screen full of GuiObjectView controls 8 of them to be precise. Each of them show the same thing, a segmented model of a soldier. In most of them, the objects appear fine, but in others, at random, bits are missing.
I'm thinking that they're being mounted in the wrong place, out of view, rather than being removed completely.
Anyone got any ideas?
11/18/2005 (2:06 am)
Has anyone else had this problem that I'm getting?The guiObject viewer appears to be losing objects, or mounting them in the wrong place.
I've got a screen full of GuiObjectView controls 8 of them to be precise. Each of them show the same thing, a segmented model of a soldier. In most of them, the objects appear fine, but in others, at random, bits are missing.
I'm thinking that they're being mounted in the wrong place, out of view, rather than being removed completely.
Anyone got any ideas?
#23
11/18/2005 (12:29 pm)
Its not you, its the code and sometimes you stuff will be mounted right and sometimes it won't right? Yeah I get the same problem all of the time. Apparently this thing is a bit buggy in that department.
#24
If someone else has fixed this, I would appreciate knowing before I go on a mission to nail this bug...
11/21/2005 (1:43 am)
I did take a look at the code before, but it looked fine to me, but that's not to say there's not some evil little bug hiding behind some innocent looking line of code. The problem is intermittant so it suggests a pointer problem to me.. or memory allocation.If someone else has fixed this, I would appreciate knowing before I go on a mission to nail this bug...
#25
but now i'm stuck in implementing it to TSE... someone?
i'm not that deep in programming on c++ .. as I can see it's asking a lot of GL_* related functions ...
UPD: http://www.garagegames.com/mg/forums/result.thread.php?qt=33605
12/01/2005 (5:34 am)
somehow I've managed to make it working fine with tge1.4 ...but now i'm stuck in implementing it to TSE... someone?
i'm not that deep in programming on c++ .. as I can see it's asking a lot of GL_* related functions ...
UPD: http://www.garagegames.com/mg/forums/result.thread.php?qt=33605
#26
12/25/2005 (11:12 am)
I found out what was wrong and why the ObjectView was making the model blink. I figured it out when I realized the model was flashing small, and then huge in the viewer. I had made the dimensions in 3ds too large, the viewer was trying to shrink it and it couldn't, resulting in the flashing of the model. Now that I resized it to a smaller size, it works perfectly! Maybe a warning should be made about that somewhere.
#27
i want do a raycast on object mount for selection in guiobjectview
01/21/2006 (9:02 am)
hello.i'm italian. sorry for bad english :)i want do a raycast on object mount for selection in guiobjectview
#28
If it's totally different, what are the differences so we know which one best fits our needs?
01/22/2006 (12:50 pm)
OK, so I read and I don't see the answer to the question Anthony Rosenbaum (Mar 31, 2003 at 16:28) where he asks if it's different han the other one done about a year ealier that has animation support, etc. Is this an ADVANCEMENT on that or is it a totally different one?If it's totally different, what are the differences so we know which one best fits our needs?
#29
What I would like to know is if anyone has figured out how to fix the problems with the mounting of objects especially wheels for vehicles where they don't consistently mount in the correct positions.
01/22/2006 (1:24 pm)
@dishmal - They are the same thing but with different updates. The best thing to do is to compare the two for the updates needed. Its what I did. If you are planning on using the lighting pack then you may want to do a search for that update too. What I would like to know is if anyone has figured out how to fix the problems with the mounting of objects especially wheels for vehicles where they don't consistently mount in the correct positions.
#30
01/22/2006 (2:17 pm)
hmmm.. does anyone have an updated copy that has all of these changes as well as the other changes for the other ones too? Would be good to get them all into one and put that resource up!
#31
01/22/2006 (4:21 pm)
@dishmal - I did that just a few minutes ago. Keep an eye out for it.
#32
01/23/2006 (3:26 pm)
hey ron, did you submit it for a resource? is it waiting approval because i can't find it! =O
#33
01/27/2006 (2:57 pm)
hey ron, any word on when your resource that combines all the guiobjectview's will be published? would you mind emailing it to me?
#34
www.garagegames.com/index.php?sec=mg&mod=resource&page=result&qdn=^54992&qsf=pos...
Haven't tried it yet.
03/23/2006 (8:14 am)
Found it here after following the link to Ron's bio and then the resource linkwww.garagegames.com/index.php?sec=mg&mod=resource&page=result&qdn=^54992&qsf=pos...
Haven't tried it yet.
#35
Im using TGE FPS 1.4 ver and visual C++ 2055 express edition.
I added guiObjectView.cc and guiObjectView.h to the C:\Torque\SDK\engine\gui\utility folder.
This is the areas im lost on:
1)add them to your Visual Studio Project or your Gcc makefiles
2)How do I add a parameter callled parentName
3)What do I do with the following code in the text box above ie. Where do I put this at?
View.setObject("Block", "base/data/shapes/engine/block.dts", "", "");View.mountObject("Intake", "base/data/shapes/engine/intake.dts", "", "Block", "mount0", 0);View.mountObject("Carb", "base/data/shapes/engine/carb.dts", "", "Intake", "mount0", 0);View.mountObject("Alternator", "base/data/shapes/engine/alternator.dts", "", "Block", "mount1", 0);
Appreciate anyhelp in advance thanx.
06/18/2006 (10:14 am)
Kinda new to this, so im a little lost... Im trying to follow Dreamers inventory tutorial and I need this part in order for it to work. http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7514 Im using TGE FPS 1.4 ver and visual C++ 2055 express edition.
I added guiObjectView.cc and guiObjectView.h to the C:\Torque\SDK\engine\gui\utility folder.
This is the areas im lost on:
1)add them to your Visual Studio Project or your Gcc makefiles
2)How do I add a parameter callled parentName
3)What do I do with the following code in the text box above ie. Where do I put this at?
View.setObject("Block", "base/data/shapes/engine/block.dts", "", "");View.mountObject("Intake", "base/data/shapes/engine/intake.dts", "", "Block", "mount0", 0);View.mountObject("Carb", "base/data/shapes/engine/carb.dts", "", "Intake", "mount0", 0);View.mountObject("Alternator", "base/data/shapes/engine/alternator.dts", "", "Block", "mount1", 0);
Appreciate anyhelp in advance thanx.
#36
when I open it for the first time, it won't mount weapons that don't have a mountPoint, but if I exit, and re-open the dialog, it mounts them fine...
anyone have any ideas?
02/15/2007 (3:37 pm)
just implimented this in my project, love it... but there's one problem...when I open it for the first time, it won't mount weapons that don't have a mountPoint, but if I exit, and re-open the dialog, it mounts them fine...
anyone have any ideas?
#37
11/30/2009 (12:22 pm)
Working like a charm 
Torque Owner Ronald J Nelson
Code Hammer Games