I didn't see a forum for OpenGL so i assume it would go here. I've having an issues with my camera interfering with the transformations of my geometry. Here is my Display() code, I think it's pretty straight forward. -
void Display(void)
-
{
-
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
glEnable(GL_DEPTH_TEST);
-
-
eyePos.Set(0,0,10);
-
//this is my wrist position
-
targetPos.Set(GraspEngine.wsPositions.palmContainerMat[12],GraspEngine.wsPositions.palmContainerMat[13],GraspEngine.wsPositions.palmContainerMat[14]);
-
-
//I draw all environment objects here as primitives
-
drawEnvObj();
-
//Render the hand here
-
render();
-
-
//get distance to closest primitive, set color to red, and select motion from primitive struct
-
GraspEngine.GetDistToEnvObj(&GraspEngine.env);
-
-
//reset all transformations and place camera. The PanXYZ variable is a keyboard callback which is set to 0 initially.
-
glMatrixMode(GL_MODELVIEW);
-
glLoadIdentity();
-
gluLookAt(eyePos.GetX()-panX,eyePos.GetY()-panY,eyePos.GetZ()-panZ,
-
targetPos.GetX(),targetPos.GetY(),targetPos.GetZ(),
-
0.0, 1.0, 0.0);
-
-
//output wrist position, it is correct but camera won’t move now. If I place this at the top then the camera moves but the wrist position is thrown off by this transformation
-
-
cout << GraspEngine.wsPositions.wristContainerMat[12] << " " << GraspEngine.wsPositions.wristContainerMat[13] << " " << GraspEngine.wsPositions.wristContainerMat[14] << endl;
-
-
glutSwapBuffers();
-
glutPostRedisplay();
-
}
-
Thanks in advance,
Matt Brisbin
0 968 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: oracle411 |
last post by:
Hi I'm new to OpenGL, but have an OpenGL application written in CPP
that I would like to display on a web browser.
Was wondering how this could be done?
Thank you very much
|
by: Bad_Kid |
last post by:
which is better for what?
|
by: pontifikas |
last post by:
I've be struggling for a few days to make Opengl work in VS using C#.
However, all wrappers I've stambled on(CsGL,
CsGL.Basecode,ColinFahey's wgl etc)
do not provide sufficient info on how to do it.They only give their
own classes and "high level" methods and for someone nwe to C# is
impossible to figure out how they do it.
Has anyone used OpenGL with C#?
|
by: Scott Chang |
last post by:
Hi All
I tried to use the attached OpenGL code to draw a Star-shaped figure on my Microsoft Visual C++ .NET 2002-Windows XP Pro PC. When I did 'Build' in Debug Mode, I got an error C2065: 'RenderScence': undeclared identifier. Please help and tell me (1) what it is wrong with my coding in this program and how to correct the problem, and (2) whether the functions/commands of the OpenGL v1.1 (existing in Microsoft Visual C++ .NET 2002) and GLUT...
|
by: Jessica Weiner |
last post by:
I am writing an application in C# which need to plot graphs and simple
shapes (polygons, circles, squares etc). Which library is better for this
purpose and why? Thanks.
| |
by: jg.campbell.ng |
last post by:
I'm beginning learning Python and OpenGL in Python.
Python fine. But difficulties with OpenGL; presumably with the
installation of OpenGL.
OS = Linux FC5.
Python program gl_test.py:
from OpenGL.GLUT import *
|
by: MC felon |
last post by:
hello.
i have a Dev c++ compiler (version 4.0). i wish to start on openGL. How
do i enable openGL programming in Dev c++? what exactly do i download?
assume me to be a complete fresher and please direct me step-by-step on
how to have a standard openGL setup on Dev c++.
P.S- i do have GLUT, but i reckon it's only part of openGL.
cheers!
thanx!
yours,
|
by: Achim Domma |
last post by:
Hi,
I'm developing a GUI app in Python/C++ to visualize numerical results.
Currently I'm using Python 2.4 with wx and PyOpenGLContext, but there
are no windows binaries for Python 2.5 for quite some time now.
I need a OpenGL context without restrictions and some settings dialogs.
Is wx + PyOpenGL the way to go? Or could somebody recommend a better set
of tools/libs?
|
by: braveheartkenya |
last post by:
Hi,
I'm new to openGL programming. I'm trying to simulate motion and zooming in and out in an SimpleOpenGLControl from the Tao Framework. <So you'll need to install the framework and put in a reference in Visual Studio to 'Tao' in order to test my code>
I've just begun trying to move an object up and down, but i can't seem to get the object to move. i know i'm missing something but i can't figure it out. I think it has to do with loading...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |