• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

C++ graphic or Code block glut. Creatoing 3d geomtric solid

 
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to try to this with the octohedran



Here is the problem :

move the object from x y and z axis and Upper case X Y and Z to negative axis

When use lowercase `s' the object should shrink. When is
uppercase `S' is should grow.

And

Mouse-clicking any part of the window should cause your object
to move to that location.
also different color for each face
 
Ranch Hand
Posts: 69
2
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You already have examples of translation (moving along (x, y, z)), rotation, and scaling. Now what you have to do is register mouse and keyboard callbacks with glut to get user input. From within your callcack functions you can maintain the variables needed to do all of the required operations.

PS. You do realize that the fixed function pipeline is deprecated and obsolete, right? Your previous topic made use of the programmable pipeline, but this one took a step back in time.

Cheers,
Luke
 
jin Otanashi
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Luke Leber wrote:You already have examples of translation (moving along (x, y, z)), rotation, and scaling. Now what you have to do is register mouse and keyboard callbacks with glut to get user input. From within your callcack functions you can maintain the variables needed to do all of the required operations.

PS. You do realize that the fixed function pipeline is deprecated and obsolete, right? Your previous topic made use of the programmable pipeline, but this one took a step back in time.

Cheers,
Luke



sorry for the misunderstand, when use press x y z should move to the axis and when X Y Z pressed the objects should be to the opposite direction which is the negative Axis and S should increase the size and s decrease the size. Anyhow, can "case" be using for the keyboard function or/and "if" statement should be use ?? also for the mouse need to be a method?
 
jin Otanashi
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also how do you put face with different color as you see I don't to see line in the octahedron rather cover the interior with different in each face
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic