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 16 Oct 2012
Offline Last Active Nov 06 2012 03:06 PM

Topics I've Started

Triangle Intersection and Barycentric Coordintes

06 November 2012 - 01:40 AM

Hi all,

So the attached image below is about using barycentric coordinates to solve ray-triangle intersection. I was hoping someone could clear up some of the things that were mentioned in the post.

For the most part, I do understand what P', X, and Y are.

He goes on to say that we should construct a matrix A made up of only the vectors X and Y. After this, multiplying the he says to multiple the inverse of A by P'. But A has no inverse since it's not a square matrix, correct?

Posted Image

Crystal Ball Interface --> FPS

16 October 2012 - 12:33 AM


I currently have a crystal ball interface camera set-up where the camera is always looking at the origin and pressing left,right,up,down simply moves around the object.

I want to change this so that the camera can move around freely around the 3D environment.

I currently have two functions, LEFT and UP that have been implemented as the CB-interface I mentioned.

I want the left and right key to strafe left/right, while up/down to rise and sink the camera. How exactly would I go about changing it?

Also..what would be the proper way to move the camera forward and backward? I was thinking maybe draging the mouse could equate to moving foward/backward?

void Transform::left(float degrees, vec3& eye, vec3& up) {
eye = eye*rotate(degrees, up);

void Transform::up(float degrees, vec3& eye, vec3& up) {
vec3 ortho_axis = glm::cross(eye, up);
ortho_axis = glm::normalize(ortho_axis);

eye = eye*rotate(degrees, ortho_axis);
up = up*rotate(degrees, ortho_axis);