검색어 입력폼

[OpenGL]OpenGL 3D Transformation 처리

등록일 2006.06.25 파일확장자압축파일 (zip) | 가격 1,200원

소개글

OpenGL로 3D 모델을 transformation 하는 프로그래밍을 한다.
Windows programming 의 이해를 돕고
translate, rotate, scale 에 대한 3D 개념을 잡는다.

컴파일 실행환경

microsoft Visual c++ 6.0
GLUT Library 이용

본문내용

#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <math.h>

#include "glut.h"
#include "wave.h"

const char flower1[] = "flw.obj";
const char flower2[] = "flw2.obj";
const char flower3[] = "flw3.obj";

const double rotateAngle = 10.0;
const double translatePos = 2.0;
const double scaleFactor = 2.0;
GLfloat light_position[] = { 1.0, 1.0, 1.0, 0.0 };

wfObject *g_Obj;

void draw();

wfObject *loadObj(const char *fileName)
{
wfObject *obj;

if (!(obj = wfReadObject((char *) fileName)))
exit(1);
return obj;
}
void translatePolygon(GLfloat tx, GLfloat ty, GLfloat tz)
{
glTranslatef(tx, ty, tz);
draw();

}

압축파일내 파일목록

flw.mtl
flw.obj
flw2.mtl
flw2.obj
flw3.mtl
flw3.obj
Transform3DPolygon.cxx
Transform3DPolygon.dsp
Transform3DPolygon.dsw
Transform3DPolygon.ncb
Transform3DPolygon.opt
Transform3DPolygon.plg
Transform3DPolygon.sln
Transform3DPolygon.suo
Transform3DPolygon.vcproj
사용방법.txt
Debug/BuildLog.htm
Debug/flw.mtl
Debug/flw.obj
Debug/flw2.mtl
Debug/flw2.obj
Debug/flw3.mtl
Debug/flw3.obj
Debug/glut32.dll
Debug/Transform3DPolygon.exe
Debug/Transform3DPolygon.ilk
Debug/Transform3DPolygon.obj
Debug/Transform3DPolygon.pdb
Debug/vc60.idb
Debug/vc60.pdb
Debug/vc70.idb
Debug/vc70.pdb
glut/glut.def
glut/glut.h
glut/glut32.dll
glut/glut32.lib
glut/README-win32.txt
include/glimage.h
include/unixwin32.h
include/wave.h
lib/debug/libgutil.lib
lib/debug/libimage.lib
lib/debug/libwave.lib
lib/debug/unixwin32.lib
lib/release/libgutil.lib
lib/release/libimage.lib
lib/release/libwave.lib
lib/release/unixwin32.lib
libwave/drawobj.c
libwave/drawobj_ogl.c
libwave/initobj.c
libwave/initobj_ogl.c
libwave/libwave.dsp
libwave/libwave.dsw
libwave/libwave.html
libwave/libwave.ncb
libwave/libwave.opt
libwave/libwave.plg
libwave/Makefile
libwave/mem.c
libwave/misc.c
libwave/normals.c
libwave/ray.c
libwave/readmap.c
libwave/README
libwave/readmtl.c
libwave/readobj.c
libwave/transform.c
libwave/wave.h
libwave/writeobj.c
libwave/apps/astronaut.obj.gz
libwave/apps/cone.obj.gz
libwave/apps/cube.obj.gz
libwave/apps/main.c
libwave/apps/Makefile
libwave/apps/maps.map
libwave/apps/master.mtl
libwave/apps/pillar.obj.gz
libwave/apps/portest2.mtl
libwave/apps/portest2.obj.gz
libwave/apps/raycast.c
libwave/apps/sat.mtl
libwave/apps/spin.c
libwave/apps/tex.sgi
libwave/apps/topex.obj.gz
libwave/apps/wfaddnorms.c
libwave/apps/wfaddtex.c
libwave/apps/wfbounds.c
libwave/apps/wfcopy.c
libwave/apps/wfmerge.c
libwave/apps/wfrot.c
libwave/apps/wfscale.c
libwave/apps/wftrans.c
libwave/bak/drawobj.c
libwave/bak/initobj.c
libwave/bak/mem.c
libwave/bak/misc.c
libwave/bak/readmap.c
libwave/bak/readmtl.c
libwave/bak/readobj.c
libwave/bak/wave.h
libwave/Debug/drawobj_ogl.obj
libwave/Debug/initobj_ogl.obj
libwave/Debug/libwave.lib
libwave/Debug/mem.obj
libwave/Debug/misc.obj
libwave/Debug/normals.obj
libwave/Debug/ray.obj
libwave/Debug/readmap.obj
libwave/Debug/readmtl.obj
libwave/Debug/readobj.obj
libwave/Debug/transform.obj
libwave/Debug/vc60.idb
libwave/Debug/vc60.pdb
libwave/Debug/writeobj.obj
libwave/haeberli/libimage.zip
libwave/haeberli/include/acc.h
libwave/haeberli/include/arg.h
libwave/haeberli/include/bitmap.h
libwave/haeberli/include/bufpool.h
libwave/haeberli/include/canvas.h
libwave/haeberli/include/cmap.h
libwave/haeberli/include/colortbl.inc
libwave/haeberli/include/copyright
libwave/haeberli/include/dispimg.h
libwave/haeberli/include/dither.h
libwave/haeberli/include/expr.h
libwave/haeberli/include/filepath.h
libwave/haeberli/include/gfxmach.h
libwave/haeberli/include/glmode.h
libwave/haeberli/include/hipass.h
libwave/haeberli/include/hist.h
libwave/haeberli/include/image.h
libwave/haeberli/include/invmap.h
libwave/haeberli/include/izoom.h
libwave/haeberli/include/lum.h
libwave/haeberli/include/lut.h
libwave/haeberli/include/mesh.h
libwave/haeberli/include/movie.h
libwave/haeberli/include/obj.h
libwave/haeberli/include/objfnt.h
libwave/haeberli/include/path.h
libwave/haeberli/include/pict.h
libwave/haeberli/include/port.h
libwave/haeberli/include/prt.h
libwave/haeberli/include/quant.h
libwave/haeberli/include/rasterfile.h
libwave/haeberli/include/rct.h
libwave/haeberli/include/render.h
libwave/haeberli/include/resource.h
libwave/haeberli/include/rgn.h
libwave/haeberli/include/rle.h
libwave/haeberli/include/setscreen.h
libwave/haeberli/include/sgiobj.h
libwave/haeberli/include/shade.h
libwave/haeberli/include/showcaseui.h
libwave/haeberli/include/simple.h
libwave/haeberli/include/spin.h
libwave/haeberli/include/ss.h
libwave/haeberli/include/stream.h
libwave/haeberli/include/swop.h
libwave/haeberli/include/targa.h
libwave/haeberli/include/textmap.h
libwave/haeberli/include/texture.h
libwave/haeberli/include/tiff.h
libwave/haeberli/include/tiffio.h
libwave/haeberli/include/triangulate.h
libwave/haeberli/include/trilist.h
libwave/haeberli/include/vect.h
libwave/haeberli/include/voronoi.h
libwave/haeberli/libgutil/abekas.c
libwave/haeberli/libgutil/acc.c
libwave/haeberli/libgutil/arg.c
libwave/haeberli/libgutil/bitmap.c
libwave/haeberli/libgutil/bm.c
libwave/haeberli/libgutil/brect.c
libwave/haeberli/libgutil/brush.c
libwave/haeberli/libgutil/bufpool.c
libwave/haeberli/libgutil/charfill.c
libwave/haeberli/libgutil/cmap.c
libwave/haeberli/libgutil/cmyk.c
libwave/haeberli/libgutil/colormod.c
libwave/haeberli/libgutil/copyright
libwave/haeberli/libgutil/corprt3.c
libwave/haeberli/libgutil/corprt4.c
libwave/haeberli/libgutil/dispimg.c
libwave/haeberli/libgutil/dit.c
libwave/haeberli/libgutil/expr.c
libwave/haeberli/libgutil/fastimg.c
libwave/haeberli/libgutil/fastobj.c
libwave/haeberli/libgutil/file.c
libwave/haeberli/libgutil/filepath.c
libwave/haeberli/libgutil/follow.c
libwave/haeberli/libgutil/gamma.c
libwave/haeberli/libgutil/gendit.c
libwave/haeberli/libgutil/geom.c
libwave/haeberli/libgutil/getapixel.c
libwave/haeberli/libgutil/getfile.c
libwave/haeberli/libgutil/getset.c
libwave/haeberli/libgutil/glshade.c
libwave/haeberli/libgutil/glshapes.c
libwave/haeberli/libgutil/glstuff.c
libwave/haeberli/libgutil/handline.c
libwave/haeberli/libgutil/hideline.c
libwave/haeberli/libgutil/hipass.c
libwave/haeberli/libgutil/hist.c
libwave/haeberli/libgutil/homo2.c
libwave/haeberli/libgutil/hypcurve.c
libwave/haeberli/libgutil/imgread.c
libwave/haeberli/libgutil/invmap.c
libwave/haeberli/libgutil/izoom.c
libwave/haeberli/libgutil/libgutil.dsp
libwave/haeberli/libgutil/libgutil.dsw
libwave/haeberli/libgutil/libgutil.ncb
libwave/haeberli/libgutil/libgutil.opt
libwave/haeberli/libgutil/libgutil.plg
libwave/haeberli/libgutil/lut.c
libwave/haeberli/libgutil/makefile
libwave/haeberli/libgutil/manifesto.c
libwave/haeberli/libgutil/matrix.c
libwave/haeberli/libgutil/misc.c
libwave/haeberli/libgutil/miscgl.c
libwave/haeberli/libgutil/movie.c
libwave/haeberli/libgutil/objdraw.c
libwave/haeberli/libgutil/objfnt.c
libwave/haeberli/libgutil/objlib.c
libwave/haeberli/libgutil/objop.c
libwave/haeberli/libgutil/path.c
libwave/haeberli/libgutil/percent.c
libwave/haeberli/libgutil/perlin.c
libwave/haeberli/libgutil/printer.c
libwave/haeberli/libgutil/psimg.c
libwave/haeberli/libgutil/pstri.c
libwave/haeberli/libgutil/qquant.c
libwave/haeberli/libgutil/quant.c
libwave/haeberli/libgutil/rand.c
libwave/haeberli/libgutil/random.c
libwave/haeberli/libgutil/rct.c
libwave/haeberli/libgutil/rctgl.c
libwave/haeberli/libgutil/readme
libwave/haeberli/libgutil/rendchar.c
libwave/haeberli/libgutil/render.c
libwave/haeberli/libgutil/resource.c
libwave/haeberli/libgutil/rgn.c
libwave/haeberli/libgutil/row.c
libwave/haeberli/libgutil/rpc.c
libwave/haeberli/libgutil/sample.c
libwave/haeberli/libgutil/setscreen.c
libwave/haeberli/libgutil/sgiobj.c
libwave/haeberli/libgutil/sgiobjgl.c
libwave/haeberli/libgutil/shade.c
libwave/haeberli/libgutil/shadow.c
libwave/haeberli/libgutil/simptex.c
libwave/haeberli/libgutil/sprender.c
libwave/haeberli/libgutil/sptexture.c
libwave/haeberli/libgutil/stream.c
libwave/haeberli/libgutil/subpix.c
libwave/haeberli/libgutil/textmap.c
libwave/haeberli/libgutil/texture.c
libwave/haeberli/libgutil/tl.c
libwave/haeberli/libgutil/tmeshobj.c
libwave/haeberli/libgutil/tomesh.c
libwave/haeberli/libgutil/track.c
libwave/haeberli/libgutil/turtle.c
libwave/haeberli/libgutil/type1rd.c
libwave/haeberli/libgutil/unmesh.c
libwave/haeberli/libgutil/vcolor.c
libwave/haeberli/libgutil/vect.c
libwave/haeberli/libgutil/vidcomp.c
libwave/haeberli/libgutil/debug/fastimg.obj
libwave/haeberli/libgutil/debug/libgutil.lib
libwave/haeberli/libgutil/debug/vc60.idb
libwave/haeberli/libgutil/debug/vc60.pdb
libwave/haeberli/libgutil/release/fastimg.obj
libwave/haeberli/libgutil/release/libgutil.lib
libwave/haeberli/libgutil/release/vc60.idb
libwave/haeberli/libimage/close.c
libwave/haeberli/libimage/copyright
libwave/haeberli/libimage/filbuf.c
libwave/haeberli/libimage/flsbuf.c
libwave/haeberli/libimage/glimage.h
libwave/haeberli/libimage/imagewin32.h
libwave/haeberli/libimage/libimage.a
libwave/haeberli/libimage/libimage.dsp
libwave/haeberli/libimage/libimage.dsw
libwave/haeberli/libimage/libimage.ncb
libwave/haeberli/libimage/libimage.opt
libwave/haeberli/libimage/libimage.plg
libwave/haeberli/libimage/makefile
libwave/haeberli/libimage/name.c
libwave/haeberli/libimage/open.c
libwave/haeberli/libimage/pix.c
libwave/haeberli/libimage/rdwr.c
libwave/haeberli/libimage/readme
libwave/haeberli/libimage/readme.lp
libwave/haeberli/libimage/rle.c
libwave/haeberli/libimage/row.c
libwave/haeberli/libimage/debug/close.obj
libwave/haeberli/libimage/debug/filbuf.obj
libwave/haeberli/libimage/debug/flsbuf.obj
libwave/haeberli/libimage/debug/libimage.lib
libwave/haeberli/libimage/debug/name.obj
libwave/haeberli/libimage/debug/open.obj
libwave/haeberli/libimage/debug/pix.obj
libwave/haeberli/libimage/debug/rdwr.obj
libwave/haeberli/libimage/debug/rle.obj
libwave/haeberli/libimage/debug/row.obj
libwave/haeberli/libimage/debug/vc60.idb
libwave/haeberli/libimage/debug/vc60.pdb
libwave/haeberli/libimage/Release/close.obj
libwave/haeberli/libimage/Release/filbuf.obj
libwave/haeberli/libimage/Release/flsbuf.obj
libwave/haeberli/libimage/Release/libimage.lib
libwave/haeberli/libimage/Release/name.obj
libwave/haeberli/libimage/Release/open.obj
libwave/haeberli/libimage/Release/pix.obj
libwave/haeberli/libimage/Release/rdwr.obj
libwave/haeberli/libimage/Release/rle.obj
libwave/haeberli/libimage/Release/row.obj
libwave/haeberli/libimage/Release/vc60.idb
libwave/haeberli/libimageold/close.c
libwave/haeberli/libimageold/copyright
libwave/haeberli/libimageold/filbuf.c
libwave/haeberli/libimageold/flsbuf.c
libwave/haeberli/libimageold/glimage.h
libwave/haeberli/libimageold/libimage.a
libwave/haeberli/libimageold/libimage.dsp
libwave/haeberli/libimageold/libimage.dsw
libwave/haeberli/libimageold/libimage.ncb
libwave/haeberli/libimageold/libimage.opt
libwave/haeberli/libimageold/libimage.plg
libwave/haeberli/libimageold/makefile
libwave/haeberli/libimageold/name.c
libwave/haeberli/libimageold/open.c
libwave/haeberli/libimageold/pix.c
libwave/haeberli/libimageold/rdwr.c
libwave/haeberli/libimageold/readme
libwave/haeberli/libimageold/readme.lp
libwave/haeberli/libimageold/rle.c
libwave/haeberli/libimageold/row.c
libwave/haeberli/libimageold/debug/libimage.lib
libwave/haeberli/libimageold/release/libimage.lib
libwave/Release/drawobj_ogl.obj
libwave/Release/initobj_ogl.obj
libwave/Release/libwave.lib
libwave/Release/mem.obj
libwave/Release/misc.obj
libwave/Release/normals.obj
libwave/Release/ray.obj
libwave/Release/readmap.obj
libwave/Release/readmtl.obj
libwave/Release/readobj.obj
libwave/Release/transform.obj
libwave/Release/vc60.idb
libwave/Release/writeobj.obj
libwave/unixwin32/gethostid.c
libwave/unixwin32/getopt.cpp
libwave/unixwin32/getopt.h
libwave/unixwin32/gettimeofday.c
libwave/unixwin32/rint.c
libwave/unixwin32/sleep.c
libwave/unixwin32/unixwin32.dsp
libwave/unixwin32/unixwin32.dsw
libwave/unixwin32/unixwin32.h
libwave/unixwin32/unixwin32.ncb
libwave/unixwin32/unixwin32.opt
libwave/unixwin32/unixwin32.plg
libwave/unixwin32/debug/gethostid.obj
libwave/unixwin32/debug/getopt.obj
libwave/unixwin32/debug/gettimeofday.obj
libwave/unixwin32/debug/rint.obj
libwave/unixwin32/debug/sleep.obj
libwave/unixwin32/debug/vc60.idb
libwave/unixwin32/debug/vc60.pdb
libwave/unixwin32/release/gethostid.obj
libwave/unixwin32/release/getopt.obj
libwave/unixwin32/release/gettimeofday.obj
libwave/unixwin32/release/rint.obj
libwave/unixwin32/release/sleep.obj
libwave/unixwin32/release/unixwin32.lib
libwave/unixwin32/release/vc60.idb
다운로드 맨위로