To do this I had to multiply the point I wanted to translate by the modelview matrix. The issue is that the values I get back are the opposite to what's occuring on the screen. ie. if the objects are rotated clockwise on the screen the results I get back are moving anticlockwise.

Do I need to Invert the modelview matrix or somthing like that? Could someone provide code to aid me in this?

//function to do multiplication#include <gl/gl.h>void MultiplyVMatrix(GLfloat* Vertex, GLfloat* Matrix, GLfloat* ResultMatrix){ for(int i=0;i<16;i++) ResultMatrix[i/4]+=Matrix[i]*Vertex[i%4];} **************************************************************//modelview matrix and multiply co-ordinate of cubeGLfloat matrix[16];GLfloat vertex[4]={1,2,-5,1}; //any co-ordinate for testingGLfloat resultmatrix[4]={0,0,0,0};glGetFloatv(GL_MODELVIEW_MATRIX, matrix); //grab the modelview matrixMultiplyVMatrix(vertex,matrix,resultmatrix);

The only reason I know to look for this is that I did something very similar a few weeks ago, so don't feel too bad.

0

Featured Post

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Foreword (May 2015)
This web page has appeared at Google. It's definitely worth considering!
https://www.google.com/about/careers/students/guide-to-technical-development.html
How to Know You are Making a Difference at EE
In August, 2013, one …

Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below.
https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt
https://filedb.experts-exchange.com/incoming/201…