Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 12 Jul 2009
Offline Last Active May 01 2015 04:28 PM

Posts I've Made

In Topic: Possible shadow artifact on the caster in a ray-tracer.

22 January 2015 - 06:08 PM

cowsarenotevil, yes that what I mean. Until a few moments before starting to write this thread, the "blackness" was giving me an impression of an artifact.


Ryan I can't see any faint circle on this image. My monitor doesn't have much brightness though. Any ideas of what I could do to see it?

In Topic: Reverse normal in ray-plane intersection

24 November 2014 - 01:22 PM

 You might want to be able to see through the back faces, or to ignore them because you have another plane at the same location but pointing the other way with different material properties.



Well, in my case I am just concerned about using planes to represent things like ground or sky, at least for the time being. So in this case I can ignore this reverse procedure, right ?

In Topic: Problem with arrayList

24 November 2009 - 11:02 AM

It ain't that. Note this code:

[sourcelang="java"]points = positionList.get(3).getPoints() + this.tournamentManager.get(tournamentNumber).getQuarterFinalistPoints();

When the first tourament is executed, the fourth quarterfinalist gets its number of points, which should be zero, since the tournament just finished. Then these points are added to the number of points that a quarterfinalist of the tournamet should receive.
The sum of zero with X points, is then updated to the player's constructor

After the second tournament is executed, then the fourth quarterfinalist of the second event (whoever is), gets its X points from the previous tournament and sum it with the Y points that the quarterfinalist of the second event should receive. After that, the new amount of points is updated.

So my code doesn't depend on the updatePoints method to make the calculation, this is done in the updatePontuation method, the updatePoints one is just a "setter" method.

Any more ideas?

In Topic: Problem with array list in Java

12 July 2009 - 01:18 PM

I think I am understanding right now, "federation" doesn't call System.out.println, and since it is called from inside controlActivities, which, by it's turn, is called by "federationn", in the end is "federationn" that is calling system.out. Due to it, tournamentManager tries to get it's tournament objects, but there is nothing there, they belong to the tournamentManager of "federation", because it was "federation" that created those tournaments and added them to it's "own" tournamentManager list.

At least from a logical point of view this seems to make sense.

In Topic: Problem with array list in Java

12 July 2009 - 01:03 PM

Original post by rip-off
Well, your problem stems from having two Federation instances. You are adding elements to the vector in one and printing them from another.

If you want to move code away from main() you need to create additional classes or functions that do what you want. But that is window dressing, the structure is pretty similar no matter where the code is.

Try this:
*** Source Snippet Removed ***
Note that the use of the "this" reference is unnecessary, but is used mainly for illustration.

It worked. I am somewhat confused about what really is going on. When "federationn" inside main calls controlActivities, all the objects created inside this method are going to belong to it?
So the "federation" created inside controlActivities is part of "federationn"?

I thought objects, created when an object call's a method that creates objects, didn`t belong to anybody, they just "existed".

Or not?
tournamentManager in my example is trying to get objects from where?
Are there two copies of tournamentManager, one belonging to "federation" and other to "federationn"?