Taming the ShapeBeast

  • 1
  • 2
19 posts Page 2 of 2
Nils
Posts: 159
Joined: Thu Feb 05, 2015 3:32 am
 
by Nils » Mon Jul 27, 2015 4:59 pm
Yeah [claps hands of joy]
buckmaster
Steering Committee
Steering Committee
Posts: 321
Joined: Thu Feb 05, 2015 1:02 am
by buckmaster » Thu Jul 30, 2015 2:53 pm
Which indexes do you mean? Could you link to the source in GitHub?
marauder2k9
Posts: 159
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Thu Jul 30, 2015 10:08 pm
https://github.com/GarageGames/Torque3D ... h#L145-146


I was just wondering if the engine references these anywhere that i dont know about, doing a full solution search for 0 and 1 would be a bit stupid lol if not then its good cos its easy to add another object type to this but i would hate to change the numbers in case it messes something else up along the way
rlranft
Posts: 298
Joined: Thu Feb 05, 2015 3:11 pm
 
by rlranft » Fri Jul 31, 2015 1:40 am
Well, since they're defined "constants" you could probably do a search for StandardImageShape and FirstPersonImageShape instead of 0 and 1....
marauder2k9
Posts: 159
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Fri Jul 31, 2015 1:46 am
yea i did that and they are referenced in a few places mainly in shapeimage.cpp, the only thing though is shapebase.h is linked in quite a few files (quick search on vs gives 30 files with the header file linked)

Any one of these files could be referencing an image index, not to mention other files that don't have shapebase.h linked that could be using the shape index information from the files that does have shapebase.h linked................ i think i just went cross eyed

EDIT: StandardImageShape is also referenced in player.cpp but i think thats only for shadows and / or the third person mesh
rlranft
Posts: 298
Joined: Thu Feb 05, 2015 3:11 pm
 
by rlranft » Fri Jul 31, 2015 2:16 am
It's unlikely they're referencing it directly instead of using the named constant. In fact, what you're saying is pretty much what I would expect - by definition FirstPersonImageShape would only be used by player-used classes (maybe vehicles could use this for cockpit geometry but I don't think they do at the moment) and StandardImageShape should be default for everything else.

StandardImageShape should be the thing you see in the world - so yeah, for shadows, but also for other players, scenery, etc. FirstPersonImageShape would be for the player arms, first person versions of weapon shapes, etc...

Unless I have totally miscomprehended this.
marauder2k9
Posts: 159
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Fri Jul 31, 2015 4:53 am
u understand my thinking though, why define these numbers at all if they aren't referenced somewhere else in the source code eg a render order for example?

I dont know time to sleep on it lol
Azaezel
Posts: 395
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Fri Jul 31, 2015 12:40 pm
Not to further drag this off topic, but:
https://github.com/GarageGames/Torque3D ... .cpp#L5721
and
https://github.com/GarageGames/Torque3D ... .cpp#L3205 (getImageShapeIndex hooks back around a couple places)
marauder2k9
Posts: 159
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Fri Jul 31, 2015 1:27 pm
yea that seems to be the only times it is called directly in the source code with that function i just wanted to make sure that changing the indexes wasnt going to cause problems elsewhere :)
  • 1
  • 2
19 posts Page 2 of 2

Who is online

Users browsing this forum: No registered users and 2 guests