-
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
목차
[meshrandering(완)] 18.4MB
[Debug]
[meshrandering]
meshrandering.ncb
meshrandering.sln
meshrandering.suo.
[그림] 1.74MB
#3(완성).hwp 17p
[Debug]
[meshrandering]
meshrandering.ncb
meshrandering.sln
meshrandering.suo.
[그림] 1.74MB
#3(완성).hwp 17p
본문내용
#3(완성).hwp
1. 소스코드
key 설명 : F1 : 줌 아웃, F2 : 줌 인, F3 : 부드럽게, F4 : 각진 모습, F5 : face 추가 삭제, F6 : wireframe 추가 삭제
#include
#include
#include
#include
#include
#define MAX_V 40000
#define MAX_F 80000
FILE *fp;
struct Vertex{
float x,y,z; //x,y,z coordinates
};
struct Tri{
long vertIDs[3]; //edge information
};
//report 3
struct tnorm{
float vertnorm[3];
int num;
};
struct fnorm{
float facenorm[3];
};
//report 3
struct Mesh{
Vertex verts[MAX_V];
Tri faces[MAX_F];
tnorm tno[MAX_V]; //report 3
fnorm fno[MAX_F]; //report 3
};
long nVerts, nFaces, smfTag;
// for gluLookAt parameters
float cameraPos[3]; //camera position
float cameraLookAt[3]; //camera Look at
float cameraUpvector[3]={0.0f, 1.0f, 0.0f}; // upvector
float lightPos[3];
float linecolor[3]={0.0f, 0.0f, 0.0f}; //black
float surfaceColor[3]={0.8f, 0.8f, 0.8f}; //gray
float g_x_rot,g_y_rot;
float z_near, z_far;
Mesh Cube;
//report 3
int tfnormal = 1;
int faceflag = 0;
int wireflag = 1;
int cameraflag = 0; // zom in, out
float ca[3]; // 최초카메라포지션저장
//report 3
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
meshrandering.vcproj
ProjectType="Visual C++"
Version="9.00"
Name="meshrandering"
ProjectGUID="{18CA07A3-264D-456C-A22A-DA6AB8FFCEC8}"
RootNamespace="meshrandering"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
Name="Win32"
/>
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
>
Name="VCPreBuildEventTool"
/>
Name="VCCustomBuildTool"
/>
Name="VCXMLDataGeneratorTool"
/>
Name="VCWebServiceProxyGeneratorTool"
/>
Name="VCMIDLTool"
/>
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
/>
1. 소스코드
key 설명 : F1 : 줌 아웃, F2 : 줌 인, F3 : 부드럽게, F4 : 각진 모습, F5 : face 추가 삭제, F6 : wireframe 추가 삭제
#include
#include
#include
#include
#include
#define MAX_V 40000
#define MAX_F 80000
FILE *fp;
struct Vertex{
float x,y,z; //x,y,z coordinates
};
struct Tri{
long vertIDs[3]; //edge information
};
//report 3
struct tnorm{
float vertnorm[3];
int num;
};
struct fnorm{
float facenorm[3];
};
//report 3
struct Mesh{
Vertex verts[MAX_V];
Tri faces[MAX_F];
tnorm tno[MAX_V]; //report 3
fnorm fno[MAX_F]; //report 3
};
long nVerts, nFaces, smfTag;
// for gluLookAt parameters
float cameraPos[3]; //camera position
float cameraLookAt[3]; //camera Look at
float cameraUpvector[3]={0.0f, 1.0f, 0.0f}; // upvector
float lightPos[3];
float linecolor[3]={0.0f, 0.0f, 0.0f}; //black
float surfaceColor[3]={0.8f, 0.8f, 0.8f}; //gray
float g_x_rot,g_y_rot;
float z_near, z_far;
Mesh Cube;
//report 3
int tfnormal = 1;
int faceflag = 0;
int wireflag = 1;
int cameraflag = 0; // zom in, out
float ca[3]; // 최초카메라포지션저장
//report 3
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
meshrandering.vcproj
Version="9.00"
Name="meshrandering"
ProjectGUID="{18CA07A3-264D-456C-A22A-DA6AB8FFCEC8}"
RootNamespace="meshrandering"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
/>
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
>
/>
/>
/>
/>
/>
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
/>
추천자료
- 컴퓨터 프로그래밍
- 운영체제에 관한 보고서
- c언어로 작성된 다익스트라(dijkstra알고리즘)
- 자바 달력 출력 프로그램
- 자바 파일입출력
- 컴퓨터과학과 - C프로그래밍 레포트(대체)
- Overloading과 Overriding의 구별
- 자료구조(AVL tree, hash 등)을 이용한 패턴 매칭(Pattern Matching) 구현
- 자료구조(스택, stack)을 이용한 최단 거리 미로 찾기 알고리즘
- 이미지를 로딩하여 보여주고 그에 따른 히스토그램 정보와 파일의 간단한 정보를 출력해주는 ...
- [윈도우프로그래밍] 데이터베이스응용 관리프로그램 - 음원관리 프로그램 : 음악관리,데이터...
- assignment3
- COPYLEFT 관련 site 조사
- 안드로이드 내부/외부 디바이스 용량 확인 및 메모리 확인/정리 APP OS_project
소개글