Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

12046 Posts in 1593 Topics- by 597 Members - Latest Member: Cydfewoot

21. May 2013, 09:14:32 pm
Xith3D CommunityXith3D InternalsDeveloper discussion (Moderators: Marvin Fröhlich, 'n ddrylliog)API design decision: PickListeners
Pages: [1]
Print
Author Topic: API design decision: PickListeners  (Read 1321 times)
hawkwind
Getting respectable
***
Offline Offline

Posts: 365



View Profile Email
« on: 21. February 2007, 12:57:52 am »

Whats the design concept with NearestPickListeners type stuff??  I just resync'd with xith and my picking is now different.  I was wondering what led to this change?? Huh
« Last Edit: 21. February 2007, 01:42:53 am by Marvin Fröhlich » Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #1 on: 21. February 2007, 01:40:51 am »

Whats the design concept with NearestPickListeners type stuff??  I just resync'd with xith and my picking is now different.  I was wondering what led to this change?? Huh

I have changed the picking system to be absolutely GC-friendly. Thsi was only possible by caching the PickResult instances. To not force the user to push the used instances on the heap (which he would forget and which would lead to memory leaking) I used the listener system, which was anyway there for scheduled picking.

btw. If anyone has a better name for "AllPickListener", please tell me.

Marvin
« Last Edit: 21. February 2007, 01:51:40 am by Marvin Fröhlich » Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #2 on: 21. February 2007, 07:28:04 am »

Marvin, why the need to have two different pick listeners ? One interface is sufficient and can be used by the two methods..
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #3 on: 21. February 2007, 11:10:03 am »

Marvin, why the need to have two different pick listeners ? One interface is sufficient and can be used by the two methods..

There's "NearestPickListener" and "AllPickListener". And there's "PickListener", that unites the two. This is usefull to avoid having always one empty phantom method stub, that you won't use. But you can simply use PickListener and you will have what you want.

Marvin
Logged
hawkwind
Getting respectable
***
Offline Offline

Posts: 365



View Profile Email
« Reply #4 on: 21. February 2007, 12:24:53 pm »

thanx for the info
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic