hi all.i have two question
1.how to twist surface in visual c++ 6 (by opengl programming)
2.how to do sub Perspective (because i want to do clouds with fog commands)
i will appreciate any help you can give.(its very important for me)
thx all
how to twist surface in visual c++ 6 (by opengl programming)
You’re going to have to give us a lot more details about what you’re trying to do before we can give you any advice. What are you trying to use OpenGL for? Got some code you want ot show us?
Some details that we’d need in order to help you are:
What type of surface are you using (triangles?)
What kind of twist are you trying to do? Do you have any examples of the kind of effect you’re trying to get?
What do you mean by sub Perspective? (although this one might just be me… I’m not familiar with what the sub means)
my intentions for example : you take a solid cube and you twist one of here sides (thats look like after collision with a big rock)
(i am building tank simulation)
you mean simply shift verteces? or a twist like a spiral along an axis. for axis twist the simplest method would most likely be to generate a straight matrix for one end (of scale 1.0) then simply set teh matrix rotation by the distance from teh start along the axis, and multiply each point by the matrix to generate it’s new position (oh and do make sure to cache an undeformed copy of the object before doing the deformation otherwise the changes will be permanent).
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.