Jump to content
  • Advertisement
Sign in to follow this  
Spa8nky

Finding the AABB surface normal from an intersection point on AABB

This topic is 3275 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.)

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!