Click here to Skip to main content
16,005,491 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: which pad.exe do u use to submit software? Pin
James R. Twine7-Mar-06 4:52
James R. Twine7-Mar-06 4:52 
GeneralRe: which pad.exe do u use to submit software? Pin
includeh107-Mar-06 5:02
includeh107-Mar-06 5:02 
GeneralRe: which pad.exe do u use to submit software? Pin
James R. Twine7-Mar-06 5:27
James R. Twine7-Mar-06 5:27 
QuestionRotating a 2D line Pin
FarPointer7-Mar-06 4:16
FarPointer7-Mar-06 4:16 
AnswerRe: Rotating a 2D line Pin
includeh107-Mar-06 4:50
includeh107-Mar-06 4:50 
GeneralRe: Rotating a 2D line Pin
FarPointer7-Mar-06 5:13
FarPointer7-Mar-06 5:13 
AnswerRe: Rotating a 2D line Pin
Andy Moore7-Mar-06 6:04
Andy Moore7-Mar-06 6:04 
AnswerRe: Rotating a 2D line Pin
El Corazon7-Mar-06 8:50
El Corazon7-Mar-06 8:50 
FarPointer wrote:
How can we rotate a 2d line in 3d to get a cone or can anyone point me to any useful resource on this (Open GL).


actually, you are making it too difficult. OpenGL relative to order of operations. So assuming you want to rotate a line 30 degrees you go from this:
glBegin(GL_LINES);
  glVertex3f(0.0f, 0.0f, 0.0f);
  glVertex3f(50.0f, 50.0f, 50.0f);
glEnd();

to this:
glPushMatrix();
glRotatef(30.0,0.0f,1.0f,0.0f);   
// rotate 30 degrees on Y-Axis
// then draw line
glBegin(GL_LINES);
  glVertex3f(0.0f, 0.0f, 0.0f);
  glVertex3f(50.0f, 50.0f, 50.0f);
glEnd();
glPopMatrix();


although the glPushMatrix() and glPopMatrix() are not required operations if you draw another primitive it is relative to the last rotate, push and pop operations restores the rotation matrix to prior to the rotate so that another primitive is relative to the original scene-view not the last rotation.

see this tutorial over at Nehe: Nehe OpenGL tutorial on Rotations[^]

_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
AnswerRe: Rotating a 2D line Pin
Steve Echols7-Mar-06 20:14
Steve Echols7-Mar-06 20:14 
QuestionMaximum size of scrollbars Pin
pgrohs7-Mar-06 3:52
pgrohs7-Mar-06 3:52 
AnswerRe: Maximum size of scrollbars Pin
Gary R. Wheeler7-Mar-06 4:39
Gary R. Wheeler7-Mar-06 4:39 
GeneralRe: Maximum size of scrollbars Pin
pgrohs7-Mar-06 6:16
pgrohs7-Mar-06 6:16 
GeneralRe: Maximum size of scrollbars Pin
Gary R. Wheeler7-Mar-06 6:39
Gary R. Wheeler7-Mar-06 6:39 
AnswerRe: Maximum size of scrollbars Pin
pgrohs7-Mar-06 7:10
pgrohs7-Mar-06 7:10 
GeneralRe: Maximum size of scrollbars Pin
Gary R. Wheeler7-Mar-06 12:23
Gary R. Wheeler7-Mar-06 12:23 
GeneralRe: Maximum size of scrollbars Pin
pgrohs7-Mar-06 22:34
pgrohs7-Mar-06 22:34 
QuestionOk to use unsigned __int64 for an API expecting ULARGE_INTEGER? Pin
dandy727-Mar-06 3:42
dandy727-Mar-06 3:42 
AnswerRe: Ok to use unsigned __int64 for an API expecting ULARGE_INTEGER? Pin
Jack Puppy7-Mar-06 4:18
Jack Puppy7-Mar-06 4:18 
AnswerRe: Ok to use unsigned __int64 for an API expecting ULARGE_INTEGER? Pin
Gary R. Wheeler7-Mar-06 4:42
Gary R. Wheeler7-Mar-06 4:42 
GeneralRe: Ok to use unsigned __int64 for an API expecting ULARGE_INTEGER? Pin
dandy727-Mar-06 7:27
dandy727-Mar-06 7:27 
Questioncomparing two void* values Pin
Amr Shahin7-Mar-06 3:42
Amr Shahin7-Mar-06 3:42 
AnswerRe: comparing two void* values Pin
toxcct7-Mar-06 3:46
toxcct7-Mar-06 3:46 
AnswerRe: comparing two void* values Pin
James R. Twine7-Mar-06 4:12
James R. Twine7-Mar-06 4:12 
QuestionIE Active X Control Pin
folkenmax7-Mar-06 2:46
folkenmax7-Mar-06 2:46 
AnswerRe: IE Active X Control Pin
Stephen Hewitt7-Mar-06 3:17
Stephen Hewitt7-Mar-06 3:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.