IDBitMask Tut7

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
WaxyChicken
Posts: 95
Joined: Sat Jun 25, 2011 6:15 am

IDBitMask Tut7

Post by WaxyChicken »

.

I speak VB and don't speak C, so i'm a bit fuzzy on IDBitMask.

i understand it's a bitwise comparison, but what i'm fuzzy on is:

Suppose you set IDBitMask to x and you cast a ray from pointA->pointB

on the way through A->B the ray first hits a surface with IDBitMask y then past that (if it kept going) that it would hit IDBitMask x

Because the IDBitMask for the ray collision was set to x then does it pass through the y surface and return the location of the x surface collision? or does it stop at y and say it hit nothing because IDBitMask was set for x and not the impacted y?

(sorry if i sound vague)
_______________________________________________________
You could argue with me all day long about which language is best.
But what it comes down to is:
which language is best for YOU and which language is best for ME.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: IDBitMask Tut7

Post by hybrid »

Depends on x and y. But if those are disjunct bitmasks you would get a result on the x node, because nodes which are not using the current mask are kind of invisible
WaxyChicken
Posts: 95
Joined: Sat Jun 25, 2011 6:15 am

Re: IDBitMask Tut7

Post by WaxyChicken »

Image

Do i understand this correctly then?
_______________________________________________________
You could argue with me all day long about which language is best.
But what it comes down to is:
which language is best for YOU and which language is best for ME.
Post Reply