Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#4 easier picking with callback function

closed
nobody
5
2008-03-07
2005-09-21
Anonymous
No

I think it would be very usefull for picking,
if the TGLBaseSceneClass had a callback function like this:

type TCallBackFunction = procedure onPick(invokedBy:
TGLBaseSceneObject);
...
TGLBaseSceneObject =
...
private
FOnPick : TCallBackFunction
...
public
property OnPick : TCallBackFunction read FOnPick
write FOnPick;
...

The Method should be called, whenever the object is
getting picked by the
mouse. In my 'private' glscene-version I use it like
the following:

temp := FSceneViewer.Buffer.GetPickedObject(x, y)
if assigned(temp.callback) then begin
temp.callback(temp);
end;

so it is called by the user, not by glscene itself.

Discussion

  • Da Stranger
    Da Stranger
    2008-03-07

    Logged In: YES
    user_id=1586256
    Originator: NO

    Not a good idea, in my oppinion. Events should be added to a class only if the class can call them during it's normal operation. I don't consider picking objects one of them.

    Closed, because there were no other comments during the last three years.

     
  • Da Stranger
    Da Stranger
    2008-03-07

    • status: open --> closed