Open GoogleCodeExporter opened 8 years ago
it seems happen here ,it return wrong rayVectors
PLRenderer.h
-(void)createRayWithScreenPoint:(CGPoint)point ray:(PLVector3 **)rayVectors
{
PLPosition pos;
glGetIntegerv(GL_VIEWPORT, viewport);
glGetFloatv(GL_MODELVIEW_MATRIX, mvmatrix);
glGetFloatv(GL_PROJECTION_MATRIX, projmatrix);
float y = (float)viewport[3] - point.y;
gluUnProject(point.x, y, 0.0f, mvmatrix, projmatrix, viewport, &pos.x, &pos.y, &pos.z);
[rayVectors[0] setValuesWithPosition:pos];
gluUnProject(point.x, y, 1.0f, mvmatrix, projmatrix, viewport, &pos.x, &pos.y, &pos.z);
[rayVectors[1] setValuesWithPosition:pos];
}
Original comment by shaojian...@gmail.com
on 13 Aug 2015 at 7:34
i have fixed it
just replace "PLVertex" CGFloat to GLfloat
struct PLVertex
{
GLfloat x, y, z;
};
my blog
http://www.skyfox.org/ios-panoramagl-360-arm64-hotspot.html
Original comment by shaojian...@gmail.com
on 13 Aug 2015 at 8:31
Original issue reported on code.google.com by
shaojian...@gmail.com
on 13 Aug 2015 at 6:35