Quote:How would I create a Vector3 class that allows for this as I can only figure out a method that would allow me to create a *.Normal.Elements[n] or Triangle.A.Elements[n].Is it operator overloading that you're looking for? (In this case, it would be the [] operator that you'd want to overload.)
Finding the AABB surface normal from an intersection point on AABB
I think so.
Essential I would like to be able to do this:
Vector3 Normal = new Vector3(x,y,z);
Normal[0] would then = x
Normal[1] = y
Normal[2] = z
Is that possible with a Vector3 class? Sorry to sound a little noobish but I have used operators such as *, + and % but I have never come across a [] operator before.
Thanks.
Essential I would like to be able to do this:
Vector3 Normal = new Vector3(x,y,z);
Normal[0] would then = x
Normal[1] = y
Normal[2] = z
Is that possible with a Vector3 class? Sorry to sound a little noobish but I have used operators such as *, + and % but I have never come across a [] operator before.
Thanks.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement