RC3 (not a bug after all) TGBReference.pdf T2dSceneGraph.pick
by Alex Rice · in Torque Game Builder · 06/02/2006 (8:01 am) · 5 replies
[edit - Reported originally in RC1]
T2dSceneGraph.pickRect()
1. The 1st two parameters are "x y" form, not 4 parameters x1,y1,x2,y2
2. LayerMask is a Mask not a Bool
TGBReference.pdf says:
T2dSceneGraph.pickRect()
1. The 1st two parameters are "x y" form, not 4 parameters x1,y1,x2,y2
2. LayerMask is a Mask not a Bool
TGBReference.pdf says:
Quote:pickRect(%x1, %y1, %x2, %y2, %groupMask, %layerMask, %showInvisible,
%excludeObject)
Purpose
Retrieves a list of objects intersecting a given rectangle.
Syntax
%x1 - Float
The x position of the left side of the rectangle.
%y1 - Float
The y position of the top of the rectangle.
%x2 - Float
The x position of the right side of the rectangle.
%y2 - Float
The y position of the bottom of the rectangle.
%groupMask - Mask
The graph groups of objects to be included in the results.
%layerMask - Bool
The layers of objects to be included in the results.
%showInvisible - Bool
Whether or not invisible objects should be included in the results.
%excludeObject - t2dSceneObject
An object to exclude from the results list.
Return Value - List of t2dSceneObjects
The found objects.
About the author
#2
Issue 2. is fixed in RC3
[edit for clarify]
06/15/2006 (7:19 am)
Issue 1. is NOT fixed- it shows 2 parameters x,y instead of a 1 position parameter "x y" or x/y notationIssue 2. is fixed in RC3
[edit for clarify]
#3
"x1 y1 x2 y2" // A rectangle in List form
"x1 y1", "x2 y2" // Two vectors
x1, y1, x2, y2 // Four individual floats
06/15/2006 (9:24 am)
Actually, if you look into the source t2dSceneGraph.cc you will see that pickRect can take the (x, y) coords in any one of these forms:"x1 y1 x2 y2" // A rectangle in List form
"x1 y1", "x2 y2" // Two vectors
x1, y1, x2, y2 // Four individual floats
#4
06/15/2006 (10:50 am)
That's good to know. I recommend the alternate forms should be added to the .pdf or at least mentioned. Last time I checked, the dumpConsoleClasses() output from the engine described the functions differently than the .pdf. I just confusing is all.
#5
I've been working on adding the overloads as I come across them. If no one gets to them first, it's likely that I'll get to them at some point.
06/15/2006 (6:50 pm)
The dumpConsoleClasses() prints out the text that is associated with each console function in the c code where it is declared. The pdf looks to me like it is just a print out of the data that is on TDN. So you can edit TDN, and the changes will probably appear the next time they generate the pdf.I've been working on adding the overloads as I come across them. If no one gets to them first, it's likely that I'll get to them at some point.
Torque Owner Alex Rice
Default Studio Name
virtual string pickPoint (x/y,[groupMask],[layerMask],[showInvisible?],[excludeObject])
virtual string pickLine (start x/y, end x/y,[groupMask],[layerMask],[showInvisible?],[excludeObject])
virtual string pickRect (start x/y, end x/y,[groupMask],[layerMask],[showInvisible?],[excludeObject])
virtual string pickRadius (x/y, radius,[groupMask],[layerMask],[showInvisible?],[excludeObject])