Great Idea For An App
I have just been thinking... I you do and well making a 3d cube or triangle takes a could amount of time... for newbies like me well I was thinking wouldn''t it be cool to have an app where insert a point of origin then insert the lenght, width etc.. then have the app generate the code for the shape.. good huh.
Well do you think its possible to make such a thing if it is Im up to making a simple VB app that will
feed back of ideas please... if it will work I''ll have a go at making one.
Alan
IF YA SMELL... WHAT THE BEZZ IS COOKIN''''
November 05, 2000 03:05 PM
I am going to be attempting this very same thing sometime... you can do it in 3D with the user being able to walk around, then select a point and say "yep, I wanna draw a line about 10 units along x away from this point. the line should go for 10 units along x"
That can be done with the right combination of Sine and Cosine.
First I''m making a very basic level editor... then one of the things you described as my modeller/complex level editor.
Keep in mind, that what you''re trying to do is not as easy as it sounds though, it may take a while... (over a week unless you spend all your time doing it)
That can be done with the right combination of Sine and Cosine.
First I''m making a very basic level editor... then one of the things you described as my modeller/complex level editor.
Keep in mind, that what you''re trying to do is not as easy as it sounds though, it may take a while... (over a week unless you spend all your time doing it)
Good luck with yours... at the mo I have made a basic start that will create a square of any size.
Alan
IF YA SMELL... WHAT THE BEZZ IS COOKIN''
Alan
IF YA SMELL... WHAT THE BEZZ IS COOKIN''
maybe u dont already know but with glu u can draw a variety of shapes,objects eg
cylinder,sphere, curves, disk, nurbs etc
http://members.xoom.com/myBollux
cylinder,sphere, curves, disk, nurbs etc
http://members.xoom.com/myBollux
I''ve been doing something along those lines... (I''m sure a lot of people do when they get sick of using glu functions)
I may suck with opengl but I''m decent with C++, so I''ve been creating my own methods in a class for designing shapes and such. Since I have found it much easier and quicker to draw objects at specified points without the hassle of translate and scale. So I just have a function call for various things, which I find I change often when I discover a new attribute that I can apply, like when I learned textures I copy and pasted everything that I could texture correctly and then simply add the texture code for it and made it another method.
Spheres,
Triangles,
Cones,
Cyclinders
Rectangle (covers any box type object xyz, lhw)
Special Rect
I though this was somewhat ingenious (for me at least .. In one app I was drawing rectangular objects with open sides or simply didn''t want to show all sides (for my walls I didn''t want to render the bottoms or tops, who''s going to see them. So created an overload method that took an additional parameter, n boolean array so you could specify which sides to draw.
So it would take .. x, y, z, l, w, h, drawWhich. Then I realized I could do this for other objects, and create spheres with holes punched out in a pattern or create an array for the sphere and do all evens of the array with one texture then the odds with another texture to give a cool looking effect. There is all sorts of things you can do when you create your own methods instead of using the glut or glu ones.
build your own it''s entertaining and a learning experience
I may suck with opengl but I''m decent with C++, so I''ve been creating my own methods in a class for designing shapes and such. Since I have found it much easier and quicker to draw objects at specified points without the hassle of translate and scale. So I just have a function call for various things, which I find I change often when I discover a new attribute that I can apply, like when I learned textures I copy and pasted everything that I could texture correctly and then simply add the texture code for it and made it another method.
Spheres,
Triangles,
Cones,
Cyclinders
Rectangle (covers any box type object xyz, lhw)
Special Rect
I though this was somewhat ingenious (for me at least .. In one app I was drawing rectangular objects with open sides or simply didn''t want to show all sides (for my walls I didn''t want to render the bottoms or tops, who''s going to see them. So created an overload method that took an additional parameter, n boolean array so you could specify which sides to draw.
So it would take .. x, y, z, l, w, h, drawWhich. Then I realized I could do this for other objects, and create spheres with holes punched out in a pattern or create an array for the sphere and do all evens of the array with one texture then the odds with another texture to give a cool looking effect. There is all sorts of things you can do when you create your own methods instead of using the glut or glu ones.
build your own it''s entertaining and a learning experience
Ive been there done that. Go through with it, it certainly sped up my rendering times. =)
Sounds like a cool idea. For a game I''m working on I''ve made a simple routine called glQuad(x,y,w,h,tex) that allows you to pass the position, along with the width, height and a texture. Works nice, I''m sure in a real environment you could use it to make walls grow and shrink and such.
On another note, it''s usually a good idea to come up with your own routines to draw shapes anyways. glu and aux are both usually quite slow. I''ve had many people ask how I got the teapot demo running so fast. I used the actual teapot data (minus the bottom) and drew it myself. Using aux I was getting at most 20fps with the data and a display list I''m getting over 80fps on my system.
Hey I''m sure this would be made a lot easier if you used the function glScalef(float x, float y, float z); it can be used to make objects bigger and smaller and even stretch them out. Best of all, it works like glTranslatef or glRotatef for example
Yeah...the pushing and popping of the matricies is annoying, but otherwise it would be more confusing to have each scale undo th previous one AND do it''s job. Hope that helps you peouple
Open mouth, insert foot
void DrawGLScene(){glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);glLoadIdentity();glTranslatef(0.0f, 0.0f, -8.0f);glQuad(); //Normal SizeglPushMatrix();glScalef(0.5f, 0.5f, 0.5f); //1/2 sizeglQuad();glPopMatrix();glPushMatrix();glScalef(2.0f, 2.0f, 2.0f); //Twice as bigglPopMatrix();glPushMatrix();glScalef(1.0f, 2.0f, 1.0f); //Stretched along Y axisglQuad();glPopMatrix();}
Yeah...the pushing and popping of the matricies is annoying, but otherwise it would be more confusing to have each scale undo th previous one AND do it''s job. Hope that helps you peouple
Open mouth, insert foot
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement