No problem. BTW, to be more accurate in testing hits, you may create
a shape and then test to see if the (range.clip.x, range.clip.y) point
lies within it. See OvalPortrayal2D for and example.
Sean
On Mar 16, 2011, at 12:21 AM, Horia Suciu wrote:
> Thank you Sean, that worked!
>
>
> On Mon, Feb 21, 2011 at 6:20 PM, Sean Luke <[log in to unmask]> wrote:
> You have your agents portraying themselves. However you did not
> override the hitObject method, so the default is in effect:
>
> public boolean hitObject(Object object, DrawInfo2D range)
> {
> return false;
> }
>
> This means that the agents are refusing to allow MASON to recognize
> them as hit when you double click on them, so MASON can't inspect
> them.
>
> Sean
>
>
> On Feb 21, 2011, at 5:53 PM, Horia Suciu wrote:
>
> I have a simple simulation (attached) which does very little, I am
> new to
> MASON so bear with me.
>
> While running it, I can see the model with no problems but I cannot
> inspect
> the Agents (they have public setters and getters that I would expect
> to be
> able to visualize once I click on the agent)
>
> I am confused on what is wrong with this piece of code. The agents
> and the
> SimState classess are based on examples and straight forward.
>
> The examples works as expected so it is nothing wrong with my
> install...
>
> Any help would be welcome.
> Regards,
> Horia
>
|