質問編集履歴
41
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -9,6 +9,10 @@
|
|
9
9
|
offsetC*TransC*TransD*world
|
10
10
|
になるそう
|
11
11
|
```
|
12
|
+
|
13
|
+
http://rudora7.blog81.fc2.com/blog-entry-292.html
|
14
|
+
このサイトの参考画像が役にたちそうです。
|
15
|
+
|
12
16
|
|
13
17
|
offsetCは4*4の行列 TransCは4*4の行列 TransDは4*4の行列なので
|
14
18
|
|
40
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,13 +10,9 @@
|
|
10
10
|
になるそう
|
11
11
|
```
|
12
12
|
|
13
|
-
offsetCは4*4の行列 TransCは4*4の行列 TransDは4*4の行列なので
|
13
|
+
offsetCは4*4の行列 TransCは4*4の行列 TransDは4*4の行列なので
|
14
|
-
計算上適合しません。仮にwいれて4*1しても駄目ですよね。
|
15
14
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
スキニング行列が求められたとして、
|
20
16
|
|
21
17
|
|
22
18
|
|
@@ -27,11 +23,14 @@
|
|
27
23
|
|
28
24
|
> 変換後の法線ベクトル
|
29
25
|
=normal*skin6*weight6+normal*skin4*weight4+normal*skin0*weight4+...
|
30
|
-
とあり
|
26
|
+
とありこれを、
|
31
27
|
|
28
|
+
glVertex();
|
29
|
+
glNormal();にいれればいいのではないかと予測がたちました。
|
32
30
|
|
33
31
|
(引用 3D格闘ゲームプログラミング)<フレーム付きモデルの表示>
|
34
32
|
|
35
33
|
初心者ゆえ内容に間違いがあるかもしれないので、真にうけないでください。
|
36
|
-
|
34
|
+
glVertex();
|
35
|
+
glNormal()の考え方はどうでしょうか。
|
37
36
|
すいません。お願いします。
|
39
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,10 +1,7 @@
|
|
1
1
|
追記しました。 Frameの要素を使いモデルを変形していきたいです。
|
2
2
|
|
3
|
-
分からないこと➀...右上腕をあげたいのですが、そのためのスキニング行列は
|
3
|
+
分からないこと➀...右上腕をあげたいのですが、そのためのスキニング行列(1部分)は
|
4
4
|
offsetC*TransC*TransD*world だそうです。
|
5
|
-
|
6
|
-
offsetCは4*4の行列 TransCは4*4の行列 TransDは4*4の行列なのでworldの行列3*1?の行列と
|
7
|
-
計算上適合しません。仮にwいれて4*1しても駄目ですよね。
|
8
5
|
|
9
6
|
```opengl
|
10
7
|
offsetA*TransA*TransB*TransC*TransD*world
|
@@ -12,6 +9,11 @@
|
|
12
9
|
offsetC*TransC*TransD*world
|
13
10
|
になるそう
|
14
11
|
```
|
12
|
+
|
13
|
+
offsetCは4*4の行列 TransCは4*4の行列 TransDは4*4の行列なのでworldの行列3*1?の行列と
|
14
|
+
計算上適合しません。仮にwいれて4*1しても駄目ですよね。
|
15
|
+
|
16
|
+
|
15
17
|
|
16
18
|
|
17
19
|
で仮にスキニング行列が求められたとして、
|
38
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -7,45 +7,10 @@
|
|
7
7
|
計算上適合しません。仮にwいれて4*1しても駄目ですよね。
|
8
8
|
|
9
9
|
```opengl
|
10
|
-
float Frame_Scene_Root[16]={
|
11
|
-
1.000000,0.000000,0.000000,0.000000,
|
12
|
-
0.000000,1.000000,0.000000,0.000000,
|
13
|
-
0.000000,0.000000,1.000000,0.000000,
|
14
|
-
0.000000,0.000000,0.000000,1.000000};
|
15
|
-
|
16
|
-
|
17
|
-
float Frame_body[16]={
|
18
|
-
1.278853,0.000000,-0.000000,0.000000,
|
19
|
-
0.000000,0.000000,1.123165,0.000000,
|
20
|
-
0.000000,-1.470235,0.000000,0.000000,
|
21
|
-
0.135977,2.027985,133.967667,1.000000
|
22
|
-
};
|
23
|
-
|
24
|
-
|
25
|
-
float Frame[16]={
|
26
|
-
1.000000,-0.000000,-0.000000,0.000000,
|
27
|
-
-0.000000,1.000000,0.000000,0.000000,
|
28
|
-
-0.000000,0.000000,1.000000,0.000000,
|
29
|
-
-0.142114,0.000023,-49.556850,1.000000
|
30
|
-
|
31
|
-
};
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
f
|
10
|
+
offsetA*TransA*TransB*TransC*TransD*world
|
11
|
+
offsetB*TransB*TransC*TransD*world
|
12
|
+
offsetC*TransC*TransD*world
|
36
|
-
|
13
|
+
になるそう
|
37
|
-
{ 0.532891,0.645602,0.547015,0.000000,
|
38
|
-
-0.380503,0.760229,-0.526564,0.000000,
|
39
|
-
-0.755807,0.072461,0.650772,0.000000,
|
40
|
-
31.000195,-0.000004,0.000004,1.000000
|
41
|
-
};
|
42
|
-
|
43
|
-
float Bip01_R_UpperArm_FrameTransformMatrix_offet[16]=
|
44
|
-
{-0.941743,-0.646748,0.574719,0.000000,
|
45
|
-
-0.283133,-0.461979,-0.983825,0.000000,
|
46
|
-
0.923060,-1.114919,0.257891,0.000000,
|
47
|
-
-65.499557,30.497688,12.852692,1.000000
|
48
|
-
};
|
49
14
|
```
|
50
15
|
|
51
16
|
|
37
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,139 +1,70 @@
|
|
1
1
|
追記しました。 Frameの要素を使いモデルを変形していきたいです。
|
2
2
|
|
3
|
-
|
4
|
-
|
5
3
|
分からないこと➀...右上腕をあげたいのですが、そのためのスキニング行列は
|
6
|
-
|
7
4
|
offsetC*TransC*TransD*world だそうです。
|
8
5
|
|
9
|
-
|
10
|
-
|
11
6
|
offsetCは4*4の行列 TransCは4*4の行列 TransDは4*4の行列なのでworldの行列3*1?の行列と
|
12
|
-
|
13
7
|
計算上適合しません。仮にwいれて4*1しても駄目ですよね。
|
14
8
|
|
15
|
-
|
16
|
-
|
17
9
|
```opengl
|
18
|
-
|
19
10
|
float Frame_Scene_Root[16]={
|
20
|
-
|
21
11
|
1.000000,0.000000,0.000000,0.000000,
|
22
|
-
|
23
12
|
0.000000,1.000000,0.000000,0.000000,
|
24
|
-
|
25
13
|
0.000000,0.000000,1.000000,0.000000,
|
26
|
-
|
27
|
-
0.000000,0.000000,0.000000,1.000000};
|
14
|
+
0.000000,0.000000,0.000000,1.000000};
|
28
|
-
|
29
|
-
|
30
|
-
|
31
15
|
|
32
16
|
|
33
17
|
float Frame_body[16]={
|
18
|
+
1.278853,0.000000,-0.000000,0.000000,
|
19
|
+
0.000000,0.000000,1.123165,0.000000,
|
20
|
+
0.000000,-1.470235,0.000000,0.000000,
|
21
|
+
0.135977,2.027985,133.967667,1.000000
|
22
|
+
};
|
34
23
|
|
35
|
-
1.278853,0.000000,-0.000000,0.000000,
|
36
24
|
|
25
|
+
float Frame[16]={
|
37
|
-
|
26
|
+
1.000000,-0.000000,-0.000000,0.000000,
|
38
|
-
|
39
|
-
0.000000,
|
27
|
+
-0.000000,1.000000,0.000000,0.000000,
|
40
|
-
|
28
|
+
-0.000000,0.000000,1.000000,0.000000,
|
41
|
-
0.1
|
29
|
+
-0.142114,0.000023,-49.556850,1.000000
|
42
|
-
|
30
|
+
|
43
31
|
};
|
44
32
|
|
45
33
|
|
46
34
|
|
47
|
-
|
48
|
-
|
49
|
-
float Frame
|
35
|
+
float Bip01_R_UpperArm_FrameTransformMatrix
|
50
|
-
|
36
|
+
[16]=
|
37
|
+
{ 0.532891,0.645602,0.547015,0.000000,
|
38
|
+
-0.380503,0.760229,-0.526564,0.000000,
|
39
|
+
-0.755807,0.072461,0.650772,0.000000,
|
51
|
-
1.000
|
40
|
+
31.000195,-0.000004,0.000004,1.000000
|
52
|
-
|
53
|
-
-0.000000,1.000000,0.000000,0.000000,
|
54
|
-
|
55
|
-
-0.000000,0.000000,1.000000,0.000000,
|
56
|
-
|
57
|
-
-0.142114,0.000023,-49.556850,1.000000.........TransD?
|
58
|
-
|
59
|
-
|
60
|
-
|
61
41
|
};
|
62
42
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
float
|
43
|
+
float Bip01_R_UpperArm_FrameTransformMatrix_offet[16]=
|
70
|
-
|
71
|
-
[16]=
|
72
|
-
|
73
|
-
{
|
44
|
+
{-0.941743,-0.646748,0.574719,0.000000,
|
74
|
-
|
75
|
-
-0.
|
45
|
+
-0.283133,-0.461979,-0.983825,0.000000,
|
76
|
-
|
77
|
-
|
46
|
+
0.923060,-1.114919,0.257891,0.000000,
|
78
|
-
|
79
|
-
|
47
|
+
-65.499557,30.497688,12.852692,1.000000
|
80
|
-
|
81
48
|
};
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
float Bip01_R_UpperArm_FrameTransformMatrix_offet[16]=
|
86
|
-
|
87
|
-
{-0.941743,-0.646748,0.574719,0.000000,
|
88
|
-
|
89
|
-
-0.283133,-0.461979,-0.983825,0.000000,
|
90
|
-
|
91
|
-
0.923060,-1.114919,0.257891,0.000000,
|
92
|
-
|
93
|
-
-65.499557,30.497688,12.852692,1.000000.......................offsetC
|
94
|
-
|
95
|
-
};
|
96
|
-
|
97
49
|
```
|
98
|
-
|
99
|
-
(横ではなく、縦列に数値入る気がするのだがしょうがない。)
|
100
|
-
|
101
50
|
|
102
51
|
|
103
52
|
で仮にスキニング行列が求められたとして、
|
104
53
|
|
105
54
|
|
106
55
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
56
|
> 例えば、頂点が保持するフレーム番号が「6.4.0.1」だとすると各フレームのスキニング行列skin6.skin4.skin0.skin1とします。ウエイトをweight6.weight4.weight0weight1とする。頂点座標をposとすると、
|
112
57
|
|
113
|
-
|
114
|
-
|
115
58
|
> 頂点座標
|
116
|
-
|
117
59
|
=pos*skin6*weight6+pos*skin4*weight4+pos*skin0*weight0+pos*skin1*weight1
|
118
60
|
|
119
|
-
|
120
|
-
|
121
61
|
> 変換後の法線ベクトル
|
122
|
-
|
123
62
|
=normal*skin6*weight6+normal*skin4*weight4+normal*skin0*weight4+...
|
124
|
-
|
125
63
|
とありよくわかりません。
|
126
|
-
|
127
|
-
|
128
|
-
|
129
64
|
|
130
65
|
|
131
66
|
(引用 3D格闘ゲームプログラミング)<フレーム付きモデルの表示>
|
132
67
|
|
133
|
-
|
134
|
-
|
135
68
|
初心者ゆえ内容に間違いがあるかもしれないので、真にうけないでください。
|
136
69
|
|
137
|
-
|
138
|
-
|
139
70
|
すいません。お願いします。
|
36
文の変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,12 +1,4 @@
|
|
1
1
|
追記しました。 Frameの要素を使いモデルを変形していきたいです。
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
world座標系は今、モデル全体の移動・回転・拡大縮小とするらしいので、仮にqx,qy,qzとします。
|
6
|
-
|
7
|
-
verte3f()にいれられるのは、qx,qy,qzの3つまでなので。
|
8
|
-
|
9
|
-
(あとでまた調べるので仮に、qx,qy,qzとします。)
|
10
2
|
|
11
3
|
|
12
4
|
|
35
文の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -144,4 +144,4 @@
|
|
144
144
|
|
145
145
|
|
146
146
|
|
147
|
-
|
147
|
+
すいません。お願いします。
|
34
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -144,4 +144,4 @@
|
|
144
144
|
|
145
145
|
|
146
146
|
|
147
|
-
わかるのならお願いします。
|
147
|
+
わかるのならわかる範囲でお願いします。
|
33
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Frameの要素を使いモデルを変形していきたいです。
|
1
|
+
追記しました。 Frameの要素を使いモデルを変形していきたいです。
|
2
2
|
|
3
3
|
|
4
4
|
|
32
文の変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
offsetCは4*4の行列 TransCは4*4の行列 TransDは4*4の行列なのでworldの行列3*1?の行列と
|
20
20
|
|
21
|
-
計算上適合しません。
|
21
|
+
計算上適合しません。仮にwいれて4*1しても駄目ですよね。
|
22
22
|
|
23
23
|
|
24
24
|
|
31
文の変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,63 +2,27 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
|
5
|
+
world座標系は今、モデル全体の移動・回転・拡大縮小とするらしいので、仮にqx,qy,qzとします。
|
6
6
|
|
7
|
-
|
7
|
+
verte3f()にいれられるのは、qx,qy,qzの3つまでなので。
|
8
|
+
|
9
|
+
(あとでまた調べるので仮に、qx,qy,qzとします。)
|
8
10
|
|
9
11
|
|
10
12
|
|
13
|
+
分からないこと➀...右上腕をあげたいのですが、そのためのスキニング行列は
|
11
14
|
|
12
|
-
|
13
|
-
world
|
15
|
+
offsetC*TransC*TransD*world だそうです。
|
14
16
|
|
15
17
|
|
16
18
|
|
19
|
+
offsetCは4*4の行列 TransCは4*4の行列 TransDは4*4の行列なのでworldの行列3*1?の行列と
|
17
20
|
|
18
|
-
|
19
|
-
|
21
|
+
計算上適合しません。
|
20
22
|
|
21
23
|
|
22
24
|
|
23
|
-
例えば、頂点が保持するフレーム番号が「6.4.0.1」だとすると各フレームのスキニング行列skin6.skin4.skin0.skin1とします。ウエイトをweight6.weight4.weight0weight1とする。頂点座標をposとすると、
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
頂点座標
|
28
|
-
|
29
|
-
=pos*skin6*weight6+pos*skin4*weight4+pos*skin0*weight0+pos*skin1*weight1
|
30
|
-
|
31
|
-
> 引用テキスト
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
変換後の法線ベクトル
|
36
|
-
|
37
|
-
=normal*skin6*weight6+normal*skin4*weight4+normal*skin0*weight4+...
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
書いてるなかでweightの数値に関する知識がないので調べなければいけないことに気がつきました。
|
42
|
-
|
43
|
-
weightはweightだし
|
44
|
-
|
45
|
-
どう考えてもglVertex3f()に変形を加えればいいとおもうのですが、よくわかりません以上です。
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
以下はソースコードです。
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
```
|
25
|
+
```opengl
|
56
|
-
|
57
|
-
//ここで#includeしています。
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
//ここはファイルから抜き出した
|
62
26
|
|
63
27
|
float Frame_Scene_Root[16]={
|
64
28
|
|
@@ -68,15 +32,13 @@
|
|
68
32
|
|
69
33
|
0.000000,0.000000,1.000000,0.000000,
|
70
34
|
|
71
|
-
0.000000,0.000000,0.000000,1.000000};
|
35
|
+
0.000000,0.000000,0.000000,1.000000}; ........TransD?
|
72
36
|
|
73
37
|
|
74
38
|
|
75
39
|
|
76
40
|
|
77
|
-
|
41
|
+
float Frame_body[16]={
|
78
|
-
|
79
|
-
|
80
42
|
|
81
43
|
1.278853,0.000000,-0.000000,0.000000,
|
82
44
|
|
@@ -84,15 +46,15 @@
|
|
84
46
|
|
85
47
|
0.000000,-1.470235,0.000000,0.000000,
|
86
48
|
|
87
|
-
0.135977,2.027985,133.967667,1.000000
|
49
|
+
0.135977,2.027985,133.967667,1.000000 ........TransD?
|
88
50
|
|
89
51
|
};
|
90
52
|
|
91
53
|
|
92
54
|
|
93
|
-
float Frame[16]={
|
94
55
|
|
95
56
|
|
57
|
+
float Frame[16]={
|
96
58
|
|
97
59
|
1.000000,-0.000000,-0.000000,0.000000,
|
98
60
|
|
@@ -100,44 +62,86 @@
|
|
100
62
|
|
101
63
|
-0.000000,0.000000,1.000000,0.000000,
|
102
64
|
|
103
|
-
-0.142114,0.000023,-49.556850,1.000000
|
65
|
+
-0.142114,0.000023,-49.556850,1.000000.........TransD?
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
};
|
104
70
|
|
105
71
|
|
106
72
|
|
107
73
|
|
108
74
|
|
109
|
-
float Frame_Bip01_R_UpperArm_TransformMatrix[16]={//upper
|
110
75
|
|
111
|
-
0.532891,0.645602,0.547015,0.000000,
|
112
76
|
|
113
|
-
|
77
|
+
float Bip01_R_UpperArm_FrameTransformMatrix
|
114
78
|
|
115
|
-
|
79
|
+
[16]=
|
116
80
|
|
117
|
-
|
81
|
+
{ 0.532891,0.645602,0.547015,0.000000,
|
118
82
|
|
119
|
-
|
83
|
+
-0.380503,0.760229,-0.526564,0.000000,
|
84
|
+
|
85
|
+
-0.755807,0.072461,0.650772,0.000000,
|
86
|
+
|
87
|
+
31.000195,-0.000004,0.000004,1.000000 .....................TransC
|
88
|
+
|
89
|
+
};
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
float Bip01_R_UpperArm_FrameTransformMatrix_offet[16]=
|
94
|
+
|
95
|
+
{-0.941743,-0.646748,0.574719,0.000000,
|
96
|
+
|
97
|
+
-0.283133,-0.461979,-0.983825,0.000000,
|
98
|
+
|
99
|
+
0.923060,-1.114919,0.257891,0.000000,
|
100
|
+
|
101
|
+
-65.499557,30.497688,12.852692,1.000000.......................offsetC
|
102
|
+
|
103
|
+
};
|
120
104
|
|
121
105
|
```
|
122
106
|
|
123
|
-
横ではなく、縦列に数値入る気がするのだがしょうがない。
|
107
|
+
(横ではなく、縦列に数値入る気がするのだがしょうがない。)
|
124
|
-
|
125
|
-
後、ソースコードが長すぎるから、途中をみないで計算するのは難しい。
|
126
108
|
|
127
109
|
|
128
110
|
|
129
|
-
やったこと、試してみたこと....数値を適当にかけてみた。
|
130
|
-
|
131
|
-
|
111
|
+
で仮にスキニング行列が求められたとして、
|
132
112
|
|
133
113
|
|
134
114
|
|
135
|
-
画像を消した。うまくいかなかった。
|
136
115
|
|
137
116
|
|
138
117
|
|
139
|
-
とか何かしらのポーズになる気がする
|
140
118
|
|
141
|
-
|
119
|
+
> 例えば、頂点が保持するフレーム番号が「6.4.0.1」だとすると各フレームのスキニング行列skin6.skin4.skin0.skin1とします。ウエイトをweight6.weight4.weight0weight1とする。頂点座標をposとすると、
|
142
120
|
|
121
|
+
|
122
|
+
|
123
|
+
> 頂点座標
|
124
|
+
|
125
|
+
=pos*skin6*weight6+pos*skin4*weight4+pos*skin0*weight0+pos*skin1*weight1
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
> 変換後の法線ベクトル
|
130
|
+
|
131
|
+
=normal*skin6*weight6+normal*skin4*weight4+normal*skin0*weight4+...
|
132
|
+
|
133
|
+
とありよくわかりません。
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
(引用 3D格闘ゲームプログラミング)<フレーム付きモデルの表示>
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
初心者ゆえ内容に間違いがあるかもしれないので、真にうけないでください。
|
144
|
+
|
145
|
+
|
146
|
+
|
143
|
-
|
147
|
+
わかるのならお願いします。
|
30
文の変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -132,7 +132,9 @@
|
|
132
132
|
|
133
133
|
|
134
134
|
|
135
|
-
画像を消した。
|
135
|
+
画像を消した。うまくいかなかった。
|
136
|
+
|
137
|
+
|
136
138
|
|
137
139
|
とか何かしらのポーズになる気がする
|
138
140
|
|
29
文の変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -132,11 +132,7 @@
|
|
132
132
|
|
133
133
|
|
134
134
|
|
135
|
-
|
136
|
-
|
137
|
-
![イメージ説明](042c7e453d0a1de3312a79f2375e459b.jpeg)が
|
138
|
-
|
139
|
-
|
135
|
+
画像を消した。あとで追記する可能性も。しないかもいれないけど。
|
140
136
|
|
141
137
|
とか何かしらのポーズになる気がする
|
142
138
|
|
28
文の変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -118,7 +118,7 @@
|
|
118
118
|
|
119
119
|
|
120
120
|
|
121
|
-
|
121
|
+
```
|
122
122
|
|
123
123
|
横ではなく、縦列に数値入る気がするのだがしょうがない。
|
124
124
|
|
27
文の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -126,7 +126,9 @@
|
|
126
126
|
|
127
127
|
|
128
128
|
|
129
|
+
やったこと、試してみたこと....数値を適当にかけてみた。
|
129
130
|
|
131
|
+
右上腕をあげようとした。
|
130
132
|
|
131
133
|
|
132
134
|
|
26
文の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,24 +1,22 @@
|
|
1
|
-
|
1
|
+
Frameの要素を使いモデルを変形していきたいです。
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
|
5
|
+
しかし、何をすればいいのか分かりません。
|
6
6
|
|
7
|
-
どういった手順で計算すればいいのか、手順が知りたいです。何にたしあわせて、どこのAPIに入力すればいいのでしょうか。APIに入力するかも分かりません。詳細が分からないので詳細な質問ができず申し訳ありません!
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
どういった手順で計算すればいいのか、手順が知りたいです。
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
の様になると思う。ただしworld座標系が抜けている。
|
16
8
|
|
17
9
|
|
18
10
|
|
19
11
|
|
20
12
|
|
13
|
+
world座標系は今、vertexに入れてる値なのかなと思います。根拠なし。
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
|
21
|
-
分からないこと
|
19
|
+
分からないこと➀...求めたスキニング行列を使って頂点の座標変換を行う。各頂点が保持しているフレーム番号の配列を使って街頭するフレームのスキニング行列を参照する --意味不明。
|
22
20
|
|
23
21
|
|
24
22
|
|
@@ -34,21 +32,19 @@
|
|
34
32
|
|
35
33
|
|
36
34
|
|
37
|
-
変換後の法線ベクトル
|
35
|
+
変換後の法線ベクトル
|
38
36
|
|
39
37
|
=normal*skin6*weight6+normal*skin4*weight4+normal*skin0*weight4+...
|
40
38
|
|
41
39
|
|
42
40
|
|
43
|
-
|
41
|
+
書いてるなかでweightの数値に関する知識がないので調べなければいけないことに気がつきました。
|
42
|
+
|
43
|
+
weightはweightだし
|
44
|
+
|
45
|
+
どう考えてもglVertex3f()に変形を加えればいいとおもうのですが、よくわかりません以上です。
|
44
46
|
|
45
47
|
|
46
|
-
|
47
|
-
分からないこと➄...どう考えてもmeshにかんしてはglVertex3f()に変形を加えればいいとおもうのですが、よくわかりません以上です。
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
➅間違えてるかどうかの保証はできません。間違いがありましたら、指摘してもらえると助かります。
|
52
48
|
|
53
49
|
|
54
50
|
|
@@ -124,61 +120,9 @@
|
|
124
120
|
|
125
121
|
|
126
122
|
|
123
|
+
横ではなく、縦列に数値入る気がするのだがしょうがない。
|
127
124
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
float temp[16];
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
125
|
+
後、ソースコードが長すぎるから、途中をみないで計算するのは難しい。
|
138
|
-
|
139
|
-
void Ranks( float *temp , float *a, float *b)
|
140
|
-
|
141
|
-
{
|
142
|
-
|
143
|
-
temp[0]=a[0]*b[0]+a[1]*b[4]+a[2]*b[8]+a[3]*b[12];
|
144
|
-
|
145
|
-
temp[1]=a[0]*b[1]+a[1]*b[5]+a[2]*b[9]+a[3]*b[13];
|
146
|
-
|
147
|
-
temp[2]=a[0]*b[2]+a[1]*b[6]+a[2]*b[10]+a[3]*b[14];
|
148
|
-
|
149
|
-
temp[3]=a[0]*b[3]+a[1]*b[7]+a[2]*b[11]+a[3]*b[15];
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
temp[4]=a[4]*b[0]+a[5]*b[4]+a[6]*b[8]+a[7]*b[12];
|
154
|
-
|
155
|
-
temp[5]=a[4]*b[1]+a[5]*b[5]+a[6]*b[9]+a[7]*b[13];
|
156
|
-
|
157
|
-
temp[6]=a[4]*b[2]+a[5]*b[6]+a[6]*b[10]+a[7]*b[14];
|
158
|
-
|
159
|
-
temp[7]=a[4]*b[3]+a[5]*b[7]+a[6]*b[11]+a[7]*b[15];
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
temp[8]=a[8]*b[0]+a[9]*b[4]+a[10]*b[8]+a[11]*b[12];
|
164
|
-
|
165
|
-
temp[9]=a[8]*b[1]+a[9]*b[5]+a[10]*b[9]+a[11]*b[13];
|
166
|
-
|
167
|
-
temp[10]=a[8]*b[2]+a[9]*b[6]+a[10]*b[10]+a[11]*b[14];
|
168
|
-
|
169
|
-
temp[11]=a[8]*b[3]+a[9]*b[7]+a[10]*b[11]+a[11]*b[15];
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
temp[12]=a[12]*b[0]+a[13]*b[4]+a[14]*b[8]+a[15]*b[12];
|
174
|
-
|
175
|
-
temp[13]=a[12]*b[1]+a[13]*b[5]+a[14]*b[9]+a[15]*b[13];
|
176
|
-
|
177
|
-
temp[14]=a[12]*b[2]+a[13]*b[6]+a[14]*b[10]+a[15]*b[14];
|
178
|
-
|
179
|
-
temp[15]=a[12]*b[3]+a[13]*b[7]+a[14]*b[11]+a[15]*b[15];
|
180
|
-
|
181
|
-
}
|
182
126
|
|
183
127
|
|
184
128
|
|
@@ -188,654 +132,12 @@
|
|
188
132
|
|
189
133
|
|
190
134
|
|
191
|
-
|
135
|
+
![イメージ説明](042c7e453d0a1de3312a79f2375e459b.jpeg)が
|
192
136
|
|
193
|
-
|
137
|
+
![イメージ説明](1ae0027435009ce26c8cd97b8299cff8.jpeg)
|
194
138
|
|
139
|
+
とか何かしらのポーズになる気がする
|
195
140
|
|
141
|
+
(引用 3D格闘ゲームプログラミング)
|
196
142
|
|
197
|
-
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
glClearColor(0.0,0.0,0.0,1.0); //(0.8,0.8,1.0,1.0)は白っぽい
|
204
|
-
|
205
|
-
//(0.0.0.0,0.0,1.0);は黒
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
glLoadIdentity();
|
210
|
-
|
211
|
-
gluLookAt(0.4,0.8,0.7,//0.4,0.8,0.7
|
212
|
-
|
213
|
-
0.0, 0.0, 0.0,
|
214
|
-
|
215
|
-
0.0, 1.0, 0.0 );
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
//char ch= getc(fp);でループの数をスキップしました。あと、xファイルは
|
222
|
-
|
223
|
-
|
143
|
+
ロジックうんぬん分からないのでわかる人がいましたらお願いします。
|
224
|
-
|
225
|
-
//MeshNormals[3*b[0]について、b[0]には何行目かが入っています。
|
226
|
-
|
227
|
-
//陰影がついていなくて間違えているかもしれませんが、もう計算した値が
|
228
|
-
|
229
|
-
//ファイルに含まれているといわれたので計算せずにファイルから抜き出しまし
|
230
|
-
|
231
|
-
// した。ただし.objファイルの場合の話。
|
232
|
-
|
233
|
-
//Textureにおいては右腕の位置を動かしているので考えません。
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
float Mesh_tiny[4432*3];
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
FILE *fp;
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
fp=fopen("./src/tiny.x","r");
|
250
|
-
|
251
|
-
static double angle=0.0;
|
252
|
-
|
253
|
-
angle=angle+0.3;
|
254
|
-
|
255
|
-
if(angle>360){angle=0.0;}
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
glRotated (angle,0,1,0);
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
glTranslatef(0.0,0.15,0.0);
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
glScaled(0.0008,0.0008,0.0008);
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
for(int i=0;i<23;i++)
|
272
|
-
|
273
|
-
{
|
274
|
-
|
275
|
-
char ch=fgetc(fp);
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
//printf("%c",ch);
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
}
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
//4432
|
288
|
-
|
289
|
-
for(int i=0;i<((4434-3)+1);i++){
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
fscanf(fp,"%f;%f;%f;,\n\t\t\t\t",&Mesh_tiny[3*i],&Mesh_tiny[3*i+1],&Mesh_tiny[3*i+2]);
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
//printf("%f %f %f;,\n",Mesh_tiny[3*i],Mesh_tiny[3*i+1],Mesh_tiny[3*i+2]);
|
298
|
-
|
299
|
-
}
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
for(int i=0;i<18;i++) //18
|
312
|
-
|
313
|
-
{
|
314
|
-
|
315
|
-
char ch=fgetc(fp);
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
// printf("%c",ch);
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
}
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
int Mesh_tiny_id[(6841*3)]; //6840*3 ?+1?
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
for(int i=0; i<6840+1; ++i){//11275-4436=6840
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
fscanf(fp,"3;%d,%d,%d;,\n\t\t\t\t",&Mesh_tiny_id[3*i+0],&Mesh_tiny_id[3*i+1],
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
&Mesh_tiny_id[3*i+2]);//i=6840
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
//printf("%d,%d,%d;,\n",Mesh_tiny_id[3*i+0],Mesh_tiny_id[3*i+1],
|
352
|
-
|
353
|
-
// Mesh_tiny_id[3*i+2]);
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
}
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
for(int i=0;i<41;i++)//41
|
370
|
-
|
371
|
-
{
|
372
|
-
|
373
|
-
char ch=fgetc(fp);
|
374
|
-
|
375
|
-
//printf("%c",ch);
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
}
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
float MeshNormals[4432*3];
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
for(int i=0; i<(4431)+1;++i) // i<(15711-11280)+1;
|
394
|
-
|
395
|
-
{
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
fscanf(fp,"%f;%f;%f;,\n\t\t\t\t",&MeshNormals[3*i+0],&MeshNormals[3*i+1],&MeshNormals[3*i+2]);
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
//printf("%f %f %f \n",MeshNormals[3*4431+0],MeshNormals[3*4431+1],MeshNormals[3*4431+2]);
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
}
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
for(int i=0;i<20;i++)//20
|
416
|
-
|
417
|
-
{
|
418
|
-
|
419
|
-
char ch=fgetc(fp);
|
420
|
-
|
421
|
-
//printf("%c",ch);
|
422
|
-
|
423
|
-
}
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
int MeshNormals_id[6841*3];
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
for(int i=0; i<6840+1;++i)//6840+1
|
440
|
-
|
441
|
-
{
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
//3*i+0 ,3*i+1 ,3*i+2
|
446
|
-
|
447
|
-
fscanf(fp,"3;%d,%d,%d;,\n\t\t\t\t",&MeshNormals_id[3*i+0],&MeshNormals_id[3*i+1],
|
448
|
-
|
449
|
-
&MeshNormals_id[3*i+2]);
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
//printf("%d %d %d;,\n",MeshNormals_id[3*i+0],MeshNormals_id[3*i+1],MeshNormals_id[3*i+2]);
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
}
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
for(int i=0;i<54;i++)//54 0k
|
464
|
-
|
465
|
-
{
|
466
|
-
|
467
|
-
char ch=fgetc(fp);
|
468
|
-
|
469
|
-
// printf("%c",ch);
|
470
|
-
|
471
|
-
}
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
float Texture[(4432)*2];//26989-22558 //4432
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
for(int i=0; i<4432; ++i) //i<4432
|
484
|
-
|
485
|
-
{
|
486
|
-
|
487
|
-
fscanf(fp,"%f;%f;,\n\t\t\t\t\t",
|
488
|
-
|
489
|
-
&Texture[2*i+0],&Texture[2*i+1]);//[i+0] [i+1] ok
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
//printf("%f,%f\n",Texture[2*i+0],Texture[2*i+1]);
|
496
|
-
|
497
|
-
//0.551922 , 0.238188
|
498
|
-
|
499
|
-
}
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
//weightを読み取る //"Bip01_R_UpperArm"
|
514
|
-
|
515
|
-
for(int i=0; i<368;++i)
|
516
|
-
|
517
|
-
{
|
518
|
-
|
519
|
-
//367
|
520
|
-
|
521
|
-
char ch=getc(fp);
|
522
|
-
|
523
|
-
printf("%c",ch);
|
524
|
-
|
525
|
-
}
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
int weight_id[156];
|
530
|
-
|
531
|
-
for(int i=0; i<156; ++i){
|
532
|
-
|
533
|
-
fscanf(fp,"%d,\n\t\t\t\t\t",&weight_id[i]);
|
534
|
-
|
535
|
-
printf("%d,\n",weight_id[i]);
|
536
|
-
|
537
|
-
}
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
for(int i=0;i<1;++i)
|
544
|
-
|
545
|
-
{
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
char ch=getc(fp);
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
//printf("%c\n",ch);
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
}
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
float weight[156];
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
for(int i=0; i<156;++i){
|
568
|
-
|
569
|
-
fscanf(fp,"%f,\n\t\t\t\t\t",&weight[i]);
|
570
|
-
|
571
|
-
printf("%f,\n",weight[i]);
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
}
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
float offsetMatrix[16];
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
for(int i=0; i<16;++i){
|
586
|
-
|
587
|
-
fscanf(fp,"%f",offsetMatrix[i]);
|
588
|
-
|
589
|
-
}
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
//変換行列*offsetMatrix * 変換行列=右腕のスキニング行列
|
598
|
-
|
599
|
-
Ranks(&temp[0],&Frame_body[0],&Frame_Scene_Root[0]);
|
600
|
-
|
601
|
-
Ranks(&temp[0],&Frame_Bip01_R_UpperArm_TransformMatrix[0],&temp[0]);
|
602
|
-
|
603
|
-
Ranks(&temp[0],&offsetMatrix[0],&temp[0]);
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
//"Bip01_R_UpperArm"
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
//ループの始まり
|
614
|
-
|
615
|
-
for( int i=0; i<6841; ++i) //6841 ok
|
616
|
-
|
617
|
-
{
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
int a[3];
|
622
|
-
|
623
|
-
a[0]=Mesh_tiny_id[(3*i)+0];
|
624
|
-
|
625
|
-
a[1]=Mesh_tiny_id[(3*i)+1];
|
626
|
-
|
627
|
-
a[2]=Mesh_tiny_id[(3*i)+2];
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
// printf("%d ",Mesh_tiny_id[(3*0)]);
|
632
|
-
|
633
|
-
// printf("%d ",Mesh_tiny_id[(3*6840)+1]);
|
634
|
-
|
635
|
-
// printf("%d\n",Mesh_tiny_id[(3*6840)+2]);
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
int b[3];
|
642
|
-
|
643
|
-
b[0]=MeshNormals_id[3*i+0];
|
644
|
-
|
645
|
-
b[1]=MeshNormals_id[3*i+1];
|
646
|
-
|
647
|
-
b[2]=MeshNormals_id[3*i+2];
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
// printf("%d,",b[0]);//MeshNormals_id[3*i+0]);
|
652
|
-
|
653
|
-
// printf("%d,",b[1]);//MeshNormals_id[3*i+1]);
|
654
|
-
|
655
|
-
// printf("%d\n",b[2]);//MeshNormals_id[3*i+2]);
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
int c[3];
|
660
|
-
|
661
|
-
c[0]=Mesh_tiny_id[3*i];
|
662
|
-
|
663
|
-
c[1]=Mesh_tiny_id[3*i+1];
|
664
|
-
|
665
|
-
c[2]=Mesh_tiny_id[3*i+2];
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
//printf("%d, ",c[0]);
|
670
|
-
|
671
|
-
//printf("%d ",c[1]);
|
672
|
-
|
673
|
-
//printf("%d\n",c[2]);
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
glPushMatrix ();
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
glBegin(GL_POLYGON);
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
glNormal3f(MeshNormals[3*b[0]],MeshNormals[3*b[0]+1],MeshNormals[3*b[0]+2]);
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
//Mesh_tiny[3*a[0]]+=temp[0]; Mesh_tiny[3*a[0]+1]+=temp[1]; //Mesh_tiny[3*a[0]+2]+=temp[2];
|
694
|
-
|
695
|
-
glVertex3f(Mesh_tiny[3*a[0]],Mesh_tiny[3*a[0]+1], Mesh_tiny[3*a[0]+2]);
|
696
|
-
|
697
|
-
//61行目
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
//printf("%f;%f;%f\n",Mesh_tiny[3*a[0]],Mesh_tiny[3*a[0]+1],Mesh_tiny[3*a[0]+2]);
|
702
|
-
|
703
|
-
//ok
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
glNormal3f(MeshNormals[3*b[1]+0],MeshNormals[3*b[1]+1],MeshNormals[3*b[1]+2]);
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
glVertex3f(Mesh_tiny[3*a[1]+0],Mesh_tiny[3*a[1]+1],Mesh_tiny[3*a[1]+2]);
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
//printf("%f;%f;%f\n",Mesh_tiny[3*c[1]+0],Mesh_tiny[3*c[1]+1],Mesh_tiny[3*c[1]+2]);
|
720
|
-
|
721
|
-
//0.238188; -12.484819 48.088928
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
glNormal3f(MeshNormals[3*b[2]+0],MeshNormals[3*b[2]+1],MeshNormals[3*b[2]+2]);
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
glVertex3f(Mesh_tiny[3*a[2]+0],Mesh_tiny[3*a[2]+1],Mesh_tiny[3*a[2]+2]);
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
//4431行目 //4434-3行目 ok
|
740
|
-
|
741
|
-
//printf("%f %f %f\n",Mesh_tiny[3*a[2]+0],Mesh_tiny[3*a[2]+1],Mesh_tiny[3*a[2]+2]);
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
glEnd();
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
}
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
fclose(fp);
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
glPopMatrix();
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
}ここで終わり
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
------省略-------------
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
glViewport (0, 0, 600, 573);
|
774
|
-
|
775
|
-
glMatrixMode(GL_PROJECTION);
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
//50.0 1.0,100,
|
780
|
-
|
781
|
-
gluPerspective(32.0,(double)(600/573)
|
782
|
-
|
783
|
-
,1.5f,1000.0f); //40.0 ,1.5f ,10000.0f //40.0 1.0f 1000.0f
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
glMatrixMode(GL_MODELVIEW); //モードを元に戻す
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
glLoadIdentity();
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
glMatrixMode(GL_MODELVIEW); //モードを元に戻す
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
----省略------------
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
//xfile 未完成
|
810
|
-
|
811
|
-
```
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
```xファイル
|
818
|
-
|
819
|
-
SkinWeights {
|
820
|
-
|
821
|
-
"Bip01_R_UpperArm";
|
822
|
-
|
823
|
-
156;............................156の要素がある
|
824
|
-
|
825
|
-
0,---------頂点番号はじまり
|
826
|
-
|
827
|
-
3449,
|
828
|
-
|
829
|
-
3429,
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
....入りきらないので省略。
|
834
|
-
|
835
|
-
-0.941743,-0.646748,0.574719,0.000000,-0.283133,-0.461979,-0.983825,0.000000,0.923060,-1.114919,0.257891,0.000000,-65.499557,30.497688,12.852692,1.000000;;
|
836
|
-
|
837
|
-
...........-0.941743,からoffset行列
|
838
|
-
|
839
|
-
}
|
840
|
-
|
841
|
-
```
|
25
文の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
間違えてるかも知れないし、理解できないので消す。
|
12
12
|
|
13
|
-
|
13
|
+
|
14
14
|
|
15
15
|
の様になると思う。ただしworld座標系が抜けている。
|
16
16
|
|
24
文の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,81 +8,593 @@
|
|
8
8
|
|
9
9
|
|
10
10
|
|
11
|
-
|
11
|
+
間違えてるかも知れないし、理解できないので消す。
|
12
|
+
|
12
|
-
|
13
|
+
--------
|
14
|
+
|
13
|
-
|
15
|
+
の様になると思う。ただしworld座標系が抜けている。
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
|
14
|
-
|
21
|
+
分からないこと➂...求めたスキニング行列を使って頂点の座標変換を行う。各頂点が保持しているフレーム番号の配列を使って街頭するフレームのスキニング行列を参照する --意味不明。
|
22
|
+
|
23
|
+
|
24
|
+
|
15
|
-
|
25
|
+
例えば、頂点が保持するフレーム番号が「6.4.0.1」だとすると各フレームのスキニング行列skin6.skin4.skin0.skin1とします。ウエイトをweight6.weight4.weight0weight1とする。頂点座標をposとすると、
|
26
|
+
|
27
|
+
|
28
|
+
|
16
|
-
|
29
|
+
頂点座標
|
30
|
+
|
31
|
+
=pos*skin6*weight6+pos*skin4*weight4+pos*skin0*weight0+pos*skin1*weight1
|
32
|
+
|
33
|
+
> 引用テキスト
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
変換後の法線ベクトル(法線はどうでもいい)
|
38
|
+
|
39
|
+
=normal*skin6*weight6+normal*skin4*weight4+normal*skin0*weight4+...
|
40
|
+
|
41
|
+
|
42
|
+
|
17
|
-
|
43
|
+
分からないこと➃---書いてるなかでweightの数値に関する知識がないので調べなければいけないことに気がつきました。
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
分からないこと➄...どう考えてもmeshにかんしてはglVertex3f()に変形を加えればいいとおもうのですが、よくわかりません以上です。
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
➅間違えてるかどうかの保証はできません。間違いがありましたら、指摘してもらえると助かります。
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
以下はソースコードです。
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
```c
|
60
|
+
|
61
|
+
//ここで#includeしています。
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
//ここはファイルから抜き出した
|
66
|
+
|
67
|
+
float Frame_Scene_Root[16]={
|
68
|
+
|
69
|
+
1.000000,0.000000,0.000000,0.000000,
|
70
|
+
|
71
|
+
0.000000,1.000000,0.000000,0.000000,
|
72
|
+
|
73
|
+
0.000000,0.000000,1.000000,0.000000,
|
74
|
+
|
75
|
+
0.000000,0.000000,0.000000,1.000000};
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
float Frame_body[16]={
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
1.278853,0.000000,-0.000000,0.000000,
|
86
|
+
|
87
|
+
0.000000,0.000000,1.123165,0.000000,
|
88
|
+
|
89
|
+
0.000000,-1.470235,0.000000,0.000000,
|
90
|
+
|
91
|
+
0.135977,2.027985,133.967667,1.000000
|
92
|
+
|
93
|
+
};
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
float Frame[16]={
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
1.000000,-0.000000,-0.000000,0.000000,
|
102
|
+
|
103
|
+
-0.000000,1.000000,0.000000,0.000000,
|
104
|
+
|
105
|
+
-0.000000,0.000000,1.000000,0.000000,
|
106
|
+
|
107
|
+
-0.142114,0.000023,-49.556850,1.000000};
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
float Frame_Bip01_R_UpperArm_TransformMatrix[16]={//upper
|
114
|
+
|
115
|
+
0.532891,0.645602,0.547015,0.000000,
|
116
|
+
|
117
|
+
-0.380503,0.760229,-0.526564,0.000000,
|
118
|
+
|
119
|
+
-0.755807,0.072461,0.650772,0.000000,
|
120
|
+
|
121
|
+
31.000195,-0.000004,0.000004,1.000000};
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
float temp[16];
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
//理解力がないから、こっちをつかいました
|
138
|
+
|
139
|
+
void Ranks( float *temp , float *a, float *b)
|
140
|
+
|
141
|
+
{
|
142
|
+
|
143
|
+
temp[0]=a[0]*b[0]+a[1]*b[4]+a[2]*b[8]+a[3]*b[12];
|
144
|
+
|
145
|
+
temp[1]=a[0]*b[1]+a[1]*b[5]+a[2]*b[9]+a[3]*b[13];
|
146
|
+
|
147
|
+
temp[2]=a[0]*b[2]+a[1]*b[6]+a[2]*b[10]+a[3]*b[14];
|
148
|
+
|
149
|
+
temp[3]=a[0]*b[3]+a[1]*b[7]+a[2]*b[11]+a[3]*b[15];
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
temp[4]=a[4]*b[0]+a[5]*b[4]+a[6]*b[8]+a[7]*b[12];
|
154
|
+
|
155
|
+
temp[5]=a[4]*b[1]+a[5]*b[5]+a[6]*b[9]+a[7]*b[13];
|
156
|
+
|
157
|
+
temp[6]=a[4]*b[2]+a[5]*b[6]+a[6]*b[10]+a[7]*b[14];
|
158
|
+
|
159
|
+
temp[7]=a[4]*b[3]+a[5]*b[7]+a[6]*b[11]+a[7]*b[15];
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
temp[8]=a[8]*b[0]+a[9]*b[4]+a[10]*b[8]+a[11]*b[12];
|
164
|
+
|
165
|
+
temp[9]=a[8]*b[1]+a[9]*b[5]+a[10]*b[9]+a[11]*b[13];
|
166
|
+
|
167
|
+
temp[10]=a[8]*b[2]+a[9]*b[6]+a[10]*b[10]+a[11]*b[14];
|
168
|
+
|
169
|
+
temp[11]=a[8]*b[3]+a[9]*b[7]+a[10]*b[11]+a[11]*b[15];
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
temp[12]=a[12]*b[0]+a[13]*b[4]+a[14]*b[8]+a[15]*b[12];
|
174
|
+
|
175
|
+
temp[13]=a[12]*b[1]+a[13]*b[5]+a[14]*b[9]+a[15]*b[13];
|
176
|
+
|
177
|
+
temp[14]=a[12]*b[2]+a[13]*b[6]+a[14]*b[10]+a[15]*b[14];
|
178
|
+
|
179
|
+
temp[15]=a[12]*b[3]+a[13]*b[7]+a[14]*b[11]+a[15]*b[15];
|
180
|
+
|
181
|
+
}
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
{
|
192
|
+
|
193
|
+
/* draw in here */
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
glClearColor(0.0,0.0,0.0,1.0); //(0.8,0.8,1.0,1.0)は白っぽい
|
204
|
+
|
205
|
+
//(0.0.0.0,0.0,1.0);は黒
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
glLoadIdentity();
|
210
|
+
|
211
|
+
gluLookAt(0.4,0.8,0.7,//0.4,0.8,0.7
|
212
|
+
|
213
|
+
0.0, 0.0, 0.0,
|
214
|
+
|
215
|
+
0.0, 1.0, 0.0 );
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
//char ch= getc(fp);でループの数をスキップしました。あと、xファイルは
|
222
|
+
|
223
|
+
//読みやすいように改ざんしました。
|
224
|
+
|
225
|
+
//MeshNormals[3*b[0]について、b[0]には何行目かが入っています。
|
226
|
+
|
227
|
+
//陰影がついていなくて間違えているかもしれませんが、もう計算した値が
|
228
|
+
|
229
|
+
//ファイルに含まれているといわれたので計算せずにファイルから抜き出しまし
|
230
|
+
|
231
|
+
// した。ただし.objファイルの場合の話。
|
232
|
+
|
233
|
+
//Textureにおいては右腕の位置を動かしているので考えません。
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
float Mesh_tiny[4432*3];
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
FILE *fp;
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
fp=fopen("./src/tiny.x","r");
|
250
|
+
|
251
|
+
static double angle=0.0;
|
252
|
+
|
253
|
+
angle=angle+0.3;
|
254
|
+
|
255
|
+
if(angle>360){angle=0.0;}
|
256
|
+
|
257
|
+
|
18
258
|
|
19
259
|
glRotated (angle,0,1,0);
|
20
260
|
|
261
|
+
|
262
|
+
|
21
263
|
glTranslatef(0.0,0.15,0.0);
|
22
264
|
|
265
|
+
|
266
|
+
|
23
267
|
glScaled(0.0008,0.0008,0.0008);
|
24
268
|
|
25
|
-
|
26
|
-
|
27
|
-
f
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
0
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
269
|
+
|
270
|
+
|
271
|
+
for(int i=0;i<23;i++)
|
272
|
+
|
273
|
+
{
|
274
|
+
|
275
|
+
char ch=fgetc(fp);
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
//printf("%c",ch);
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
}
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
//4432
|
288
|
+
|
289
|
+
for(int i=0;i<((4434-3)+1);i++){
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
fscanf(fp,"%f;%f;%f;,\n\t\t\t\t",&Mesh_tiny[3*i],&Mesh_tiny[3*i+1],&Mesh_tiny[3*i+2]);
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
//printf("%f %f %f;,\n",Mesh_tiny[3*i],Mesh_tiny[3*i+1],Mesh_tiny[3*i+2]);
|
298
|
+
|
299
|
+
}
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
for(int i=0;i<18;i++) //18
|
312
|
+
|
313
|
+
{
|
314
|
+
|
315
|
+
char ch=fgetc(fp);
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
// printf("%c",ch);
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
}
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
int Mesh_tiny_id[(6841*3)]; //6840*3 ?+1?
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
for(int i=0; i<6840+1; ++i){//11275-4436=6840
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
fscanf(fp,"3;%d,%d,%d;,\n\t\t\t\t",&Mesh_tiny_id[3*i+0],&Mesh_tiny_id[3*i+1],
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
&Mesh_tiny_id[3*i+2]);//i=6840
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
//printf("%d,%d,%d;,\n",Mesh_tiny_id[3*i+0],Mesh_tiny_id[3*i+1],
|
352
|
+
|
353
|
+
// Mesh_tiny_id[3*i+2]);
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
}
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
for(int i=0;i<41;i++)//41
|
370
|
+
|
371
|
+
{
|
372
|
+
|
373
|
+
char ch=fgetc(fp);
|
374
|
+
|
375
|
+
//printf("%c",ch);
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
}
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
float MeshNormals[4432*3];
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
for(int i=0; i<(4431)+1;++i) // i<(15711-11280)+1;
|
394
|
+
|
395
|
+
{
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
fscanf(fp,"%f;%f;%f;,\n\t\t\t\t",&MeshNormals[3*i+0],&MeshNormals[3*i+1],&MeshNormals[3*i+2]);
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
//printf("%f %f %f \n",MeshNormals[3*4431+0],MeshNormals[3*4431+1],MeshNormals[3*4431+2]);
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
}
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
for(int i=0;i<20;i++)//20
|
416
|
+
|
417
|
+
{
|
418
|
+
|
419
|
+
char ch=fgetc(fp);
|
420
|
+
|
421
|
+
//printf("%c",ch);
|
422
|
+
|
423
|
+
}
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
int MeshNormals_id[6841*3];
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
for(int i=0; i<6840+1;++i)//6840+1
|
440
|
+
|
441
|
+
{
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
//3*i+0 ,3*i+1 ,3*i+2
|
446
|
+
|
447
|
+
fscanf(fp,"3;%d,%d,%d;,\n\t\t\t\t",&MeshNormals_id[3*i+0],&MeshNormals_id[3*i+1],
|
448
|
+
|
449
|
+
&MeshNormals_id[3*i+2]);
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
//printf("%d %d %d;,\n",MeshNormals_id[3*i+0],MeshNormals_id[3*i+1],MeshNormals_id[3*i+2]);
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
}
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
for(int i=0;i<54;i++)//54 0k
|
464
|
+
|
465
|
+
{
|
466
|
+
|
467
|
+
char ch=fgetc(fp);
|
468
|
+
|
469
|
+
// printf("%c",ch);
|
470
|
+
|
471
|
+
}
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
float Texture[(4432)*2];//26989-22558 //4432
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
for(int i=0; i<4432; ++i) //i<4432
|
484
|
+
|
485
|
+
{
|
486
|
+
|
487
|
+
fscanf(fp,"%f;%f;,\n\t\t\t\t\t",
|
488
|
+
|
489
|
+
&Texture[2*i+0],&Texture[2*i+1]);//[i+0] [i+1] ok
|
490
|
+
|
491
|
+
|
492
|
+
|
493
|
+
|
494
|
+
|
495
|
+
//printf("%f,%f\n",Texture[2*i+0],Texture[2*i+1]);
|
496
|
+
|
497
|
+
//0.551922 , 0.238188
|
498
|
+
|
499
|
+
}
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
|
510
|
+
|
511
|
+
|
512
|
+
|
513
|
+
//weightを読み取る //"Bip01_R_UpperArm"
|
514
|
+
|
515
|
+
for(int i=0; i<368;++i)
|
516
|
+
|
517
|
+
{
|
518
|
+
|
519
|
+
//367
|
520
|
+
|
521
|
+
char ch=getc(fp);
|
522
|
+
|
523
|
+
printf("%c",ch);
|
524
|
+
|
525
|
+
}
|
526
|
+
|
527
|
+
|
528
|
+
|
529
|
+
int weight_id[156];
|
530
|
+
|
531
|
+
for(int i=0; i<156; ++i){
|
532
|
+
|
533
|
+
fscanf(fp,"%d,\n\t\t\t\t\t",&weight_id[i]);
|
534
|
+
|
535
|
+
printf("%d,\n",weight_id[i]);
|
536
|
+
|
537
|
+
}
|
538
|
+
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
for(int i=0;i<1;++i)
|
544
|
+
|
545
|
+
{
|
546
|
+
|
547
|
+
|
548
|
+
|
549
|
+
char ch=getc(fp);
|
550
|
+
|
551
|
+
|
552
|
+
|
553
|
+
//printf("%c\n",ch);
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
}
|
558
|
+
|
559
|
+
|
560
|
+
|
561
|
+
|
562
|
+
|
563
|
+
float weight[156];
|
564
|
+
|
565
|
+
|
566
|
+
|
567
|
+
for(int i=0; i<156;++i){
|
568
|
+
|
569
|
+
fscanf(fp,"%f,\n\t\t\t\t\t",&weight[i]);
|
570
|
+
|
571
|
+
printf("%f,\n",weight[i]);
|
572
|
+
|
573
|
+
|
574
|
+
|
575
|
+
}
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
|
580
|
+
|
581
|
+
float offsetMatrix[16];
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
for(int i=0; i<16;++i){
|
586
|
+
|
587
|
+
fscanf(fp,"%f",offsetMatrix[i]);
|
588
|
+
|
589
|
+
}
|
590
|
+
|
591
|
+
|
592
|
+
|
593
|
+
|
594
|
+
|
595
|
+
|
596
|
+
|
597
|
+
//変換行列*offsetMatrix * 変換行列=右腕のスキニング行列
|
86
598
|
|
87
599
|
Ranks(&temp[0],&Frame_body[0],&Frame_Scene_Root[0]);
|
88
600
|
|
@@ -92,775 +604,195 @@
|
|
92
604
|
|
93
605
|
|
94
606
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
=
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
//
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
te
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
gl
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
glClearColor(0.0,0.0,0.0,1.0); //(0.8,0.8,1.0,1.0)は白っぽい
|
284
|
-
|
285
|
-
//(0.0.0.0,0.0,1.0);は黒
|
607
|
+
//"Bip01_R_UpperArm"
|
608
|
+
|
609
|
+
|
610
|
+
|
611
|
+
|
612
|
+
|
613
|
+
//ループの始まり
|
614
|
+
|
615
|
+
for( int i=0; i<6841; ++i) //6841 ok
|
616
|
+
|
617
|
+
{
|
618
|
+
|
619
|
+
|
620
|
+
|
621
|
+
int a[3];
|
622
|
+
|
623
|
+
a[0]=Mesh_tiny_id[(3*i)+0];
|
624
|
+
|
625
|
+
a[1]=Mesh_tiny_id[(3*i)+1];
|
626
|
+
|
627
|
+
a[2]=Mesh_tiny_id[(3*i)+2];
|
628
|
+
|
629
|
+
|
630
|
+
|
631
|
+
// printf("%d ",Mesh_tiny_id[(3*0)]);
|
632
|
+
|
633
|
+
// printf("%d ",Mesh_tiny_id[(3*6840)+1]);
|
634
|
+
|
635
|
+
// printf("%d\n",Mesh_tiny_id[(3*6840)+2]);
|
636
|
+
|
637
|
+
|
638
|
+
|
639
|
+
|
640
|
+
|
641
|
+
int b[3];
|
642
|
+
|
643
|
+
b[0]=MeshNormals_id[3*i+0];
|
644
|
+
|
645
|
+
b[1]=MeshNormals_id[3*i+1];
|
646
|
+
|
647
|
+
b[2]=MeshNormals_id[3*i+2];
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
// printf("%d,",b[0]);//MeshNormals_id[3*i+0]);
|
652
|
+
|
653
|
+
// printf("%d,",b[1]);//MeshNormals_id[3*i+1]);
|
654
|
+
|
655
|
+
// printf("%d\n",b[2]);//MeshNormals_id[3*i+2]);
|
656
|
+
|
657
|
+
|
658
|
+
|
659
|
+
int c[3];
|
660
|
+
|
661
|
+
c[0]=Mesh_tiny_id[3*i];
|
662
|
+
|
663
|
+
c[1]=Mesh_tiny_id[3*i+1];
|
664
|
+
|
665
|
+
c[2]=Mesh_tiny_id[3*i+2];
|
666
|
+
|
667
|
+
|
668
|
+
|
669
|
+
//printf("%d, ",c[0]);
|
670
|
+
|
671
|
+
//printf("%d ",c[1]);
|
672
|
+
|
673
|
+
//printf("%d\n",c[2]);
|
674
|
+
|
675
|
+
|
676
|
+
|
677
|
+
glPushMatrix ();
|
678
|
+
|
679
|
+
|
680
|
+
|
681
|
+
glBegin(GL_POLYGON);
|
682
|
+
|
683
|
+
|
684
|
+
|
685
|
+
|
686
|
+
|
687
|
+
glNormal3f(MeshNormals[3*b[0]],MeshNormals[3*b[0]+1],MeshNormals[3*b[0]+2]);
|
688
|
+
|
689
|
+
|
690
|
+
|
691
|
+
|
692
|
+
|
693
|
+
//Mesh_tiny[3*a[0]]+=temp[0]; Mesh_tiny[3*a[0]+1]+=temp[1]; //Mesh_tiny[3*a[0]+2]+=temp[2];
|
694
|
+
|
695
|
+
glVertex3f(Mesh_tiny[3*a[0]],Mesh_tiny[3*a[0]+1], Mesh_tiny[3*a[0]+2]);
|
696
|
+
|
697
|
+
//61行目
|
698
|
+
|
699
|
+
|
700
|
+
|
701
|
+
//printf("%f;%f;%f\n",Mesh_tiny[3*a[0]],Mesh_tiny[3*a[0]+1],Mesh_tiny[3*a[0]+2]);
|
702
|
+
|
703
|
+
//ok
|
704
|
+
|
705
|
+
|
706
|
+
|
707
|
+
|
708
|
+
|
709
|
+
glNormal3f(MeshNormals[3*b[1]+0],MeshNormals[3*b[1]+1],MeshNormals[3*b[1]+2]);
|
710
|
+
|
711
|
+
|
712
|
+
|
713
|
+
|
714
|
+
|
715
|
+
glVertex3f(Mesh_tiny[3*a[1]+0],Mesh_tiny[3*a[1]+1],Mesh_tiny[3*a[1]+2]);
|
716
|
+
|
717
|
+
|
718
|
+
|
719
|
+
//printf("%f;%f;%f\n",Mesh_tiny[3*c[1]+0],Mesh_tiny[3*c[1]+1],Mesh_tiny[3*c[1]+2]);
|
720
|
+
|
721
|
+
//0.238188; -12.484819 48.088928
|
722
|
+
|
723
|
+
|
724
|
+
|
725
|
+
|
726
|
+
|
727
|
+
|
728
|
+
|
729
|
+
glNormal3f(MeshNormals[3*b[2]+0],MeshNormals[3*b[2]+1],MeshNormals[3*b[2]+2]);
|
730
|
+
|
731
|
+
|
732
|
+
|
733
|
+
glVertex3f(Mesh_tiny[3*a[2]+0],Mesh_tiny[3*a[2]+1],Mesh_tiny[3*a[2]+2]);
|
734
|
+
|
735
|
+
|
736
|
+
|
737
|
+
|
738
|
+
|
739
|
+
//4431行目 //4434-3行目 ok
|
740
|
+
|
741
|
+
//printf("%f %f %f\n",Mesh_tiny[3*a[2]+0],Mesh_tiny[3*a[2]+1],Mesh_tiny[3*a[2]+2]);
|
742
|
+
|
743
|
+
|
744
|
+
|
745
|
+
glEnd();
|
746
|
+
|
747
|
+
|
748
|
+
|
749
|
+
}
|
750
|
+
|
751
|
+
|
752
|
+
|
753
|
+
fclose(fp);
|
754
|
+
|
755
|
+
|
756
|
+
|
757
|
+
glPopMatrix();
|
758
|
+
|
759
|
+
|
760
|
+
|
761
|
+
}ここで終わり
|
762
|
+
|
763
|
+
|
764
|
+
|
765
|
+
|
766
|
+
|
767
|
+
------省略-------------
|
768
|
+
|
769
|
+
|
770
|
+
|
771
|
+
|
772
|
+
|
773
|
+
glViewport (0, 0, 600, 573);
|
774
|
+
|
775
|
+
glMatrixMode(GL_PROJECTION);
|
776
|
+
|
777
|
+
|
778
|
+
|
779
|
+
//50.0 1.0,100,
|
780
|
+
|
781
|
+
gluPerspective(32.0,(double)(600/573)
|
782
|
+
|
783
|
+
,1.5f,1000.0f); //40.0 ,1.5f ,10000.0f //40.0 1.0f 1000.0f
|
784
|
+
|
785
|
+
|
786
|
+
|
787
|
+
|
788
|
+
|
789
|
+
glMatrixMode(GL_MODELVIEW); //モードを元に戻す
|
286
790
|
|
287
791
|
|
288
792
|
|
289
793
|
glLoadIdentity();
|
290
794
|
|
291
|
-
|
795
|
+
|
292
|
-
|
293
|
-
0.0, 0.0, 0.0,
|
294
|
-
|
295
|
-
0.0, 1.0, 0.0 );
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
//char ch= getc(fp);でループの数をスキップしました。あと、xファイルは
|
302
|
-
|
303
|
-
//読みやすいように改ざんしました。
|
304
|
-
|
305
|
-
//MeshNormals[3*b[0]について、b[0]には何行目かが入っています。
|
306
|
-
|
307
|
-
//陰影がついていなくて間違えているかもしれませんが、もう計算した値が
|
308
|
-
|
309
|
-
//ファイルに含まれているといわれたので計算せずにファイルから抜き出しまし
|
310
|
-
|
311
|
-
// した。ただし.objファイルの場合の話。
|
312
|
-
|
313
|
-
//Textureにおいては右腕の位置を動かしているので考えません。
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
float Mesh_tiny[4432*3];
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
FILE *fp;
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
fp=fopen("./src/tiny.x","r");
|
330
|
-
|
331
|
-
static double angle=0.0;
|
332
|
-
|
333
|
-
angle=angle+0.3;
|
334
|
-
|
335
|
-
if(angle>360){angle=0.0;}
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
glRotated (angle,0,1,0);
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
glTranslatef(0.0,0.15,0.0);
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
glScaled(0.0008,0.0008,0.0008);
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
for(int i=0;i<23;i++)
|
352
|
-
|
353
|
-
{
|
354
|
-
|
355
|
-
char ch=fgetc(fp);
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
//printf("%c",ch);
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
}
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
//4432
|
368
|
-
|
369
|
-
for(int i=0;i<((4434-3)+1);i++){
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
fscanf(fp,"%f;%f;%f;,\n\t\t\t\t",&Mesh_tiny[3*i],&Mesh_tiny[3*i+1],&Mesh_tiny[3*i+2]);
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
//printf("%f %f %f;,\n",Mesh_tiny[3*i],Mesh_tiny[3*i+1],Mesh_tiny[3*i+2]);
|
378
|
-
|
379
|
-
}
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
for(int i=0;i<18;i++) //18
|
392
|
-
|
393
|
-
{
|
394
|
-
|
395
|
-
char ch=fgetc(fp);
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
// printf("%c",ch);
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
}
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
int Mesh_tiny_id[(6841*3)]; //6840*3 ?+1?
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
for(int i=0; i<6840+1; ++i){//11275-4436=6840
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
fscanf(fp,"3;%d,%d,%d;,\n\t\t\t\t",&Mesh_tiny_id[3*i+0],&Mesh_tiny_id[3*i+1],
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
&Mesh_tiny_id[3*i+2]);//i=6840
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
//printf("%d,%d,%d;,\n",Mesh_tiny_id[3*i+0],Mesh_tiny_id[3*i+1],
|
432
|
-
|
433
|
-
// Mesh_tiny_id[3*i+2]);
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
}
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
for(int i=0;i<41;i++)//41
|
450
|
-
|
451
|
-
{
|
452
|
-
|
453
|
-
char ch=fgetc(fp);
|
454
|
-
|
455
|
-
//printf("%c",ch);
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
}
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
float MeshNormals[4432*3];
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
for(int i=0; i<(4431)+1;++i) // i<(15711-11280)+1;
|
474
|
-
|
475
|
-
{
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
fscanf(fp,"%f;%f;%f;,\n\t\t\t\t",&MeshNormals[3*i+0],&MeshNormals[3*i+1],&MeshNormals[3*i+2]);
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
//printf("%f %f %f \n",MeshNormals[3*4431+0],MeshNormals[3*4431+1],MeshNormals[3*4431+2]);
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
}
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
for(int i=0;i<20;i++)//20
|
496
|
-
|
497
|
-
{
|
498
|
-
|
499
|
-
char ch=fgetc(fp);
|
500
|
-
|
501
|
-
//printf("%c",ch);
|
502
|
-
|
503
|
-
}
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
int MeshNormals_id[6841*3];
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
for(int i=0; i<6840+1;++i)//6840+1
|
520
|
-
|
521
|
-
{
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
//3*i+0 ,3*i+1 ,3*i+2
|
526
|
-
|
527
|
-
fscanf(fp,"3;%d,%d,%d;,\n\t\t\t\t",&MeshNormals_id[3*i+0],&MeshNormals_id[3*i+1],
|
528
|
-
|
529
|
-
&MeshNormals_id[3*i+2]);
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
//printf("%d %d %d;,\n",MeshNormals_id[3*i+0],MeshNormals_id[3*i+1],MeshNormals_id[3*i+2]);
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
}
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
for(int i=0;i<54;i++)//54 0k
|
544
|
-
|
545
|
-
{
|
546
|
-
|
547
|
-
char ch=fgetc(fp);
|
548
|
-
|
549
|
-
// printf("%c",ch);
|
550
|
-
|
551
|
-
}
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
float Texture[(4432)*2];//26989-22558 //4432
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
for(int i=0; i<4432; ++i) //i<4432
|
564
|
-
|
565
|
-
{
|
566
|
-
|
567
|
-
fscanf(fp,"%f;%f;,\n\t\t\t\t\t",
|
568
|
-
|
569
|
-
&Texture[2*i+0],&Texture[2*i+1]);//[i+0] [i+1] ok
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
//printf("%f,%f\n",Texture[2*i+0],Texture[2*i+1]);
|
576
|
-
|
577
|
-
//0.551922 , 0.238188
|
578
|
-
|
579
|
-
}
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
//weightを読み取る //"Bip01_R_UpperArm"
|
594
|
-
|
595
|
-
for(int i=0; i<368;++i)
|
596
|
-
|
597
|
-
{
|
598
|
-
|
599
|
-
//367
|
600
|
-
|
601
|
-
char ch=getc(fp);
|
602
|
-
|
603
|
-
printf("%c",ch);
|
604
|
-
|
605
|
-
}
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
int weight_id[156];
|
610
|
-
|
611
|
-
for(int i=0; i<156; ++i){
|
612
|
-
|
613
|
-
fscanf(fp,"%d,\n\t\t\t\t\t",&weight_id[i]);
|
614
|
-
|
615
|
-
printf("%d,\n",weight_id[i]);
|
616
|
-
|
617
|
-
}
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
for(int i=0;i<1;++i)
|
624
|
-
|
625
|
-
{
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
char ch=getc(fp);
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
//printf("%c\n",ch);
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
}
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
float weight[156];
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
for(int i=0; i<156;++i){
|
648
|
-
|
649
|
-
fscanf(fp,"%f,\n\t\t\t\t\t",&weight[i]);
|
650
|
-
|
651
|
-
printf("%f,\n",weight[i]);
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
}
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
float offsetMatrix[16];
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
for(int i=0; i<16;++i){
|
666
|
-
|
667
|
-
fscanf(fp,"%f",offsetMatrix[i]);
|
668
|
-
|
669
|
-
}
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
//変換行列*offsetMatrix * 変換行列=右腕のスキニング行列
|
678
|
-
|
679
|
-
Ranks(&temp[0],&Frame_body[0],&Frame_Scene_Root[0]);
|
680
|
-
|
681
|
-
Ranks(&temp[0],&Frame_Bip01_R_UpperArm_TransformMatrix[0],&temp[0]);
|
682
|
-
|
683
|
-
Ranks(&temp[0],&offsetMatrix[0],&temp[0]);
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
//"Bip01_R_UpperArm"
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
//ループの始まり
|
694
|
-
|
695
|
-
for( int i=0; i<6841; ++i) //6841 ok
|
696
|
-
|
697
|
-
{
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
int a[3];
|
702
|
-
|
703
|
-
a[0]=Mesh_tiny_id[(3*i)+0];
|
704
|
-
|
705
|
-
a[1]=Mesh_tiny_id[(3*i)+1];
|
706
|
-
|
707
|
-
a[2]=Mesh_tiny_id[(3*i)+2];
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
// printf("%d ",Mesh_tiny_id[(3*0)]);
|
712
|
-
|
713
|
-
// printf("%d ",Mesh_tiny_id[(3*6840)+1]);
|
714
|
-
|
715
|
-
// printf("%d\n",Mesh_tiny_id[(3*6840)+2]);
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
int b[3];
|
722
|
-
|
723
|
-
b[0]=MeshNormals_id[3*i+0];
|
724
|
-
|
725
|
-
b[1]=MeshNormals_id[3*i+1];
|
726
|
-
|
727
|
-
b[2]=MeshNormals_id[3*i+2];
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
// printf("%d,",b[0]);//MeshNormals_id[3*i+0]);
|
732
|
-
|
733
|
-
// printf("%d,",b[1]);//MeshNormals_id[3*i+1]);
|
734
|
-
|
735
|
-
// printf("%d\n",b[2]);//MeshNormals_id[3*i+2]);
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
int c[3];
|
740
|
-
|
741
|
-
c[0]=Mesh_tiny_id[3*i];
|
742
|
-
|
743
|
-
c[1]=Mesh_tiny_id[3*i+1];
|
744
|
-
|
745
|
-
c[2]=Mesh_tiny_id[3*i+2];
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
//printf("%d, ",c[0]);
|
750
|
-
|
751
|
-
//printf("%d ",c[1]);
|
752
|
-
|
753
|
-
//printf("%d\n",c[2]);
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
glPushMatrix ();
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
glBegin(GL_POLYGON);
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
glNormal3f(MeshNormals[3*b[0]],MeshNormals[3*b[0]+1],MeshNormals[3*b[0]+2]);
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
//Mesh_tiny[3*a[0]]+=temp[0]; Mesh_tiny[3*a[0]+1]+=temp[1]; //Mesh_tiny[3*a[0]+2]+=temp[2];
|
774
|
-
|
775
|
-
glVertex3f(Mesh_tiny[3*a[0]],Mesh_tiny[3*a[0]+1], Mesh_tiny[3*a[0]+2]);
|
776
|
-
|
777
|
-
//61行目
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
//printf("%f;%f;%f\n",Mesh_tiny[3*a[0]],Mesh_tiny[3*a[0]+1],Mesh_tiny[3*a[0]+2]);
|
782
|
-
|
783
|
-
//ok
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
glNormal3f(MeshNormals[3*b[1]+0],MeshNormals[3*b[1]+1],MeshNormals[3*b[1]+2]);
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
glVertex3f(Mesh_tiny[3*a[1]+0],Mesh_tiny[3*a[1]+1],Mesh_tiny[3*a[1]+2]);
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
//printf("%f;%f;%f\n",Mesh_tiny[3*c[1]+0],Mesh_tiny[3*c[1]+1],Mesh_tiny[3*c[1]+2]);
|
800
|
-
|
801
|
-
//0.238188; -12.484819 48.088928
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
glNormal3f(MeshNormals[3*b[2]+0],MeshNormals[3*b[2]+1],MeshNormals[3*b[2]+2]);
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
glVertex3f(Mesh_tiny[3*a[2]+0],Mesh_tiny[3*a[2]+1],Mesh_tiny[3*a[2]+2]);
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
//4431行目 //4434-3行目 ok
|
820
|
-
|
821
|
-
//printf("%f %f %f\n",Mesh_tiny[3*a[2]+0],Mesh_tiny[3*a[2]+1],Mesh_tiny[3*a[2]+2]);
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
glEnd();
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
}
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
fclose(fp);
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
glPopMatrix();
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
}ここで終わり
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
------省略-------------
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
glViewport (0, 0, 600, 573);
|
854
|
-
|
855
|
-
glMatrixMode(GL_PROJECTION);
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
//50.0 1.0,100,
|
860
|
-
|
861
|
-
gluPerspective(32.0,(double)(600/573)
|
862
|
-
|
863
|
-
,1.5f,1000.0f); //40.0 ,1.5f ,10000.0f //40.0 1.0f 1000.0f
|
864
796
|
|
865
797
|
|
866
798
|
|
@@ -870,18 +802,6 @@
|
|
870
802
|
|
871
803
|
|
872
804
|
|
873
|
-
glLoadIdentity();
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
glMatrixMode(GL_MODELVIEW); //モードを元に戻す
|
882
|
-
|
883
|
-
|
884
|
-
|
885
805
|
----省略------------
|
886
806
|
|
887
807
|
|
23
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -108,7 +108,7 @@
|
|
108
108
|
|
109
109
|
頂点座標
|
110
110
|
|
111
|
-
=pos*skin6*weight6+skin4*weight4+skin0*weight0+skin1*weight1
|
111
|
+
=pos*skin6*weight6+pos*skin4*weight4+pos*skin0*weight0+pos*skin1*weight1
|
112
112
|
|
113
113
|
> 引用テキスト
|
114
114
|
|
22
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -108,7 +108,7 @@
|
|
108
108
|
|
109
109
|
頂点座標
|
110
110
|
|
111
|
-
=pos*skin6*weight6+
|
111
|
+
=pos*skin6*weight6+skin4*weight4+skin0*weight0+skin1*weight1
|
112
112
|
|
113
113
|
> 引用テキスト
|
114
114
|
|
21
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -838,9 +838,7 @@
|
|
838
838
|
|
839
839
|
|
840
840
|
|
841
|
-
|
841
|
+
}ここで終わり
|
842
|
-
|
843
|
-
|
844
842
|
|
845
843
|
|
846
844
|
|
20
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -138,6 +138,8 @@
|
|
138
138
|
|
139
139
|
```c
|
140
140
|
|
141
|
+
//ここで#includeしています。
|
142
|
+
|
141
143
|
|
142
144
|
|
143
145
|
//ここはファイルから抜き出した
|
@@ -264,6 +266,10 @@
|
|
264
266
|
|
265
267
|
|
266
268
|
|
269
|
+
|
270
|
+
|
271
|
+
{
|
272
|
+
|
267
273
|
/* draw in here */
|
268
274
|
|
269
275
|
|
@@ -890,7 +896,7 @@
|
|
890
896
|
|
891
897
|
|
892
898
|
|
893
|
-
```
|
899
|
+
```xファイル
|
894
900
|
|
895
901
|
SkinWeights {
|
896
902
|
|
19
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -304,7 +304,7 @@
|
|
304
304
|
|
305
305
|
// した。ただし.objファイルの場合の話。
|
306
306
|
|
307
|
-
//Textureにおいては右腕を
|
307
|
+
//Textureにおいては右腕の位置を動かしているので考えません。
|
308
308
|
|
309
309
|
|
310
310
|
|
18
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,8 +8,6 @@
|
|
8
8
|
|
9
9
|
|
10
10
|
|
11
|
-
|
12
|
-
|
13
11
|
(開発環境は苦労して手に入れたのでふせさせていただきます)
|
14
12
|
|
15
13
|
|
@@ -38,8 +36,6 @@
|
|
38
36
|
|
39
37
|
|
40
38
|
|
41
|
-
|
42
|
-
|
43
39
|
float Frame_body[16]={
|
44
40
|
|
45
41
|
|
@@ -102,8 +98,6 @@
|
|
102
98
|
|
103
99
|
|
104
100
|
|
105
|
-
|
106
|
-
|
107
101
|
分からないこと➂...求めたスキニング行列を使って頂点の座標変換を行う。各頂点が保持しているフレーム番号の配列を使って街頭するフレームのスキニング行列を参照する --意味不明。
|
108
102
|
|
109
103
|
|
@@ -126,15 +120,15 @@
|
|
126
120
|
|
127
121
|
|
128
122
|
|
129
|
-
|
123
|
+
分からないこと➃---書いてるなかでweightの数値に関する知識がないので調べなければいけないことに気がつきました。
|
130
|
-
|
131
|
-
|
132
|
-
|
124
|
+
|
125
|
+
|
126
|
+
|
133
|
-
分からないこと
|
127
|
+
分からないこと➄...どう考えてもmeshにかんしてはglVertex3f()に変形を加えればいいとおもうのですが、よくわかりません以上です。
|
128
|
+
|
129
|
+
|
130
|
+
|
134
|
-
|
131
|
+
➅間違えてるかどうかの保証はできません。間違いがありましたら、指摘してもらえると助かります。
|
135
|
-
|
136
|
-
|
137
|
-
|
138
132
|
|
139
133
|
|
140
134
|
|
@@ -592,7 +586,7 @@
|
|
592
586
|
|
593
587
|
//weightを読み取る //"Bip01_R_UpperArm"
|
594
588
|
|
595
|
-
for(int i=0; i<368;++i)
|
589
|
+
for(int i=0; i<368;++i)
|
596
590
|
|
597
591
|
{
|
598
592
|
|
@@ -814,8 +808,6 @@
|
|
814
808
|
|
815
809
|
|
816
810
|
|
817
|
-
//printf("%f;%f;%f\n",Texture[3*c[2]+0],Texture[3*c[2]+1],Texture[3*c[2]+2]);
|
818
|
-
|
819
811
|
|
820
812
|
|
821
813
|
//4431行目 //4434-3行目 ok
|
17
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -108,10 +108,16 @@
|
|
108
108
|
|
109
109
|
|
110
110
|
|
111
|
+
例えば、頂点が保持するフレーム番号が「6.4.0.1」だとすると各フレームのスキニング行列skin6.skin4.skin0.skin1とします。ウエイトをweight6.weight4.weight0weight1とする。頂点座標をposとすると、
|
112
|
+
|
113
|
+
|
114
|
+
|
111
115
|
頂点座標
|
112
116
|
|
113
117
|
=pos*skin6*weight6+pos*skin4*weight4+pos*skin0*weight0+pos*skin1*weight1
|
114
118
|
|
119
|
+
> 引用テキスト
|
120
|
+
|
115
121
|
|
116
122
|
|
117
123
|
変換後の法線ベクトル(法線はどうでもいい)
|
16
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -910,7 +910,9 @@
|
|
910
910
|
|
911
911
|
....入りきらないので省略。
|
912
912
|
|
913
|
-
-0.941743,-0.646748,0.574719,0.000000,-0.283133,-0.461979,-0.983825,0.000000,0.923060,-1.114919,0.257891,0.000000,-65.499557,30.497688,12.852692,1.000000;;
|
913
|
+
-0.941743,-0.646748,0.574719,0.000000,-0.283133,-0.461979,-0.983825,0.000000,0.923060,-1.114919,0.257891,0.000000,-65.499557,30.497688,12.852692,1.000000;;
|
914
|
+
|
915
|
+
...........-0.941743,からoffset行列
|
914
916
|
|
915
917
|
}
|
916
918
|
|
15
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -108,22 +108,26 @@
|
|
108
108
|
|
109
109
|
|
110
110
|
|
111
|
+
頂点座標
|
112
|
+
|
113
|
+
=pos*skin6*weight6+pos*skin4*weight4+pos*skin0*weight0+pos*skin1*weight1
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
変換後の法線ベクトル(法線はどうでもいい)
|
118
|
+
|
119
|
+
=normal*skin6*weight6+normal*skin4*weight4+normal*skin0*weight4+...
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
111
125
|
|
112
126
|
|
113
127
|
分からないこと➃...どう考えてもmeshにかんしてはglVertex3f()に変形を加えればいいとおもうのですが、よくわかりません以上です。
|
114
128
|
|
115
129
|
|
116
130
|
|
117
|
-
頂点座標
|
118
|
-
|
119
|
-
=pos*skin6*weight6+pos*skin4*weight4+pos*skin0*weight0+pos*skin1*weight1
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
変換後の法線ベクトル(法線はどうでもいい)
|
124
|
-
|
125
|
-
=normal*skin6*weight6+normal*skin4*weight4+normal*skin0*weight4+...
|
126
|
-
|
127
131
|
|
128
132
|
|
129
133
|
|
14
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,7 +2,9 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
だけど、何をすればいいのか分かりません。
|
6
|
+
|
5
|
-
|
7
|
+
どういった手順で計算すればいいのか、手順が知りたいです。何にたしあわせて、どこのAPIに入力すればいいのでしょうか。APIに入力するかも分かりません。詳細が分からないので詳細な質問ができず申し訳ありません!
|
6
8
|
|
7
9
|
|
8
10
|
|
@@ -22,8 +24,6 @@
|
|
22
24
|
|
23
25
|
glScaled(0.0008,0.0008,0.0008);
|
24
26
|
|
25
|
-
|
26
|
-
|
27
27
|
●分からないこと➁---スキニング行列をだすのだがworld座標系がわからない。
|
28
28
|
|
29
29
|
float Frame_Scene_Root[16]={
|
@@ -84,16 +84,588 @@
|
|
84
84
|
|
85
85
|
|
86
86
|
|
87
|
+
//参考書籍には、モデル全体の移動、回転、拡大、縮小を表す行列worldに
|
88
|
+
|
89
|
+
胴体フレームの変換行列をかけると書いてある。
|
90
|
+
|
91
|
+
Ranks(&temp[0],&Frame_body[0],&Frame_Scene_Root[0]);
|
92
|
+
|
93
|
+
Ranks(&temp[0],&Frame_Bip01_R_UpperArm_TransformMatrix[0],&temp[0]);
|
94
|
+
|
95
|
+
Ranks(&temp[0],&offsetMatrix[0],&temp[0]);
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
の様になると思う。ただしworld座標系が抜けている。
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
分からないこと➂...求めたスキニング行列を使って頂点の座標変換を行う。各頂点が保持しているフレーム番号の配列を使って街頭するフレームのスキニング行列を参照する --意味不明。
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
分からないこと➃...どう考えてもmeshにかんしてはglVertex3f()に変形を加えればいいとおもうのですが、よくわかりません以上です。
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
頂点座標
|
118
|
+
|
119
|
+
=pos*skin6*weight6+pos*skin4*weight4+pos*skin0*weight0+pos*skin1*weight1
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
変換後の法線ベクトル(法線はどうでもいい)
|
124
|
+
|
125
|
+
=normal*skin6*weight6+normal*skin4*weight4+normal*skin0*weight4+...
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
以下はソースコードです。
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
```c
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
//ここはファイルから抜き出した
|
140
|
+
|
141
|
+
float Frame_Scene_Root[16]={
|
142
|
+
|
143
|
+
1.000000,0.000000,0.000000,0.000000,
|
144
|
+
|
145
|
+
0.000000,1.000000,0.000000,0.000000,
|
146
|
+
|
147
|
+
0.000000,0.000000,1.000000,0.000000,
|
148
|
+
|
149
|
+
0.000000,0.000000,0.000000,1.000000};
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
float Frame_body[16]={
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
1.278853,0.000000,-0.000000,0.000000,
|
160
|
+
|
161
|
+
0.000000,0.000000,1.123165,0.000000,
|
162
|
+
|
163
|
+
0.000000,-1.470235,0.000000,0.000000,
|
164
|
+
|
165
|
+
0.135977,2.027985,133.967667,1.000000
|
166
|
+
|
167
|
+
};
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
float Frame[16]={
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
1.000000,-0.000000,-0.000000,0.000000,
|
176
|
+
|
177
|
+
-0.000000,1.000000,0.000000,0.000000,
|
178
|
+
|
179
|
+
-0.000000,0.000000,1.000000,0.000000,
|
180
|
+
|
181
|
+
-0.142114,0.000023,-49.556850,1.000000};
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
float Frame_Bip01_R_UpperArm_TransformMatrix[16]={//upper
|
188
|
+
|
189
|
+
0.532891,0.645602,0.547015,0.000000,
|
190
|
+
|
191
|
+
-0.380503,0.760229,-0.526564,0.000000,
|
192
|
+
|
193
|
+
-0.755807,0.072461,0.650772,0.000000,
|
194
|
+
|
195
|
+
31.000195,-0.000004,0.000004,1.000000};
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
float temp[16];
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
//理解力がないから、こっちをつかいました
|
212
|
+
|
213
|
+
void Ranks( float *temp , float *a, float *b)
|
214
|
+
|
215
|
+
{
|
216
|
+
|
217
|
+
temp[0]=a[0]*b[0]+a[1]*b[4]+a[2]*b[8]+a[3]*b[12];
|
218
|
+
|
219
|
+
temp[1]=a[0]*b[1]+a[1]*b[5]+a[2]*b[9]+a[3]*b[13];
|
220
|
+
|
221
|
+
temp[2]=a[0]*b[2]+a[1]*b[6]+a[2]*b[10]+a[3]*b[14];
|
222
|
+
|
223
|
+
temp[3]=a[0]*b[3]+a[1]*b[7]+a[2]*b[11]+a[3]*b[15];
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
temp[4]=a[4]*b[0]+a[5]*b[4]+a[6]*b[8]+a[7]*b[12];
|
228
|
+
|
229
|
+
temp[5]=a[4]*b[1]+a[5]*b[5]+a[6]*b[9]+a[7]*b[13];
|
230
|
+
|
231
|
+
temp[6]=a[4]*b[2]+a[5]*b[6]+a[6]*b[10]+a[7]*b[14];
|
232
|
+
|
233
|
+
temp[7]=a[4]*b[3]+a[5]*b[7]+a[6]*b[11]+a[7]*b[15];
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
temp[8]=a[8]*b[0]+a[9]*b[4]+a[10]*b[8]+a[11]*b[12];
|
238
|
+
|
239
|
+
temp[9]=a[8]*b[1]+a[9]*b[5]+a[10]*b[9]+a[11]*b[13];
|
240
|
+
|
241
|
+
temp[10]=a[8]*b[2]+a[9]*b[6]+a[10]*b[10]+a[11]*b[14];
|
242
|
+
|
243
|
+
temp[11]=a[8]*b[3]+a[9]*b[7]+a[10]*b[11]+a[11]*b[15];
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
temp[12]=a[12]*b[0]+a[13]*b[4]+a[14]*b[8]+a[15]*b[12];
|
248
|
+
|
249
|
+
temp[13]=a[12]*b[1]+a[13]*b[5]+a[14]*b[9]+a[15]*b[13];
|
250
|
+
|
251
|
+
temp[14]=a[12]*b[2]+a[13]*b[6]+a[14]*b[10]+a[15]*b[14];
|
252
|
+
|
253
|
+
temp[15]=a[12]*b[3]+a[13]*b[7]+a[14]*b[11]+a[15]*b[15];
|
254
|
+
|
255
|
+
}
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
/* draw in here */
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
glClearColor(0.0,0.0,0.0,1.0); //(0.8,0.8,1.0,1.0)は白っぽい
|
274
|
+
|
275
|
+
//(0.0.0.0,0.0,1.0);は黒
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
glLoadIdentity();
|
280
|
+
|
281
|
+
gluLookAt(0.4,0.8,0.7,//0.4,0.8,0.7
|
282
|
+
|
283
|
+
0.0, 0.0, 0.0,
|
284
|
+
|
285
|
+
0.0, 1.0, 0.0 );
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
//char ch= getc(fp);でループの数をスキップしました。あと、xファイルは
|
292
|
+
|
293
|
+
//読みやすいように改ざんしました。
|
294
|
+
|
295
|
+
//MeshNormals[3*b[0]について、b[0]には何行目かが入っています。
|
296
|
+
|
297
|
+
//陰影がついていなくて間違えているかもしれませんが、もう計算した値が
|
298
|
+
|
299
|
+
//ファイルに含まれているといわれたので計算せずにファイルから抜き出しまし
|
300
|
+
|
301
|
+
// した。ただし.objファイルの場合の話。
|
302
|
+
|
303
|
+
//Textureにおいては右腕をあげる話をしているので考えません。
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
float Mesh_tiny[4432*3];
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
FILE *fp;
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
fp=fopen("./src/tiny.x","r");
|
320
|
+
|
321
|
+
static double angle=0.0;
|
322
|
+
|
323
|
+
angle=angle+0.3;
|
324
|
+
|
325
|
+
if(angle>360){angle=0.0;}
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
glRotated (angle,0,1,0);
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
glTranslatef(0.0,0.15,0.0);
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
glScaled(0.0008,0.0008,0.0008);
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
for(int i=0;i<23;i++)
|
342
|
+
|
343
|
+
{
|
344
|
+
|
345
|
+
char ch=fgetc(fp);
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
//printf("%c",ch);
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
}
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
//4432
|
358
|
+
|
359
|
+
for(int i=0;i<((4434-3)+1);i++){
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
fscanf(fp,"%f;%f;%f;,\n\t\t\t\t",&Mesh_tiny[3*i],&Mesh_tiny[3*i+1],&Mesh_tiny[3*i+2]);
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
//printf("%f %f %f;,\n",Mesh_tiny[3*i],Mesh_tiny[3*i+1],Mesh_tiny[3*i+2]);
|
368
|
+
|
369
|
+
}
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
for(int i=0;i<18;i++) //18
|
382
|
+
|
383
|
+
{
|
384
|
+
|
385
|
+
char ch=fgetc(fp);
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
// printf("%c",ch);
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
}
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
int Mesh_tiny_id[(6841*3)]; //6840*3 ?+1?
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
for(int i=0; i<6840+1; ++i){//11275-4436=6840
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
fscanf(fp,"3;%d,%d,%d;,\n\t\t\t\t",&Mesh_tiny_id[3*i+0],&Mesh_tiny_id[3*i+1],
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
&Mesh_tiny_id[3*i+2]);//i=6840
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
//printf("%d,%d,%d;,\n",Mesh_tiny_id[3*i+0],Mesh_tiny_id[3*i+1],
|
422
|
+
|
423
|
+
// Mesh_tiny_id[3*i+2]);
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
}
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
for(int i=0;i<41;i++)//41
|
440
|
+
|
441
|
+
{
|
442
|
+
|
443
|
+
char ch=fgetc(fp);
|
444
|
+
|
445
|
+
//printf("%c",ch);
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
}
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
float MeshNormals[4432*3];
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
for(int i=0; i<(4431)+1;++i) // i<(15711-11280)+1;
|
464
|
+
|
465
|
+
{
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
fscanf(fp,"%f;%f;%f;,\n\t\t\t\t",&MeshNormals[3*i+0],&MeshNormals[3*i+1],&MeshNormals[3*i+2]);
|
470
|
+
|
471
|
+
|
472
|
+
|
473
|
+
//printf("%f %f %f \n",MeshNormals[3*4431+0],MeshNormals[3*4431+1],MeshNormals[3*4431+2]);
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
}
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
for(int i=0;i<20;i++)//20
|
486
|
+
|
487
|
+
{
|
488
|
+
|
489
|
+
char ch=fgetc(fp);
|
490
|
+
|
491
|
+
//printf("%c",ch);
|
492
|
+
|
493
|
+
}
|
494
|
+
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
|
499
|
+
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
int MeshNormals_id[6841*3];
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
for(int i=0; i<6840+1;++i)//6840+1
|
510
|
+
|
511
|
+
{
|
512
|
+
|
513
|
+
|
514
|
+
|
515
|
+
//3*i+0 ,3*i+1 ,3*i+2
|
516
|
+
|
517
|
+
fscanf(fp,"3;%d,%d,%d;,\n\t\t\t\t",&MeshNormals_id[3*i+0],&MeshNormals_id[3*i+1],
|
518
|
+
|
519
|
+
&MeshNormals_id[3*i+2]);
|
520
|
+
|
521
|
+
|
522
|
+
|
523
|
+
//printf("%d %d %d;,\n",MeshNormals_id[3*i+0],MeshNormals_id[3*i+1],MeshNormals_id[3*i+2]);
|
524
|
+
|
525
|
+
|
526
|
+
|
527
|
+
}
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
for(int i=0;i<54;i++)//54 0k
|
534
|
+
|
535
|
+
{
|
536
|
+
|
537
|
+
char ch=fgetc(fp);
|
538
|
+
|
539
|
+
// printf("%c",ch);
|
540
|
+
|
541
|
+
}
|
542
|
+
|
543
|
+
|
544
|
+
|
545
|
+
|
546
|
+
|
547
|
+
float Texture[(4432)*2];//26989-22558 //4432
|
548
|
+
|
549
|
+
|
550
|
+
|
551
|
+
|
552
|
+
|
553
|
+
for(int i=0; i<4432; ++i) //i<4432
|
554
|
+
|
555
|
+
{
|
556
|
+
|
557
|
+
fscanf(fp,"%f;%f;,\n\t\t\t\t\t",
|
558
|
+
|
559
|
+
&Texture[2*i+0],&Texture[2*i+1]);//[i+0] [i+1] ok
|
560
|
+
|
561
|
+
|
562
|
+
|
563
|
+
|
564
|
+
|
565
|
+
//printf("%f,%f\n",Texture[2*i+0],Texture[2*i+1]);
|
566
|
+
|
567
|
+
//0.551922 , 0.238188
|
568
|
+
|
569
|
+
}
|
570
|
+
|
571
|
+
|
572
|
+
|
573
|
+
|
574
|
+
|
575
|
+
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
|
580
|
+
|
581
|
+
|
582
|
+
|
583
|
+
//weightを読み取る //"Bip01_R_UpperArm"
|
584
|
+
|
585
|
+
for(int i=0; i<368;++i)//602-30-20-20-10-15-20-40-17-12-30-4-15-1;++i)//368
|
586
|
+
|
587
|
+
{
|
588
|
+
|
589
|
+
//367
|
590
|
+
|
591
|
+
char ch=getc(fp);
|
592
|
+
|
593
|
+
printf("%c",ch);
|
594
|
+
|
595
|
+
}
|
596
|
+
|
597
|
+
|
598
|
+
|
599
|
+
int weight_id[156];
|
600
|
+
|
601
|
+
for(int i=0; i<156; ++i){
|
602
|
+
|
603
|
+
fscanf(fp,"%d,\n\t\t\t\t\t",&weight_id[i]);
|
604
|
+
|
605
|
+
printf("%d,\n",weight_id[i]);
|
606
|
+
|
607
|
+
}
|
608
|
+
|
609
|
+
|
610
|
+
|
611
|
+
|
612
|
+
|
613
|
+
for(int i=0;i<1;++i)
|
614
|
+
|
615
|
+
{
|
616
|
+
|
617
|
+
|
618
|
+
|
619
|
+
char ch=getc(fp);
|
620
|
+
|
621
|
+
|
622
|
+
|
623
|
+
//printf("%c\n",ch);
|
624
|
+
|
625
|
+
|
626
|
+
|
627
|
+
}
|
628
|
+
|
629
|
+
|
630
|
+
|
631
|
+
|
632
|
+
|
633
|
+
float weight[156];
|
634
|
+
|
635
|
+
|
636
|
+
|
637
|
+
for(int i=0; i<156;++i){
|
638
|
+
|
639
|
+
fscanf(fp,"%f,\n\t\t\t\t\t",&weight[i]);
|
640
|
+
|
641
|
+
printf("%f,\n",weight[i]);
|
642
|
+
|
643
|
+
|
644
|
+
|
645
|
+
}
|
646
|
+
|
647
|
+
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
float offsetMatrix[16];
|
652
|
+
|
653
|
+
|
654
|
+
|
655
|
+
for(int i=0; i<16;++i){
|
656
|
+
|
657
|
+
fscanf(fp,"%f",offsetMatrix[i]);
|
658
|
+
|
659
|
+
}
|
660
|
+
|
661
|
+
|
662
|
+
|
87
663
|
|
88
664
|
|
89
665
|
|
90
666
|
|
91
667
|
//変換行列*offsetMatrix * 変換行列=右腕のスキニング行列
|
92
668
|
|
93
|
-
//参考書籍には、モデル全体の移動、回転、拡大、縮小を表す行列worldに
|
94
|
-
|
95
|
-
胴体フレームの変換行列をかけると書いてある。
|
96
|
-
|
97
669
|
Ranks(&temp[0],&Frame_body[0],&Frame_Scene_Root[0]);
|
98
670
|
|
99
671
|
Ranks(&temp[0],&Frame_Bip01_R_UpperArm_TransformMatrix[0],&temp[0]);
|
@@ -102,765 +674,199 @@
|
|
102
674
|
|
103
675
|
|
104
676
|
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
=
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
//
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
te
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
677
|
+
//"Bip01_R_UpperArm"
|
678
|
+
|
679
|
+
|
680
|
+
|
681
|
+
|
682
|
+
|
683
|
+
//ループの始まり
|
684
|
+
|
685
|
+
for( int i=0; i<6841; ++i) //6841 ok
|
686
|
+
|
687
|
+
{
|
688
|
+
|
689
|
+
|
690
|
+
|
691
|
+
int a[3];
|
692
|
+
|
693
|
+
a[0]=Mesh_tiny_id[(3*i)+0];
|
694
|
+
|
695
|
+
a[1]=Mesh_tiny_id[(3*i)+1];
|
696
|
+
|
697
|
+
a[2]=Mesh_tiny_id[(3*i)+2];
|
698
|
+
|
699
|
+
|
700
|
+
|
701
|
+
// printf("%d ",Mesh_tiny_id[(3*0)]);
|
702
|
+
|
703
|
+
// printf("%d ",Mesh_tiny_id[(3*6840)+1]);
|
704
|
+
|
705
|
+
// printf("%d\n",Mesh_tiny_id[(3*6840)+2]);
|
706
|
+
|
707
|
+
|
708
|
+
|
709
|
+
|
710
|
+
|
711
|
+
int b[3];
|
712
|
+
|
713
|
+
b[0]=MeshNormals_id[3*i+0];
|
714
|
+
|
715
|
+
b[1]=MeshNormals_id[3*i+1];
|
716
|
+
|
717
|
+
b[2]=MeshNormals_id[3*i+2];
|
718
|
+
|
719
|
+
|
720
|
+
|
721
|
+
// printf("%d,",b[0]);//MeshNormals_id[3*i+0]);
|
722
|
+
|
723
|
+
// printf("%d,",b[1]);//MeshNormals_id[3*i+1]);
|
724
|
+
|
725
|
+
// printf("%d\n",b[2]);//MeshNormals_id[3*i+2]);
|
726
|
+
|
727
|
+
|
728
|
+
|
729
|
+
int c[3];
|
730
|
+
|
731
|
+
c[0]=Mesh_tiny_id[3*i];
|
732
|
+
|
733
|
+
c[1]=Mesh_tiny_id[3*i+1];
|
734
|
+
|
735
|
+
c[2]=Mesh_tiny_id[3*i+2];
|
736
|
+
|
737
|
+
|
738
|
+
|
739
|
+
//printf("%d, ",c[0]);
|
740
|
+
|
741
|
+
//printf("%d ",c[1]);
|
742
|
+
|
743
|
+
//printf("%d\n",c[2]);
|
744
|
+
|
745
|
+
|
746
|
+
|
747
|
+
glPushMatrix ();
|
748
|
+
|
749
|
+
|
750
|
+
|
751
|
+
glBegin(GL_POLYGON);
|
752
|
+
|
753
|
+
|
754
|
+
|
755
|
+
|
756
|
+
|
757
|
+
glNormal3f(MeshNormals[3*b[0]],MeshNormals[3*b[0]+1],MeshNormals[3*b[0]+2]);
|
758
|
+
|
759
|
+
|
760
|
+
|
761
|
+
|
762
|
+
|
763
|
+
//Mesh_tiny[3*a[0]]+=temp[0]; Mesh_tiny[3*a[0]+1]+=temp[1]; //Mesh_tiny[3*a[0]+2]+=temp[2];
|
764
|
+
|
765
|
+
glVertex3f(Mesh_tiny[3*a[0]],Mesh_tiny[3*a[0]+1], Mesh_tiny[3*a[0]+2]);
|
766
|
+
|
767
|
+
//61行目
|
768
|
+
|
769
|
+
|
770
|
+
|
771
|
+
//printf("%f;%f;%f\n",Mesh_tiny[3*a[0]],Mesh_tiny[3*a[0]+1],Mesh_tiny[3*a[0]+2]);
|
772
|
+
|
773
|
+
//ok
|
774
|
+
|
775
|
+
|
776
|
+
|
777
|
+
|
778
|
+
|
779
|
+
glNormal3f(MeshNormals[3*b[1]+0],MeshNormals[3*b[1]+1],MeshNormals[3*b[1]+2]);
|
780
|
+
|
781
|
+
|
782
|
+
|
783
|
+
|
784
|
+
|
785
|
+
glVertex3f(Mesh_tiny[3*a[1]+0],Mesh_tiny[3*a[1]+1],Mesh_tiny[3*a[1]+2]);
|
786
|
+
|
787
|
+
|
788
|
+
|
789
|
+
//printf("%f;%f;%f\n",Mesh_tiny[3*c[1]+0],Mesh_tiny[3*c[1]+1],Mesh_tiny[3*c[1]+2]);
|
790
|
+
|
791
|
+
//0.238188; -12.484819 48.088928
|
792
|
+
|
793
|
+
|
794
|
+
|
795
|
+
|
796
|
+
|
797
|
+
|
798
|
+
|
799
|
+
glNormal3f(MeshNormals[3*b[2]+0],MeshNormals[3*b[2]+1],MeshNormals[3*b[2]+2]);
|
800
|
+
|
801
|
+
|
802
|
+
|
803
|
+
glVertex3f(Mesh_tiny[3*a[2]+0],Mesh_tiny[3*a[2]+1],Mesh_tiny[3*a[2]+2]);
|
804
|
+
|
805
|
+
|
806
|
+
|
807
|
+
//printf("%f;%f;%f\n",Texture[3*c[2]+0],Texture[3*c[2]+1],Texture[3*c[2]+2]);
|
808
|
+
|
809
|
+
|
810
|
+
|
811
|
+
//4431行目 //4434-3行目 ok
|
812
|
+
|
813
|
+
//printf("%f %f %f\n",Mesh_tiny[3*a[2]+0],Mesh_tiny[3*a[2]+1],Mesh_tiny[3*a[2]+2]);
|
814
|
+
|
815
|
+
|
816
|
+
|
817
|
+
glEnd();
|
818
|
+
|
819
|
+
|
820
|
+
|
821
|
+
}
|
822
|
+
|
823
|
+
|
824
|
+
|
825
|
+
fclose(fp);
|
826
|
+
|
827
|
+
|
828
|
+
|
829
|
+
glPopMatrix();
|
830
|
+
|
831
|
+
|
832
|
+
|
833
|
+
|
834
|
+
|
835
|
+
|
836
|
+
|
837
|
+
|
838
|
+
|
839
|
+
|
840
|
+
|
841
|
+
------省略-------------
|
842
|
+
|
843
|
+
|
844
|
+
|
845
|
+
|
846
|
+
|
847
|
+
glViewport (0, 0, 600, 573);
|
848
|
+
|
849
|
+
glMatrixMode(GL_PROJECTION);
|
850
|
+
|
851
|
+
|
852
|
+
|
853
|
+
//50.0 1.0,100,
|
854
|
+
|
855
|
+
gluPerspective(32.0,(double)(600/573)
|
856
|
+
|
857
|
+
,1.5f,1000.0f); //40.0 ,1.5f ,10000.0f //40.0 1.0f 1000.0f
|
858
|
+
|
859
|
+
|
860
|
+
|
861
|
+
|
862
|
+
|
863
|
+
glMatrixMode(GL_MODELVIEW); //モードを元に戻す
|
282
864
|
|
283
865
|
|
284
866
|
|
285
867
|
glLoadIdentity();
|
286
868
|
|
287
|
-
|
869
|
+
|
288
|
-
|
289
|
-
0.0, 0.0, 0.0,
|
290
|
-
|
291
|
-
0.0, 1.0, 0.0 );
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
//char ch= getc(fp);でループの数をスキップしました。あと、xファイルは
|
298
|
-
|
299
|
-
//読みやすいように改ざんしました。
|
300
|
-
|
301
|
-
//MeshNormals[3*b[0]について、b[0]には何行目かが入っています。
|
302
|
-
|
303
|
-
//陰影がついていなくて間違えているかもしれませんが、もう計算した値が
|
304
|
-
|
305
|
-
//ファイルに含まれているといわれたので計算せずにファイルから抜き出しまし
|
306
|
-
|
307
|
-
// した。ただし.objファイルの場合の話。
|
308
|
-
|
309
|
-
//Textureにおいては右腕をあげる話をしているので考えません。
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
float Mesh_tiny[4432*3];
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
FILE *fp;
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
fp=fopen("./src/tiny.x","r");
|
326
|
-
|
327
|
-
static double angle=0.0;
|
328
|
-
|
329
|
-
angle=angle+0.3;
|
330
|
-
|
331
|
-
if(angle>360){angle=0.0;}
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
glRotated (angle,0,1,0);
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
glTranslatef(0.0,0.15,0.0);
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
glScaled(0.0008,0.0008,0.0008);
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
for(int i=0;i<23;i++)
|
348
|
-
|
349
|
-
{
|
350
|
-
|
351
|
-
char ch=fgetc(fp);
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
//printf("%c",ch);
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
}
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
//4432
|
364
|
-
|
365
|
-
for(int i=0;i<((4434-3)+1);i++){
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
fscanf(fp,"%f;%f;%f;,\n\t\t\t\t",&Mesh_tiny[3*i],&Mesh_tiny[3*i+1],&Mesh_tiny[3*i+2]);
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
//printf("%f %f %f;,\n",Mesh_tiny[3*i],Mesh_tiny[3*i+1],Mesh_tiny[3*i+2]);
|
374
|
-
|
375
|
-
}
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
for(int i=0;i<18;i++) //18
|
388
|
-
|
389
|
-
{
|
390
|
-
|
391
|
-
char ch=fgetc(fp);
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
// printf("%c",ch);
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
}
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
int Mesh_tiny_id[(6841*3)]; //6840*3 ?+1?
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
for(int i=0; i<6840+1; ++i){//11275-4436=6840
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
fscanf(fp,"3;%d,%d,%d;,\n\t\t\t\t",&Mesh_tiny_id[3*i+0],&Mesh_tiny_id[3*i+1],
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
&Mesh_tiny_id[3*i+2]);//i=6840
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
//printf("%d,%d,%d;,\n",Mesh_tiny_id[3*i+0],Mesh_tiny_id[3*i+1],
|
428
|
-
|
429
|
-
// Mesh_tiny_id[3*i+2]);
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
}
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
for(int i=0;i<41;i++)//41
|
446
|
-
|
447
|
-
{
|
448
|
-
|
449
|
-
char ch=fgetc(fp);
|
450
|
-
|
451
|
-
//printf("%c",ch);
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
}
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
float MeshNormals[4432*3];
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
for(int i=0; i<(4431)+1;++i) // i<(15711-11280)+1;
|
470
|
-
|
471
|
-
{
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
fscanf(fp,"%f;%f;%f;,\n\t\t\t\t",&MeshNormals[3*i+0],&MeshNormals[3*i+1],&MeshNormals[3*i+2]);
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
//printf("%f %f %f \n",MeshNormals[3*4431+0],MeshNormals[3*4431+1],MeshNormals[3*4431+2]);
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
}
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
for(int i=0;i<20;i++)//20
|
492
|
-
|
493
|
-
{
|
494
|
-
|
495
|
-
char ch=fgetc(fp);
|
496
|
-
|
497
|
-
//printf("%c",ch);
|
498
|
-
|
499
|
-
}
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
int MeshNormals_id[6841*3];
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
for(int i=0; i<6840+1;++i)//6840+1
|
516
|
-
|
517
|
-
{
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
//3*i+0 ,3*i+1 ,3*i+2
|
522
|
-
|
523
|
-
fscanf(fp,"3;%d,%d,%d;,\n\t\t\t\t",&MeshNormals_id[3*i+0],&MeshNormals_id[3*i+1],
|
524
|
-
|
525
|
-
&MeshNormals_id[3*i+2]);
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
//printf("%d %d %d;,\n",MeshNormals_id[3*i+0],MeshNormals_id[3*i+1],MeshNormals_id[3*i+2]);
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
}
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
for(int i=0;i<54;i++)//54 0k
|
540
|
-
|
541
|
-
{
|
542
|
-
|
543
|
-
char ch=fgetc(fp);
|
544
|
-
|
545
|
-
// printf("%c",ch);
|
546
|
-
|
547
|
-
}
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
float Texture[(4432)*2];//26989-22558 //4432
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
for(int i=0; i<4432; ++i) //i<4432
|
560
|
-
|
561
|
-
{
|
562
|
-
|
563
|
-
fscanf(fp,"%f;%f;,\n\t\t\t\t\t",
|
564
|
-
|
565
|
-
&Texture[2*i+0],&Texture[2*i+1]);//[i+0] [i+1] ok
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
//printf("%f,%f\n",Texture[2*i+0],Texture[2*i+1]);
|
572
|
-
|
573
|
-
//0.551922 , 0.238188
|
574
|
-
|
575
|
-
}
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
//weightを読み取る //"Bip01_R_UpperArm"
|
590
|
-
|
591
|
-
for(int i=0; i<368;++i)//602-30-20-20-10-15-20-40-17-12-30-4-15-1;++i)//368
|
592
|
-
|
593
|
-
{
|
594
|
-
|
595
|
-
//367
|
596
|
-
|
597
|
-
char ch=getc(fp);
|
598
|
-
|
599
|
-
printf("%c",ch);
|
600
|
-
|
601
|
-
}
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
int weight_id[156];
|
606
|
-
|
607
|
-
for(int i=0; i<156; ++i){
|
608
|
-
|
609
|
-
fscanf(fp,"%d,\n\t\t\t\t\t",&weight_id[i]);
|
610
|
-
|
611
|
-
printf("%d,\n",weight_id[i]);
|
612
|
-
|
613
|
-
}
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
for(int i=0;i<1;++i)
|
620
|
-
|
621
|
-
{
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
char ch=getc(fp);
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
//printf("%c\n",ch);
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
}
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
float weight[156];
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
for(int i=0; i<156;++i){
|
644
|
-
|
645
|
-
fscanf(fp,"%f,\n\t\t\t\t\t",&weight[i]);
|
646
|
-
|
647
|
-
printf("%f,\n",weight[i]);
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
}
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
float offsetMatrix[16];
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
for(int i=0; i<16;++i){
|
662
|
-
|
663
|
-
fscanf(fp,"%f",offsetMatrix[i]);
|
664
|
-
|
665
|
-
}
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
//変換行列*offsetMatrix * 変換行列=右腕のスキニング行列
|
674
|
-
|
675
|
-
Ranks(&temp[0],&Frame_body[0],&Frame_Scene_Root[0]);
|
676
|
-
|
677
|
-
Ranks(&temp[0],&Frame_Bip01_R_UpperArm_TransformMatrix[0],&temp[0]);
|
678
|
-
|
679
|
-
Ranks(&temp[0],&offsetMatrix[0],&temp[0]);
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
//"Bip01_R_UpperArm"
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
//ループの始まり
|
690
|
-
|
691
|
-
for( int i=0; i<6841; ++i) //6841 ok
|
692
|
-
|
693
|
-
{
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
int a[3];
|
698
|
-
|
699
|
-
a[0]=Mesh_tiny_id[(3*i)+0];
|
700
|
-
|
701
|
-
a[1]=Mesh_tiny_id[(3*i)+1];
|
702
|
-
|
703
|
-
a[2]=Mesh_tiny_id[(3*i)+2];
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
// printf("%d ",Mesh_tiny_id[(3*0)]);
|
708
|
-
|
709
|
-
// printf("%d ",Mesh_tiny_id[(3*6840)+1]);
|
710
|
-
|
711
|
-
// printf("%d\n",Mesh_tiny_id[(3*6840)+2]);
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
int b[3];
|
718
|
-
|
719
|
-
b[0]=MeshNormals_id[3*i+0];
|
720
|
-
|
721
|
-
b[1]=MeshNormals_id[3*i+1];
|
722
|
-
|
723
|
-
b[2]=MeshNormals_id[3*i+2];
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
// printf("%d,",b[0]);//MeshNormals_id[3*i+0]);
|
728
|
-
|
729
|
-
// printf("%d,",b[1]);//MeshNormals_id[3*i+1]);
|
730
|
-
|
731
|
-
// printf("%d\n",b[2]);//MeshNormals_id[3*i+2]);
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
int c[3];
|
736
|
-
|
737
|
-
c[0]=Mesh_tiny_id[3*i];
|
738
|
-
|
739
|
-
c[1]=Mesh_tiny_id[3*i+1];
|
740
|
-
|
741
|
-
c[2]=Mesh_tiny_id[3*i+2];
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
//printf("%d, ",c[0]);
|
746
|
-
|
747
|
-
//printf("%d ",c[1]);
|
748
|
-
|
749
|
-
//printf("%d\n",c[2]);
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
glPushMatrix ();
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
glBegin(GL_POLYGON);
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
glNormal3f(MeshNormals[3*b[0]],MeshNormals[3*b[0]+1],MeshNormals[3*b[0]+2]);
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
//Mesh_tiny[3*a[0]]+=temp[0]; Mesh_tiny[3*a[0]+1]+=temp[1]; //Mesh_tiny[3*a[0]+2]+=temp[2];
|
770
|
-
|
771
|
-
glVertex3f(Mesh_tiny[3*a[0]],Mesh_tiny[3*a[0]+1], Mesh_tiny[3*a[0]+2]);
|
772
|
-
|
773
|
-
//61行目
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
//printf("%f;%f;%f\n",Mesh_tiny[3*a[0]],Mesh_tiny[3*a[0]+1],Mesh_tiny[3*a[0]+2]);
|
778
|
-
|
779
|
-
//ok
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
glNormal3f(MeshNormals[3*b[1]+0],MeshNormals[3*b[1]+1],MeshNormals[3*b[1]+2]);
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
glVertex3f(Mesh_tiny[3*a[1]+0],Mesh_tiny[3*a[1]+1],Mesh_tiny[3*a[1]+2]);
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
//printf("%f;%f;%f\n",Mesh_tiny[3*c[1]+0],Mesh_tiny[3*c[1]+1],Mesh_tiny[3*c[1]+2]);
|
796
|
-
|
797
|
-
//0.238188; -12.484819 48.088928
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
glNormal3f(MeshNormals[3*b[2]+0],MeshNormals[3*b[2]+1],MeshNormals[3*b[2]+2]);
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
glVertex3f(Mesh_tiny[3*a[2]+0],Mesh_tiny[3*a[2]+1],Mesh_tiny[3*a[2]+2]);
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
//printf("%f;%f;%f\n",Texture[3*c[2]+0],Texture[3*c[2]+1],Texture[3*c[2]+2]);
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
//4431行目 //4434-3行目 ok
|
818
|
-
|
819
|
-
//printf("%f %f %f\n",Mesh_tiny[3*a[2]+0],Mesh_tiny[3*a[2]+1],Mesh_tiny[3*a[2]+2]);
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
glEnd();
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
}
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
fclose(fp);
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
glPopMatrix();
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
------省略-------------
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
glViewport (0, 0, 600, 573);
|
854
|
-
|
855
|
-
glMatrixMode(GL_PROJECTION);
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
//50.0 1.0,100,
|
860
|
-
|
861
|
-
gluPerspective(32.0,(double)(600/573)
|
862
|
-
|
863
|
-
,1.5f,1000.0f); //40.0 ,1.5f ,10000.0f //40.0 1.0f 1000.0f
|
864
870
|
|
865
871
|
|
866
872
|
|
@@ -870,18 +876,6 @@
|
|
870
876
|
|
871
877
|
|
872
878
|
|
873
|
-
glLoadIdentity();
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
glMatrixMode(GL_MODELVIEW); //モードを元に戻す
|
882
|
-
|
883
|
-
|
884
|
-
|
885
879
|
----省略------------
|
886
880
|
|
887
881
|
|
13
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -889,3 +889,31 @@
|
|
889
889
|
//xfile 未完成
|
890
890
|
|
891
891
|
```
|
892
|
+
|
893
|
+
|
894
|
+
|
895
|
+
|
896
|
+
|
897
|
+
```c
|
898
|
+
|
899
|
+
SkinWeights {
|
900
|
+
|
901
|
+
"Bip01_R_UpperArm";
|
902
|
+
|
903
|
+
156;............................156の要素がある
|
904
|
+
|
905
|
+
0,---------頂点番号はじまり
|
906
|
+
|
907
|
+
3449,
|
908
|
+
|
909
|
+
3429,
|
910
|
+
|
911
|
+
|
912
|
+
|
913
|
+
....入りきらないので省略。
|
914
|
+
|
915
|
+
-0.941743,-0.646748,0.574719,0.000000,-0.283133,-0.461979,-0.983825,0.000000,0.923060,-1.114919,0.257891,0.000000,-65.499557,30.497688,12.852692,1.000000;;...........-0.941743,からoffset行列
|
916
|
+
|
917
|
+
}
|
918
|
+
|
919
|
+
```
|
12
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -3,3 +3,889 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
だけど、何をすればいいのか分かりません。どういった手順で計算すればいいのか、手順が知りたいです。何にたしあわせて、どこのAPIに入力すればいいのでしょうか。APIに入力するかも分かりません。詳細が分からないので詳細な質問ができず申し訳ありません!
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
(開発環境は苦労して手に入れたのでふせさせていただきます)
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
今回 右上腕だけ動かすプログラムを作ろうと思いました。行列の掛け算をつかいます(スキニング行列というらしいは)、offset行列*TransC*TranceD*worldであらわせるそうですが、TranceCは右上腕フレームの行列、TranceDは胴体フレームの変換行列,worldはモデル全体の移動、回転、拡大縮小を表す行列だそうです。
|
16
|
+
|
17
|
+
● 分からないこと➀--world座標系は移動、回転、拡大、縮小を表すが下記の通りAPIを使ってしまった。
|
18
|
+
|
19
|
+
glRotated (angle,0,1,0);
|
20
|
+
|
21
|
+
glTranslatef(0.0,0.15,0.0);
|
22
|
+
|
23
|
+
glScaled(0.0008,0.0008,0.0008);
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
●分からないこと➁---スキニング行列をだすのだがworld座標系がわからない。
|
28
|
+
|
29
|
+
float Frame_Scene_Root[16]={
|
30
|
+
|
31
|
+
1.000000,0.000000,0.000000,0.000000,
|
32
|
+
|
33
|
+
0.000000,1.000000,0.000000,0.000000,
|
34
|
+
|
35
|
+
0.000000,0.000000,1.000000,0.000000,
|
36
|
+
|
37
|
+
0.000000,0.000000,0.000000,1.000000};
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
float Frame_body[16]={
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
1.278853,0.000000,-0.000000,0.000000,
|
48
|
+
|
49
|
+
0.000000,0.000000,1.123165,0.000000,
|
50
|
+
|
51
|
+
0.000000,-1.470235,0.000000,0.000000,
|
52
|
+
|
53
|
+
0.135977,2.027985,133.967667,1.000000
|
54
|
+
|
55
|
+
};
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
float Frame[16]={
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
1.000000,-0.000000,-0.000000,0.000000,
|
64
|
+
|
65
|
+
-0.000000,1.000000,0.000000,0.000000,
|
66
|
+
|
67
|
+
-0.000000,0.000000,1.000000,0.000000,
|
68
|
+
|
69
|
+
-0.142114,0.000023,-49.556850,1.000000};
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
float Frame_Bip01_R_UpperArm_TransformMatrix[16]={//upper
|
76
|
+
|
77
|
+
0.532891,0.645602,0.547015,0.000000,
|
78
|
+
|
79
|
+
-0.380503,0.760229,-0.526564,0.000000,
|
80
|
+
|
81
|
+
-0.755807,0.072461,0.650772,0.000000,
|
82
|
+
|
83
|
+
31.000195,-0.000004,0.000004,1.000000};
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
//変換行列*offsetMatrix * 変換行列=右腕のスキニング行列
|
92
|
+
|
93
|
+
//参考書籍には、モデル全体の移動、回転、拡大、縮小を表す行列worldに
|
94
|
+
|
95
|
+
胴体フレームの変換行列をかけると書いてある。
|
96
|
+
|
97
|
+
Ranks(&temp[0],&Frame_body[0],&Frame_Scene_Root[0]);
|
98
|
+
|
99
|
+
Ranks(&temp[0],&Frame_Bip01_R_UpperArm_TransformMatrix[0],&temp[0]);
|
100
|
+
|
101
|
+
Ranks(&temp[0],&offsetMatrix[0],&temp[0]);
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
の様になると思う。ただしworld座標系が抜けている。
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
分からないこと➂...求めたスキニング行列を使って頂点の座標変換を行う。各頂点が保持しているフレーム番号の配列を使って街頭するフレームのスキニング行列を参照する --意味不明。
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
分からないこと➃...どう考えてもmeshにかんしてはglVertex3f()に変形を加えればいいとおもうのですが、よくわかりません以上です。
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
頂点座標
|
124
|
+
|
125
|
+
=pos*skin6*weight6+pos*skin4*weight4+pos*skin0*weight0+pos*skin1*weight1
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
変換後の法線ベクトル(法線はどうでもいい)
|
130
|
+
|
131
|
+
=normal*skin6*weight6+normal*skin4*weight4+normal*skin0*weight4+...
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
以下はソースコードです。
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
```c
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
//ここはファイルから抜き出した
|
146
|
+
|
147
|
+
float Frame_Scene_Root[16]={
|
148
|
+
|
149
|
+
1.000000,0.000000,0.000000,0.000000,
|
150
|
+
|
151
|
+
0.000000,1.000000,0.000000,0.000000,
|
152
|
+
|
153
|
+
0.000000,0.000000,1.000000,0.000000,
|
154
|
+
|
155
|
+
0.000000,0.000000,0.000000,1.000000};
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
float Frame_body[16]={
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
1.278853,0.000000,-0.000000,0.000000,
|
166
|
+
|
167
|
+
0.000000,0.000000,1.123165,0.000000,
|
168
|
+
|
169
|
+
0.000000,-1.470235,0.000000,0.000000,
|
170
|
+
|
171
|
+
0.135977,2.027985,133.967667,1.000000
|
172
|
+
|
173
|
+
};
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
float Frame[16]={
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
1.000000,-0.000000,-0.000000,0.000000,
|
182
|
+
|
183
|
+
-0.000000,1.000000,0.000000,0.000000,
|
184
|
+
|
185
|
+
-0.000000,0.000000,1.000000,0.000000,
|
186
|
+
|
187
|
+
-0.142114,0.000023,-49.556850,1.000000};
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
float Frame_Bip01_R_UpperArm_TransformMatrix[16]={//upper
|
194
|
+
|
195
|
+
0.532891,0.645602,0.547015,0.000000,
|
196
|
+
|
197
|
+
-0.380503,0.760229,-0.526564,0.000000,
|
198
|
+
|
199
|
+
-0.755807,0.072461,0.650772,0.000000,
|
200
|
+
|
201
|
+
31.000195,-0.000004,0.000004,1.000000};
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
float temp[16];
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
//理解力がないから、こっちをつかいました
|
218
|
+
|
219
|
+
void Ranks( float *temp , float *a, float *b)
|
220
|
+
|
221
|
+
{
|
222
|
+
|
223
|
+
temp[0]=a[0]*b[0]+a[1]*b[4]+a[2]*b[8]+a[3]*b[12];
|
224
|
+
|
225
|
+
temp[1]=a[0]*b[1]+a[1]*b[5]+a[2]*b[9]+a[3]*b[13];
|
226
|
+
|
227
|
+
temp[2]=a[0]*b[2]+a[1]*b[6]+a[2]*b[10]+a[3]*b[14];
|
228
|
+
|
229
|
+
temp[3]=a[0]*b[3]+a[1]*b[7]+a[2]*b[11]+a[3]*b[15];
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
temp[4]=a[4]*b[0]+a[5]*b[4]+a[6]*b[8]+a[7]*b[12];
|
234
|
+
|
235
|
+
temp[5]=a[4]*b[1]+a[5]*b[5]+a[6]*b[9]+a[7]*b[13];
|
236
|
+
|
237
|
+
temp[6]=a[4]*b[2]+a[5]*b[6]+a[6]*b[10]+a[7]*b[14];
|
238
|
+
|
239
|
+
temp[7]=a[4]*b[3]+a[5]*b[7]+a[6]*b[11]+a[7]*b[15];
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
temp[8]=a[8]*b[0]+a[9]*b[4]+a[10]*b[8]+a[11]*b[12];
|
244
|
+
|
245
|
+
temp[9]=a[8]*b[1]+a[9]*b[5]+a[10]*b[9]+a[11]*b[13];
|
246
|
+
|
247
|
+
temp[10]=a[8]*b[2]+a[9]*b[6]+a[10]*b[10]+a[11]*b[14];
|
248
|
+
|
249
|
+
temp[11]=a[8]*b[3]+a[9]*b[7]+a[10]*b[11]+a[11]*b[15];
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
temp[12]=a[12]*b[0]+a[13]*b[4]+a[14]*b[8]+a[15]*b[12];
|
254
|
+
|
255
|
+
temp[13]=a[12]*b[1]+a[13]*b[5]+a[14]*b[9]+a[15]*b[13];
|
256
|
+
|
257
|
+
temp[14]=a[12]*b[2]+a[13]*b[6]+a[14]*b[10]+a[15]*b[14];
|
258
|
+
|
259
|
+
temp[15]=a[12]*b[3]+a[13]*b[7]+a[14]*b[11]+a[15]*b[15];
|
260
|
+
|
261
|
+
}
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
/* draw in here */
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
glClearColor(0.0,0.0,0.0,1.0); //(0.8,0.8,1.0,1.0)は白っぽい
|
280
|
+
|
281
|
+
//(0.0.0.0,0.0,1.0);は黒
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
glLoadIdentity();
|
286
|
+
|
287
|
+
gluLookAt(0.4,0.8,0.7,//0.4,0.8,0.7
|
288
|
+
|
289
|
+
0.0, 0.0, 0.0,
|
290
|
+
|
291
|
+
0.0, 1.0, 0.0 );
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
//char ch= getc(fp);でループの数をスキップしました。あと、xファイルは
|
298
|
+
|
299
|
+
//読みやすいように改ざんしました。
|
300
|
+
|
301
|
+
//MeshNormals[3*b[0]について、b[0]には何行目かが入っています。
|
302
|
+
|
303
|
+
//陰影がついていなくて間違えているかもしれませんが、もう計算した値が
|
304
|
+
|
305
|
+
//ファイルに含まれているといわれたので計算せずにファイルから抜き出しまし
|
306
|
+
|
307
|
+
// した。ただし.objファイルの場合の話。
|
308
|
+
|
309
|
+
//Textureにおいては右腕をあげる話をしているので考えません。
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
float Mesh_tiny[4432*3];
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
FILE *fp;
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
fp=fopen("./src/tiny.x","r");
|
326
|
+
|
327
|
+
static double angle=0.0;
|
328
|
+
|
329
|
+
angle=angle+0.3;
|
330
|
+
|
331
|
+
if(angle>360){angle=0.0;}
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
glRotated (angle,0,1,0);
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
glTranslatef(0.0,0.15,0.0);
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
glScaled(0.0008,0.0008,0.0008);
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
for(int i=0;i<23;i++)
|
348
|
+
|
349
|
+
{
|
350
|
+
|
351
|
+
char ch=fgetc(fp);
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
//printf("%c",ch);
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
}
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
//4432
|
364
|
+
|
365
|
+
for(int i=0;i<((4434-3)+1);i++){
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
fscanf(fp,"%f;%f;%f;,\n\t\t\t\t",&Mesh_tiny[3*i],&Mesh_tiny[3*i+1],&Mesh_tiny[3*i+2]);
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
//printf("%f %f %f;,\n",Mesh_tiny[3*i],Mesh_tiny[3*i+1],Mesh_tiny[3*i+2]);
|
374
|
+
|
375
|
+
}
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
for(int i=0;i<18;i++) //18
|
388
|
+
|
389
|
+
{
|
390
|
+
|
391
|
+
char ch=fgetc(fp);
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
// printf("%c",ch);
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
}
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
int Mesh_tiny_id[(6841*3)]; //6840*3 ?+1?
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
for(int i=0; i<6840+1; ++i){//11275-4436=6840
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
fscanf(fp,"3;%d,%d,%d;,\n\t\t\t\t",&Mesh_tiny_id[3*i+0],&Mesh_tiny_id[3*i+1],
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
&Mesh_tiny_id[3*i+2]);//i=6840
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
//printf("%d,%d,%d;,\n",Mesh_tiny_id[3*i+0],Mesh_tiny_id[3*i+1],
|
428
|
+
|
429
|
+
// Mesh_tiny_id[3*i+2]);
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
}
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
for(int i=0;i<41;i++)//41
|
446
|
+
|
447
|
+
{
|
448
|
+
|
449
|
+
char ch=fgetc(fp);
|
450
|
+
|
451
|
+
//printf("%c",ch);
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
}
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
float MeshNormals[4432*3];
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
for(int i=0; i<(4431)+1;++i) // i<(15711-11280)+1;
|
470
|
+
|
471
|
+
{
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
fscanf(fp,"%f;%f;%f;,\n\t\t\t\t",&MeshNormals[3*i+0],&MeshNormals[3*i+1],&MeshNormals[3*i+2]);
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
//printf("%f %f %f \n",MeshNormals[3*4431+0],MeshNormals[3*4431+1],MeshNormals[3*4431+2]);
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
}
|
484
|
+
|
485
|
+
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
for(int i=0;i<20;i++)//20
|
492
|
+
|
493
|
+
{
|
494
|
+
|
495
|
+
char ch=fgetc(fp);
|
496
|
+
|
497
|
+
//printf("%c",ch);
|
498
|
+
|
499
|
+
}
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
|
510
|
+
|
511
|
+
int MeshNormals_id[6841*3];
|
512
|
+
|
513
|
+
|
514
|
+
|
515
|
+
for(int i=0; i<6840+1;++i)//6840+1
|
516
|
+
|
517
|
+
{
|
518
|
+
|
519
|
+
|
520
|
+
|
521
|
+
//3*i+0 ,3*i+1 ,3*i+2
|
522
|
+
|
523
|
+
fscanf(fp,"3;%d,%d,%d;,\n\t\t\t\t",&MeshNormals_id[3*i+0],&MeshNormals_id[3*i+1],
|
524
|
+
|
525
|
+
&MeshNormals_id[3*i+2]);
|
526
|
+
|
527
|
+
|
528
|
+
|
529
|
+
//printf("%d %d %d;,\n",MeshNormals_id[3*i+0],MeshNormals_id[3*i+1],MeshNormals_id[3*i+2]);
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
}
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
|
538
|
+
|
539
|
+
for(int i=0;i<54;i++)//54 0k
|
540
|
+
|
541
|
+
{
|
542
|
+
|
543
|
+
char ch=fgetc(fp);
|
544
|
+
|
545
|
+
// printf("%c",ch);
|
546
|
+
|
547
|
+
}
|
548
|
+
|
549
|
+
|
550
|
+
|
551
|
+
|
552
|
+
|
553
|
+
float Texture[(4432)*2];//26989-22558 //4432
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
|
558
|
+
|
559
|
+
for(int i=0; i<4432; ++i) //i<4432
|
560
|
+
|
561
|
+
{
|
562
|
+
|
563
|
+
fscanf(fp,"%f;%f;,\n\t\t\t\t\t",
|
564
|
+
|
565
|
+
&Texture[2*i+0],&Texture[2*i+1]);//[i+0] [i+1] ok
|
566
|
+
|
567
|
+
|
568
|
+
|
569
|
+
|
570
|
+
|
571
|
+
//printf("%f,%f\n",Texture[2*i+0],Texture[2*i+1]);
|
572
|
+
|
573
|
+
//0.551922 , 0.238188
|
574
|
+
|
575
|
+
}
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
|
580
|
+
|
581
|
+
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
|
586
|
+
|
587
|
+
|
588
|
+
|
589
|
+
//weightを読み取る //"Bip01_R_UpperArm"
|
590
|
+
|
591
|
+
for(int i=0; i<368;++i)//602-30-20-20-10-15-20-40-17-12-30-4-15-1;++i)//368
|
592
|
+
|
593
|
+
{
|
594
|
+
|
595
|
+
//367
|
596
|
+
|
597
|
+
char ch=getc(fp);
|
598
|
+
|
599
|
+
printf("%c",ch);
|
600
|
+
|
601
|
+
}
|
602
|
+
|
603
|
+
|
604
|
+
|
605
|
+
int weight_id[156];
|
606
|
+
|
607
|
+
for(int i=0; i<156; ++i){
|
608
|
+
|
609
|
+
fscanf(fp,"%d,\n\t\t\t\t\t",&weight_id[i]);
|
610
|
+
|
611
|
+
printf("%d,\n",weight_id[i]);
|
612
|
+
|
613
|
+
}
|
614
|
+
|
615
|
+
|
616
|
+
|
617
|
+
|
618
|
+
|
619
|
+
for(int i=0;i<1;++i)
|
620
|
+
|
621
|
+
{
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
char ch=getc(fp);
|
626
|
+
|
627
|
+
|
628
|
+
|
629
|
+
//printf("%c\n",ch);
|
630
|
+
|
631
|
+
|
632
|
+
|
633
|
+
}
|
634
|
+
|
635
|
+
|
636
|
+
|
637
|
+
|
638
|
+
|
639
|
+
float weight[156];
|
640
|
+
|
641
|
+
|
642
|
+
|
643
|
+
for(int i=0; i<156;++i){
|
644
|
+
|
645
|
+
fscanf(fp,"%f,\n\t\t\t\t\t",&weight[i]);
|
646
|
+
|
647
|
+
printf("%f,\n",weight[i]);
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
}
|
652
|
+
|
653
|
+
|
654
|
+
|
655
|
+
|
656
|
+
|
657
|
+
float offsetMatrix[16];
|
658
|
+
|
659
|
+
|
660
|
+
|
661
|
+
for(int i=0; i<16;++i){
|
662
|
+
|
663
|
+
fscanf(fp,"%f",offsetMatrix[i]);
|
664
|
+
|
665
|
+
}
|
666
|
+
|
667
|
+
|
668
|
+
|
669
|
+
|
670
|
+
|
671
|
+
|
672
|
+
|
673
|
+
//変換行列*offsetMatrix * 変換行列=右腕のスキニング行列
|
674
|
+
|
675
|
+
Ranks(&temp[0],&Frame_body[0],&Frame_Scene_Root[0]);
|
676
|
+
|
677
|
+
Ranks(&temp[0],&Frame_Bip01_R_UpperArm_TransformMatrix[0],&temp[0]);
|
678
|
+
|
679
|
+
Ranks(&temp[0],&offsetMatrix[0],&temp[0]);
|
680
|
+
|
681
|
+
|
682
|
+
|
683
|
+
//"Bip01_R_UpperArm"
|
684
|
+
|
685
|
+
|
686
|
+
|
687
|
+
|
688
|
+
|
689
|
+
//ループの始まり
|
690
|
+
|
691
|
+
for( int i=0; i<6841; ++i) //6841 ok
|
692
|
+
|
693
|
+
{
|
694
|
+
|
695
|
+
|
696
|
+
|
697
|
+
int a[3];
|
698
|
+
|
699
|
+
a[0]=Mesh_tiny_id[(3*i)+0];
|
700
|
+
|
701
|
+
a[1]=Mesh_tiny_id[(3*i)+1];
|
702
|
+
|
703
|
+
a[2]=Mesh_tiny_id[(3*i)+2];
|
704
|
+
|
705
|
+
|
706
|
+
|
707
|
+
// printf("%d ",Mesh_tiny_id[(3*0)]);
|
708
|
+
|
709
|
+
// printf("%d ",Mesh_tiny_id[(3*6840)+1]);
|
710
|
+
|
711
|
+
// printf("%d\n",Mesh_tiny_id[(3*6840)+2]);
|
712
|
+
|
713
|
+
|
714
|
+
|
715
|
+
|
716
|
+
|
717
|
+
int b[3];
|
718
|
+
|
719
|
+
b[0]=MeshNormals_id[3*i+0];
|
720
|
+
|
721
|
+
b[1]=MeshNormals_id[3*i+1];
|
722
|
+
|
723
|
+
b[2]=MeshNormals_id[3*i+2];
|
724
|
+
|
725
|
+
|
726
|
+
|
727
|
+
// printf("%d,",b[0]);//MeshNormals_id[3*i+0]);
|
728
|
+
|
729
|
+
// printf("%d,",b[1]);//MeshNormals_id[3*i+1]);
|
730
|
+
|
731
|
+
// printf("%d\n",b[2]);//MeshNormals_id[3*i+2]);
|
732
|
+
|
733
|
+
|
734
|
+
|
735
|
+
int c[3];
|
736
|
+
|
737
|
+
c[0]=Mesh_tiny_id[3*i];
|
738
|
+
|
739
|
+
c[1]=Mesh_tiny_id[3*i+1];
|
740
|
+
|
741
|
+
c[2]=Mesh_tiny_id[3*i+2];
|
742
|
+
|
743
|
+
|
744
|
+
|
745
|
+
//printf("%d, ",c[0]);
|
746
|
+
|
747
|
+
//printf("%d ",c[1]);
|
748
|
+
|
749
|
+
//printf("%d\n",c[2]);
|
750
|
+
|
751
|
+
|
752
|
+
|
753
|
+
glPushMatrix ();
|
754
|
+
|
755
|
+
|
756
|
+
|
757
|
+
glBegin(GL_POLYGON);
|
758
|
+
|
759
|
+
|
760
|
+
|
761
|
+
|
762
|
+
|
763
|
+
glNormal3f(MeshNormals[3*b[0]],MeshNormals[3*b[0]+1],MeshNormals[3*b[0]+2]);
|
764
|
+
|
765
|
+
|
766
|
+
|
767
|
+
|
768
|
+
|
769
|
+
//Mesh_tiny[3*a[0]]+=temp[0]; Mesh_tiny[3*a[0]+1]+=temp[1]; //Mesh_tiny[3*a[0]+2]+=temp[2];
|
770
|
+
|
771
|
+
glVertex3f(Mesh_tiny[3*a[0]],Mesh_tiny[3*a[0]+1], Mesh_tiny[3*a[0]+2]);
|
772
|
+
|
773
|
+
//61行目
|
774
|
+
|
775
|
+
|
776
|
+
|
777
|
+
//printf("%f;%f;%f\n",Mesh_tiny[3*a[0]],Mesh_tiny[3*a[0]+1],Mesh_tiny[3*a[0]+2]);
|
778
|
+
|
779
|
+
//ok
|
780
|
+
|
781
|
+
|
782
|
+
|
783
|
+
|
784
|
+
|
785
|
+
glNormal3f(MeshNormals[3*b[1]+0],MeshNormals[3*b[1]+1],MeshNormals[3*b[1]+2]);
|
786
|
+
|
787
|
+
|
788
|
+
|
789
|
+
|
790
|
+
|
791
|
+
glVertex3f(Mesh_tiny[3*a[1]+0],Mesh_tiny[3*a[1]+1],Mesh_tiny[3*a[1]+2]);
|
792
|
+
|
793
|
+
|
794
|
+
|
795
|
+
//printf("%f;%f;%f\n",Mesh_tiny[3*c[1]+0],Mesh_tiny[3*c[1]+1],Mesh_tiny[3*c[1]+2]);
|
796
|
+
|
797
|
+
//0.238188; -12.484819 48.088928
|
798
|
+
|
799
|
+
|
800
|
+
|
801
|
+
|
802
|
+
|
803
|
+
|
804
|
+
|
805
|
+
glNormal3f(MeshNormals[3*b[2]+0],MeshNormals[3*b[2]+1],MeshNormals[3*b[2]+2]);
|
806
|
+
|
807
|
+
|
808
|
+
|
809
|
+
glVertex3f(Mesh_tiny[3*a[2]+0],Mesh_tiny[3*a[2]+1],Mesh_tiny[3*a[2]+2]);
|
810
|
+
|
811
|
+
|
812
|
+
|
813
|
+
//printf("%f;%f;%f\n",Texture[3*c[2]+0],Texture[3*c[2]+1],Texture[3*c[2]+2]);
|
814
|
+
|
815
|
+
|
816
|
+
|
817
|
+
//4431行目 //4434-3行目 ok
|
818
|
+
|
819
|
+
//printf("%f %f %f\n",Mesh_tiny[3*a[2]+0],Mesh_tiny[3*a[2]+1],Mesh_tiny[3*a[2]+2]);
|
820
|
+
|
821
|
+
|
822
|
+
|
823
|
+
glEnd();
|
824
|
+
|
825
|
+
|
826
|
+
|
827
|
+
}
|
828
|
+
|
829
|
+
|
830
|
+
|
831
|
+
fclose(fp);
|
832
|
+
|
833
|
+
|
834
|
+
|
835
|
+
glPopMatrix();
|
836
|
+
|
837
|
+
|
838
|
+
|
839
|
+
|
840
|
+
|
841
|
+
|
842
|
+
|
843
|
+
|
844
|
+
|
845
|
+
|
846
|
+
|
847
|
+
------省略-------------
|
848
|
+
|
849
|
+
|
850
|
+
|
851
|
+
|
852
|
+
|
853
|
+
glViewport (0, 0, 600, 573);
|
854
|
+
|
855
|
+
glMatrixMode(GL_PROJECTION);
|
856
|
+
|
857
|
+
|
858
|
+
|
859
|
+
//50.0 1.0,100,
|
860
|
+
|
861
|
+
gluPerspective(32.0,(double)(600/573)
|
862
|
+
|
863
|
+
,1.5f,1000.0f); //40.0 ,1.5f ,10000.0f //40.0 1.0f 1000.0f
|
864
|
+
|
865
|
+
|
866
|
+
|
867
|
+
|
868
|
+
|
869
|
+
glMatrixMode(GL_MODELVIEW); //モードを元に戻す
|
870
|
+
|
871
|
+
|
872
|
+
|
873
|
+
glLoadIdentity();
|
874
|
+
|
875
|
+
|
876
|
+
|
877
|
+
|
878
|
+
|
879
|
+
|
880
|
+
|
881
|
+
glMatrixMode(GL_MODELVIEW); //モードを元に戻す
|
882
|
+
|
883
|
+
|
884
|
+
|
885
|
+
----省略------------
|
886
|
+
|
887
|
+
|
888
|
+
|
889
|
+
//xfile 未完成
|
890
|
+
|
891
|
+
```
|
11
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,830 +2,4 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
だけど、何をすればいいのか分かりません。どういった手順で計算すればいいのか、手順が知りたいです。何にたしあわせて、どこのAPIに入力すればいいのでしょうか。APIに入力するかも分かりません。詳細が分からないので詳細な質問ができず申し訳ありません!
|
5
|
+
だけど、何をすればいいのか分かりません。どういった手順で計算すればいいのか、手順が知りたいです。何にたしあわせて、どこのAPIに入力すればいいのでしょうか。APIに入力するかも分かりません。詳細が分からないので詳細な質問ができず申し訳ありません!
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
画像の追加、画像は後で消すんだ
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
Frameについてわからないのでもう一回上げてみる
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
ソースはみせないけど、tiny.xというモデルです。変数がグローバルであっても、
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
再帰はつかわずに解きたいです。何をしているのか、よくわからないので。
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
以下が算出で使いたいxファイルの一部です。
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
> Frame Scene_Root {
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
FrameTransformMatrix {
|
38
|
-
|
39
|
-
1.000000,0.000000,0.000000,0.000000,
|
40
|
-
|
41
|
-
0.000000,1.000000,0.000000,0.000000,
|
42
|
-
|
43
|
-
0.000000,0.000000,1.000000,0.000000,
|
44
|
-
|
45
|
-
0.000000,0.000000,0.000000,1.000000;;
|
46
|
-
|
47
|
-
}
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
Frame body {
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
FrameTransformMatrix {
|
58
|
-
|
59
|
-
1.278853,0.000000,-0.000000,0.000000,
|
60
|
-
|
61
|
-
0.000000,0.000000,1.123165,0.000000,
|
62
|
-
|
63
|
-
0.000000,-1.470235,0.000000,0.000000,
|
64
|
-
|
65
|
-
0.135977,2.027985,133.967667,1.000000;;
|
66
|
-
|
67
|
-
}
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
Frame {
|
72
|
-
|
73
|
-
FrameTransformMatrix {
|
74
|
-
|
75
|
-
1.000000,-0.000000,-0.000000,0.000000,
|
76
|
-
|
77
|
-
-0.000000,1.000000,0.000000,0.000000,
|
78
|
-
|
79
|
-
-0.000000,0.000000,1.000000,0.000000,
|
80
|
-
|
81
|
-
-0.142114,0.000023,-49.556850,1.000000;;
|
82
|
-
|
83
|
-
}
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
まずこれはなんなのかという
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
> SkinWeights {
|
94
|
-
|
95
|
-
"Bip01_R_UpperArm";
|
96
|
-
|
97
|
-
156;
|
98
|
-
|
99
|
-
0,
|
100
|
-
|
101
|
-
3449,
|
102
|
-
|
103
|
-
3429,
|
104
|
-
|
105
|
-
3427,
|
106
|
-
|
107
|
-
2,
|
108
|
-
|
109
|
-
3454,
|
110
|
-
|
111
|
-
4,
|
112
|
-
|
113
|
-
3453,
|
114
|
-
|
115
|
-
7,
|
116
|
-
|
117
|
-
15,
|
118
|
-
|
119
|
-
68,
|
120
|
-
|
121
|
-
3456,
|
122
|
-
|
123
|
-
69,
|
124
|
-
|
125
|
-
70,
|
126
|
-
|
127
|
-
71,
|
128
|
-
|
129
|
-
3455,
|
130
|
-
|
131
|
-
72,
|
132
|
-
|
133
|
-
3940,
|
134
|
-
|
135
|
-
73,
|
136
|
-
|
137
|
-
4110,
|
138
|
-
|
139
|
-
4109,
|
140
|
-
|
141
|
-
74,
|
142
|
-
|
143
|
-
4108,
|
144
|
-
|
145
|
-
75,
|
146
|
-
|
147
|
-
3980,
|
148
|
-
|
149
|
-
76,
|
150
|
-
|
151
|
-
4113,
|
152
|
-
|
153
|
-
3936,
|
154
|
-
|
155
|
-
77,
|
156
|
-
|
157
|
-
3939,
|
158
|
-
|
159
|
-
78,
|
160
|
-
|
161
|
-
3979,
|
162
|
-
|
163
|
-
79,
|
164
|
-
|
165
|
-
3981,
|
166
|
-
|
167
|
-
1294,
|
168
|
-
|
169
|
-
1295,
|
170
|
-
|
171
|
-
1296,
|
172
|
-
|
173
|
-
1297,
|
174
|
-
|
175
|
-
1298,
|
176
|
-
|
177
|
-
3950,
|
178
|
-
|
179
|
-
1299,
|
180
|
-
|
181
|
-
3937,
|
182
|
-
|
183
|
-
1300,
|
184
|
-
|
185
|
-
1301,
|
186
|
-
|
187
|
-
3938,
|
188
|
-
|
189
|
-
1302,
|
190
|
-
|
191
|
-
3958,
|
192
|
-
|
193
|
-
3949,
|
194
|
-
|
195
|
-
1303,
|
196
|
-
|
197
|
-
3948,
|
198
|
-
|
199
|
-
1304,
|
200
|
-
|
201
|
-
3954,
|
202
|
-
|
203
|
-
1305,
|
204
|
-
|
205
|
-
3951,
|
206
|
-
|
207
|
-
3941,
|
208
|
-
|
209
|
-
1306,
|
210
|
-
|
211
|
-
3960,
|
212
|
-
|
213
|
-
3952,
|
214
|
-
|
215
|
-
1307,
|
216
|
-
|
217
|
-
3943,
|
218
|
-
|
219
|
-
1308,
|
220
|
-
|
221
|
-
3944,
|
222
|
-
|
223
|
-
1309,
|
224
|
-
|
225
|
-
1310,
|
226
|
-
|
227
|
-
1311,
|
228
|
-
|
229
|
-
1312,
|
230
|
-
|
231
|
-
1313,
|
232
|
-
|
233
|
-
1314,
|
234
|
-
|
235
|
-
1315,
|
236
|
-
|
237
|
-
3957,
|
238
|
-
|
239
|
-
1316,
|
240
|
-
|
241
|
-
1317,
|
242
|
-
|
243
|
-
1318,
|
244
|
-
|
245
|
-
3959,
|
246
|
-
|
247
|
-
1319,
|
248
|
-
|
249
|
-
1320,
|
250
|
-
|
251
|
-
1321,
|
252
|
-
|
253
|
-
1322,
|
254
|
-
|
255
|
-
1323,
|
256
|
-
|
257
|
-
1324,
|
258
|
-
|
259
|
-
3967,
|
260
|
-
|
261
|
-
3947,
|
262
|
-
|
263
|
-
1325,
|
264
|
-
|
265
|
-
3971,
|
266
|
-
|
267
|
-
1326,
|
268
|
-
|
269
|
-
3966,
|
270
|
-
|
271
|
-
1327,
|
272
|
-
|
273
|
-
3969,
|
274
|
-
|
275
|
-
3965,
|
276
|
-
|
277
|
-
1328,
|
278
|
-
|
279
|
-
3976,
|
280
|
-
|
281
|
-
3970,
|
282
|
-
|
283
|
-
3946,
|
284
|
-
|
285
|
-
1329,
|
286
|
-
|
287
|
-
3963,
|
288
|
-
|
289
|
-
1330,
|
290
|
-
|
291
|
-
3977,
|
292
|
-
|
293
|
-
1331,
|
294
|
-
|
295
|
-
3962,
|
296
|
-
|
297
|
-
1332,
|
298
|
-
|
299
|
-
3953,
|
300
|
-
|
301
|
-
1333,
|
302
|
-
|
303
|
-
3961,
|
304
|
-
|
305
|
-
3955,
|
306
|
-
|
307
|
-
1334,
|
308
|
-
|
309
|
-
3956,
|
310
|
-
|
311
|
-
1335,
|
312
|
-
|
313
|
-
1336,
|
314
|
-
|
315
|
-
1337,
|
316
|
-
|
317
|
-
1338,
|
318
|
-
|
319
|
-
3942,
|
320
|
-
|
321
|
-
1339,
|
322
|
-
|
323
|
-
1340,
|
324
|
-
|
325
|
-
1341,
|
326
|
-
|
327
|
-
1342,
|
328
|
-
|
329
|
-
3945,
|
330
|
-
|
331
|
-
1343,
|
332
|
-
|
333
|
-
1344,
|
334
|
-
|
335
|
-
1345,
|
336
|
-
|
337
|
-
1346,
|
338
|
-
|
339
|
-
1347,
|
340
|
-
|
341
|
-
1348,
|
342
|
-
|
343
|
-
1349,
|
344
|
-
|
345
|
-
1350,
|
346
|
-
|
347
|
-
1351,
|
348
|
-
|
349
|
-
1352,
|
350
|
-
|
351
|
-
1353,
|
352
|
-
|
353
|
-
1354,
|
354
|
-
|
355
|
-
3975,
|
356
|
-
|
357
|
-
1357,
|
358
|
-
|
359
|
-
1358,
|
360
|
-
|
361
|
-
1362,
|
362
|
-
|
363
|
-
1364,
|
364
|
-
|
365
|
-
1365,
|
366
|
-
|
367
|
-
1366,
|
368
|
-
|
369
|
-
1367,
|
370
|
-
|
371
|
-
1384,
|
372
|
-
|
373
|
-
1385,
|
374
|
-
|
375
|
-
1386,
|
376
|
-
|
377
|
-
1387,
|
378
|
-
|
379
|
-
1388,
|
380
|
-
|
381
|
-
1389,
|
382
|
-
|
383
|
-
1390,
|
384
|
-
|
385
|
-
3978,
|
386
|
-
|
387
|
-
1391,
|
388
|
-
|
389
|
-
1730,
|
390
|
-
|
391
|
-
4114,
|
392
|
-
|
393
|
-
1731,
|
394
|
-
|
395
|
-
1732,
|
396
|
-
|
397
|
-
1733,
|
398
|
-
|
399
|
-
4107,
|
400
|
-
|
401
|
-
1734,
|
402
|
-
|
403
|
-
1735,
|
404
|
-
|
405
|
-
1736,
|
406
|
-
|
407
|
-
1737,
|
408
|
-
|
409
|
-
1738;
|
410
|
-
|
411
|
-
0.605239,
|
412
|
-
|
413
|
-
0.605239,
|
414
|
-
|
415
|
-
0.605239,
|
416
|
-
|
417
|
-
0.605239,
|
418
|
-
|
419
|
-
0.208568,
|
420
|
-
|
421
|
-
0.208568,
|
422
|
-
|
423
|
-
0.332183,
|
424
|
-
|
425
|
-
0.332183,
|
426
|
-
|
427
|
-
0.490972,
|
428
|
-
|
429
|
-
0.001349,
|
430
|
-
|
431
|
-
0.378335,
|
432
|
-
|
433
|
-
0.378335,
|
434
|
-
|
435
|
-
0.505176,
|
436
|
-
|
437
|
-
0.547675,
|
438
|
-
|
439
|
-
0.378478,
|
440
|
-
|
441
|
-
0.378478,
|
442
|
-
|
443
|
-
0.520681,
|
444
|
-
|
445
|
-
0.520681,
|
446
|
-
|
447
|
-
0.514052,
|
448
|
-
|
449
|
-
0.514052,
|
450
|
-
|
451
|
-
0.514052,
|
452
|
-
|
453
|
-
0.489167,
|
454
|
-
|
455
|
-
0.489167,
|
456
|
-
|
457
|
-
0.500779,
|
458
|
-
|
459
|
-
0.500779,
|
460
|
-
|
461
|
-
0.344750,
|
462
|
-
|
463
|
-
0.344750,
|
464
|
-
|
465
|
-
0.344750,
|
466
|
-
|
467
|
-
0.444251,
|
468
|
-
|
469
|
-
0.444251,
|
470
|
-
|
471
|
-
0.422197,
|
472
|
-
|
473
|
-
0.422197,
|
474
|
-
|
475
|
-
0.459563,
|
476
|
-
|
477
|
-
0.459563,
|
478
|
-
|
479
|
-
1.000000,
|
480
|
-
|
481
|
-
1.000000,
|
482
|
-
|
483
|
-
0.523285,
|
484
|
-
|
485
|
-
0.702523,
|
486
|
-
|
487
|
-
1.000000,
|
488
|
-
|
489
|
-
1.000000,
|
490
|
-
|
491
|
-
1.000000,
|
492
|
-
|
493
|
-
1.000000,
|
494
|
-
|
495
|
-
1.000000,
|
496
|
-
|
497
|
-
0.754566,
|
498
|
-
|
499
|
-
0.754566,
|
500
|
-
|
501
|
-
1.000000,
|
502
|
-
|
503
|
-
1.000000,
|
504
|
-
|
505
|
-
1.000000,
|
506
|
-
|
507
|
-
1.000000,
|
508
|
-
|
509
|
-
1.000000,
|
510
|
-
|
511
|
-
0.999998,
|
512
|
-
|
513
|
-
0.999998,
|
514
|
-
|
515
|
-
1.000000,
|
516
|
-
|
517
|
-
1.000000,
|
518
|
-
|
519
|
-
1.000000,
|
520
|
-
|
521
|
-
1.000000,
|
522
|
-
|
523
|
-
1.000000,
|
524
|
-
|
525
|
-
1.000000,
|
526
|
-
|
527
|
-
0.937900,
|
528
|
-
|
529
|
-
0.937900,
|
530
|
-
|
531
|
-
0.843455,
|
532
|
-
|
533
|
-
0.843455,
|
534
|
-
|
535
|
-
1.000000,
|
536
|
-
|
537
|
-
1.000000,
|
538
|
-
|
539
|
-
0.692347,
|
540
|
-
|
541
|
-
0.536598,
|
542
|
-
|
543
|
-
0.635737,
|
544
|
-
|
545
|
-
0.793743,
|
546
|
-
|
547
|
-
1.000000,
|
548
|
-
|
549
|
-
....省略
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
Frame Box01 {
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
FrameTransformMatrix {
|
560
|
-
|
561
|
-
-1.000000,0.000000,-0.000000,0.000000,-0.000000,0.000000,1.000000,0.000000,0.000000,1.000000,0.000000,0.000000,-88.696747,-246.341751,858.815247,1.000000;;
|
562
|
-
|
563
|
-
}
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
Frame Bip01 {
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
FrameTransformMatrix {
|
574
|
-
|
575
|
-
0.186552,-0.974653,0.123489,0.000000,0.982171,0.187991,0.000000,0.000000,-0.023215,0.121288,0.992346,0.000000,-88.977890,-857.346008,247.541595,1.000000;;
|
576
|
-
|
577
|
-
}
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
Frame Bip01_Footsteps {
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
FrameTransformMatrix {
|
588
|
-
|
589
|
-
0.186552,0.982171,-0.023215,0.000000,-0.974653,0.187991,0.121288,0.000000,0.123489,-0.000000,0.992346,0.000000,-31.624149,0.000000,-254.128143,1.000000;;
|
590
|
-
|
591
|
-
}
|
592
|
-
|
593
|
-
}
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
Frame Bip01_Pelvis {
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
FrameTransformMatrix {
|
604
|
-
|
605
|
-
-0.000000,0.011807,0.999930,0.000000,1.000000,0.000001,-0.000000,0.000000,-0.000001,0.999930,-0.011807,0.000000,-2.454305,-1.950977,-0.000005,1.000000;;
|
606
|
-
|
607
|
-
}
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
Frame Bip01_Spine {
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
FrameTransformMatrix {
|
618
|
-
|
619
|
-
0.999137,0.041531,0.000982,0.000000,-0.040353,0.975880,-0.214545,0.000000,-0.009868,0.214320,0.976714,0.000000,27.422213,8.709480,-0.319006,1.000000;;
|
620
|
-
|
621
|
-
}
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
Frame Bip01_Spine1 {
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
FrameTransformMatrix {
|
632
|
-
|
633
|
-
0.984808,-0.173648,-0.000000,0.000000,0.173648,0.984808,-0.000000,0.000000,0.000000,-0.000000,1.000000,0.000000,28.178080,-0.022084,0.000000,1.000000;;
|
634
|
-
|
635
|
-
}
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
Frame Bip01_Spine2 {
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
FrameTransformMatrix {
|
646
|
-
|
647
|
-
0.999958,0.008483,0.003477,0.000000,-0.008313,0.998890,-0.046374,0.000000,-0.003867,0.046343,0.998918,0.000000,28.182159,-0.022430,0.001040,1.000000;;
|
648
|
-
|
649
|
-
}
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
Frame Bip01_Spine3 {
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
FrameTransformMatrix {
|
660
|
-
|
661
|
-
0.999837,-0.017696,0.003477,0.000000,0.017838,0.998765,-0.046374,0.000000,-0.002652,0.046428,0.998918,0.000000,28.181417,-0.033880,0.001568,1.000000;;
|
662
|
-
|
663
|
-
}
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
Frame Bip01_Neck {
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
FrameTransformMatrix {
|
674
|
-
|
675
|
-
0.861629,0.507538,0.000001,0.000000,-0.507538,0.861629,-0.000000,0.000000,-0.000001,-0.000000,1.000000,0.000000,42.566055,-0.019138,0.000001,1.000000;;
|
676
|
-
|
677
|
-
}
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
Frame Bip01_Head {
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
FrameTransformMatrix {
|
688
|
-
|
689
|
-
0.979775,-0.188667,-0.066683,0.000000,0.195389,0.973921,0.115333,0.000000,0.043184,-0.126029,0.991086,0.000000,27.900173,0.000003,0.000000,1.000000;;
|
690
|
-
|
691
|
-
}
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
Frame Dummy21 {
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
FrameTransformMatrix {
|
702
|
-
|
703
|
-
1.000000,-0.000000,-0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,-0.000000,1.000000,0.000000,59.615768,0.000027,0.000002,1.000000;;
|
704
|
-
|
705
|
-
}
|
706
|
-
|
707
|
-
}
|
708
|
-
|
709
|
-
}
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
Frame Bip01_L_Clavicle {
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
FrameTransformMatrix {
|
720
|
-
|
721
|
-
-0.185356,0.308957,0.932839,0.000000,-0.499811,-0.846968,0.181203,0.000000,0.846069,-0.432656,0.311411,0.000000,-12.374969,4.006883,8.346215,1.000000;;
|
722
|
-
|
723
|
-
}
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
Frame Bip01_L_UpperArm {
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
FrameTransformMatrix {
|
734
|
-
|
735
|
-
0.640423,0.117307,-0.759011,0.000000,0.064965,0.976451,0.205728,0.000000,0.765270,-0.181062,0.617720,0.000000,31.000208,-0.000032,-0.000004,1.000000;;
|
736
|
-
|
737
|
-
}
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
Frame Bip01_L_Forearm {
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
FrameTransformMatrix {
|
748
|
-
|
749
|
-
0.485335,-0.874328,-0.000000,0.000000,0.874328,0.485335,0.000000,0.000000,-0.000000,-0.000000,1.000000,0.000000,89.202522,-0.000023,0.000014,1.000000;;
|
750
|
-
|
751
|
-
}
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
Frame Bip01_L_Hand {
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
FrameTransformMatrix {
|
762
|
-
|
763
|
-
0.999511,-0.027531,-0.014824,0.000000,-0.015327,-0.018154,-0.999718,0.000000,0.027254,0.999456,-0.018567,0.000000,61.671467,0.000001,-0.000001,1.000000;;
|
764
|
-
|
765
|
-
}
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
Frame Bip01_L_Finger0 {
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
FrameTransformMatrix {
|
776
|
-
|
777
|
-
0.713247,-0.002867,-0.700906,0.000000,-0.700353,-0.042855,-0.712509,0.000000,-0.027995,0.999077,-0.032574,0.000000,12.410522,3.054963,-10.755418,1.000000;;
|
778
|
-
|
779
|
-
}
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
Frame Bip01_L_Finger01 {
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
FrameTransformMatrix {
|
790
|
-
|
791
|
-
1.000000,-0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,-0.000000,0.000000,1.000000,0.000000,10.075084,0.000006,-0.000007,1.000000;;
|
792
|
-
|
793
|
-
}
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
Frame Bip01_L_Finger02 {
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
FrameTransformMatrix {
|
804
|
-
|
805
|
-
1.000000,-0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,-0.000000,0.000000,1.000000,0.000000,5.961566,-0.000008,0.000006,1.000000;;
|
806
|
-
|
807
|
-
}
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
Frame Dummy06 {
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
FrameTransformMatrix {
|
818
|
-
|
819
|
-
1.000000,-0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,-0.000000,0.000000,1.000000,0.000000,5.961566,-0.000008,0.000003,1.000000;;
|
820
|
-
|
821
|
-
}
|
822
|
-
|
823
|
-
}
|
824
|
-
|
825
|
-
}
|
826
|
-
|
827
|
-
}
|
828
|
-
|
829
|
-
}
|
830
|
-
|
831
|
-
```
|
10
行列を整えた
test
CHANGED
File without changes
|
test
CHANGED
@@ -36,7 +36,13 @@
|
|
36
36
|
|
37
37
|
FrameTransformMatrix {
|
38
38
|
|
39
|
+
1.000000,0.000000,0.000000,0.000000,
|
40
|
+
|
41
|
+
0.000000,1.000000,0.000000,0.000000,
|
42
|
+
|
43
|
+
0.000000,0.000000,1.000000,0.000000,
|
44
|
+
|
39
|
-
|
45
|
+
0.000000,0.000000,0.000000,1.000000;;
|
40
46
|
|
41
47
|
}
|
42
48
|
|
@@ -50,7 +56,13 @@
|
|
50
56
|
|
51
57
|
FrameTransformMatrix {
|
52
58
|
|
59
|
+
1.278853,0.000000,-0.000000,0.000000,
|
60
|
+
|
61
|
+
0.000000,0.000000,1.123165,0.000000,
|
62
|
+
|
63
|
+
0.000000,-1.470235,0.000000,0.000000,
|
64
|
+
|
53
|
-
|
65
|
+
0.135977,2.027985,133.967667,1.000000;;
|
54
66
|
|
55
67
|
}
|
56
68
|
|
@@ -58,513 +70,531 @@
|
|
58
70
|
|
59
71
|
Frame {
|
60
72
|
|
73
|
+
FrameTransformMatrix {
|
74
|
+
|
75
|
+
1.000000,-0.000000,-0.000000,0.000000,
|
76
|
+
|
77
|
+
-0.000000,1.000000,0.000000,0.000000,
|
78
|
+
|
79
|
+
-0.000000,0.000000,1.000000,0.000000,
|
80
|
+
|
81
|
+
-0.142114,0.000023,-49.556850,1.000000;;
|
82
|
+
|
83
|
+
}
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
まずこれはなんなのかという
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
> SkinWeights {
|
94
|
+
|
95
|
+
"Bip01_R_UpperArm";
|
96
|
+
|
97
|
+
156;
|
98
|
+
|
99
|
+
0,
|
100
|
+
|
101
|
+
3449,
|
102
|
+
|
103
|
+
3429,
|
104
|
+
|
105
|
+
3427,
|
106
|
+
|
107
|
+
2,
|
108
|
+
|
109
|
+
3454,
|
110
|
+
|
111
|
+
4,
|
112
|
+
|
113
|
+
3453,
|
114
|
+
|
115
|
+
7,
|
116
|
+
|
117
|
+
15,
|
118
|
+
|
119
|
+
68,
|
120
|
+
|
121
|
+
3456,
|
122
|
+
|
123
|
+
69,
|
124
|
+
|
125
|
+
70,
|
126
|
+
|
127
|
+
71,
|
128
|
+
|
129
|
+
3455,
|
130
|
+
|
131
|
+
72,
|
132
|
+
|
133
|
+
3940,
|
134
|
+
|
135
|
+
73,
|
136
|
+
|
137
|
+
4110,
|
138
|
+
|
139
|
+
4109,
|
140
|
+
|
141
|
+
74,
|
142
|
+
|
143
|
+
4108,
|
144
|
+
|
145
|
+
75,
|
146
|
+
|
147
|
+
3980,
|
148
|
+
|
149
|
+
76,
|
150
|
+
|
151
|
+
4113,
|
152
|
+
|
153
|
+
3936,
|
154
|
+
|
155
|
+
77,
|
156
|
+
|
157
|
+
3939,
|
158
|
+
|
159
|
+
78,
|
160
|
+
|
161
|
+
3979,
|
162
|
+
|
163
|
+
79,
|
164
|
+
|
165
|
+
3981,
|
166
|
+
|
167
|
+
1294,
|
168
|
+
|
169
|
+
1295,
|
170
|
+
|
171
|
+
1296,
|
172
|
+
|
173
|
+
1297,
|
174
|
+
|
175
|
+
1298,
|
176
|
+
|
177
|
+
3950,
|
178
|
+
|
179
|
+
1299,
|
180
|
+
|
181
|
+
3937,
|
182
|
+
|
183
|
+
1300,
|
184
|
+
|
185
|
+
1301,
|
186
|
+
|
187
|
+
3938,
|
188
|
+
|
189
|
+
1302,
|
190
|
+
|
191
|
+
3958,
|
192
|
+
|
193
|
+
3949,
|
194
|
+
|
195
|
+
1303,
|
196
|
+
|
197
|
+
3948,
|
198
|
+
|
199
|
+
1304,
|
200
|
+
|
201
|
+
3954,
|
202
|
+
|
203
|
+
1305,
|
204
|
+
|
205
|
+
3951,
|
206
|
+
|
207
|
+
3941,
|
208
|
+
|
209
|
+
1306,
|
210
|
+
|
211
|
+
3960,
|
212
|
+
|
213
|
+
3952,
|
214
|
+
|
215
|
+
1307,
|
216
|
+
|
217
|
+
3943,
|
218
|
+
|
219
|
+
1308,
|
220
|
+
|
221
|
+
3944,
|
222
|
+
|
223
|
+
1309,
|
224
|
+
|
225
|
+
1310,
|
226
|
+
|
227
|
+
1311,
|
228
|
+
|
229
|
+
1312,
|
230
|
+
|
231
|
+
1313,
|
232
|
+
|
233
|
+
1314,
|
234
|
+
|
235
|
+
1315,
|
236
|
+
|
237
|
+
3957,
|
238
|
+
|
239
|
+
1316,
|
240
|
+
|
241
|
+
1317,
|
242
|
+
|
243
|
+
1318,
|
244
|
+
|
245
|
+
3959,
|
246
|
+
|
247
|
+
1319,
|
248
|
+
|
249
|
+
1320,
|
250
|
+
|
251
|
+
1321,
|
252
|
+
|
253
|
+
1322,
|
254
|
+
|
255
|
+
1323,
|
256
|
+
|
257
|
+
1324,
|
258
|
+
|
259
|
+
3967,
|
260
|
+
|
261
|
+
3947,
|
262
|
+
|
263
|
+
1325,
|
264
|
+
|
265
|
+
3971,
|
266
|
+
|
267
|
+
1326,
|
268
|
+
|
269
|
+
3966,
|
270
|
+
|
271
|
+
1327,
|
272
|
+
|
273
|
+
3969,
|
274
|
+
|
275
|
+
3965,
|
276
|
+
|
277
|
+
1328,
|
278
|
+
|
279
|
+
3976,
|
280
|
+
|
281
|
+
3970,
|
282
|
+
|
283
|
+
3946,
|
284
|
+
|
285
|
+
1329,
|
286
|
+
|
287
|
+
3963,
|
288
|
+
|
289
|
+
1330,
|
290
|
+
|
291
|
+
3977,
|
292
|
+
|
293
|
+
1331,
|
294
|
+
|
295
|
+
3962,
|
296
|
+
|
297
|
+
1332,
|
298
|
+
|
299
|
+
3953,
|
300
|
+
|
301
|
+
1333,
|
302
|
+
|
303
|
+
3961,
|
304
|
+
|
305
|
+
3955,
|
306
|
+
|
307
|
+
1334,
|
308
|
+
|
309
|
+
3956,
|
310
|
+
|
311
|
+
1335,
|
312
|
+
|
313
|
+
1336,
|
314
|
+
|
315
|
+
1337,
|
316
|
+
|
317
|
+
1338,
|
318
|
+
|
319
|
+
3942,
|
320
|
+
|
321
|
+
1339,
|
322
|
+
|
323
|
+
1340,
|
324
|
+
|
325
|
+
1341,
|
326
|
+
|
327
|
+
1342,
|
328
|
+
|
329
|
+
3945,
|
330
|
+
|
331
|
+
1343,
|
332
|
+
|
333
|
+
1344,
|
334
|
+
|
335
|
+
1345,
|
336
|
+
|
337
|
+
1346,
|
338
|
+
|
339
|
+
1347,
|
340
|
+
|
341
|
+
1348,
|
342
|
+
|
343
|
+
1349,
|
344
|
+
|
345
|
+
1350,
|
346
|
+
|
347
|
+
1351,
|
348
|
+
|
349
|
+
1352,
|
350
|
+
|
351
|
+
1353,
|
352
|
+
|
353
|
+
1354,
|
354
|
+
|
355
|
+
3975,
|
356
|
+
|
357
|
+
1357,
|
358
|
+
|
359
|
+
1358,
|
360
|
+
|
361
|
+
1362,
|
362
|
+
|
363
|
+
1364,
|
364
|
+
|
365
|
+
1365,
|
366
|
+
|
367
|
+
1366,
|
368
|
+
|
369
|
+
1367,
|
370
|
+
|
371
|
+
1384,
|
372
|
+
|
373
|
+
1385,
|
374
|
+
|
375
|
+
1386,
|
376
|
+
|
377
|
+
1387,
|
378
|
+
|
379
|
+
1388,
|
380
|
+
|
381
|
+
1389,
|
382
|
+
|
383
|
+
1390,
|
384
|
+
|
385
|
+
3978,
|
386
|
+
|
387
|
+
1391,
|
388
|
+
|
389
|
+
1730,
|
390
|
+
|
391
|
+
4114,
|
392
|
+
|
393
|
+
1731,
|
394
|
+
|
395
|
+
1732,
|
396
|
+
|
397
|
+
1733,
|
398
|
+
|
399
|
+
4107,
|
400
|
+
|
401
|
+
1734,
|
402
|
+
|
403
|
+
1735,
|
404
|
+
|
405
|
+
1736,
|
406
|
+
|
407
|
+
1737,
|
408
|
+
|
409
|
+
1738;
|
410
|
+
|
411
|
+
0.605239,
|
412
|
+
|
413
|
+
0.605239,
|
414
|
+
|
415
|
+
0.605239,
|
416
|
+
|
417
|
+
0.605239,
|
418
|
+
|
419
|
+
0.208568,
|
420
|
+
|
421
|
+
0.208568,
|
422
|
+
|
423
|
+
0.332183,
|
424
|
+
|
425
|
+
0.332183,
|
426
|
+
|
427
|
+
0.490972,
|
428
|
+
|
429
|
+
0.001349,
|
430
|
+
|
431
|
+
0.378335,
|
432
|
+
|
433
|
+
0.378335,
|
434
|
+
|
435
|
+
0.505176,
|
436
|
+
|
437
|
+
0.547675,
|
438
|
+
|
439
|
+
0.378478,
|
440
|
+
|
441
|
+
0.378478,
|
442
|
+
|
443
|
+
0.520681,
|
444
|
+
|
445
|
+
0.520681,
|
446
|
+
|
447
|
+
0.514052,
|
448
|
+
|
449
|
+
0.514052,
|
450
|
+
|
451
|
+
0.514052,
|
452
|
+
|
453
|
+
0.489167,
|
454
|
+
|
455
|
+
0.489167,
|
456
|
+
|
457
|
+
0.500779,
|
458
|
+
|
459
|
+
0.500779,
|
460
|
+
|
461
|
+
0.344750,
|
462
|
+
|
463
|
+
0.344750,
|
464
|
+
|
465
|
+
0.344750,
|
466
|
+
|
467
|
+
0.444251,
|
468
|
+
|
469
|
+
0.444251,
|
470
|
+
|
471
|
+
0.422197,
|
472
|
+
|
473
|
+
0.422197,
|
474
|
+
|
475
|
+
0.459563,
|
476
|
+
|
477
|
+
0.459563,
|
478
|
+
|
479
|
+
1.000000,
|
480
|
+
|
481
|
+
1.000000,
|
482
|
+
|
483
|
+
0.523285,
|
484
|
+
|
485
|
+
0.702523,
|
486
|
+
|
487
|
+
1.000000,
|
488
|
+
|
489
|
+
1.000000,
|
490
|
+
|
491
|
+
1.000000,
|
492
|
+
|
493
|
+
1.000000,
|
494
|
+
|
495
|
+
1.000000,
|
496
|
+
|
497
|
+
0.754566,
|
498
|
+
|
499
|
+
0.754566,
|
500
|
+
|
501
|
+
1.000000,
|
502
|
+
|
503
|
+
1.000000,
|
504
|
+
|
505
|
+
1.000000,
|
506
|
+
|
507
|
+
1.000000,
|
508
|
+
|
509
|
+
1.000000,
|
510
|
+
|
511
|
+
0.999998,
|
512
|
+
|
513
|
+
0.999998,
|
514
|
+
|
515
|
+
1.000000,
|
516
|
+
|
517
|
+
1.000000,
|
518
|
+
|
519
|
+
1.000000,
|
520
|
+
|
521
|
+
1.000000,
|
522
|
+
|
523
|
+
1.000000,
|
524
|
+
|
525
|
+
1.000000,
|
526
|
+
|
527
|
+
0.937900,
|
528
|
+
|
529
|
+
0.937900,
|
530
|
+
|
531
|
+
0.843455,
|
532
|
+
|
533
|
+
0.843455,
|
534
|
+
|
535
|
+
1.000000,
|
536
|
+
|
537
|
+
1.000000,
|
538
|
+
|
539
|
+
0.692347,
|
540
|
+
|
541
|
+
0.536598,
|
542
|
+
|
543
|
+
0.635737,
|
544
|
+
|
545
|
+
0.793743,
|
546
|
+
|
547
|
+
1.000000,
|
548
|
+
|
549
|
+
....省略
|
550
|
+
|
551
|
+
|
552
|
+
|
553
|
+
Frame Box01 {
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
|
558
|
+
|
559
|
+
FrameTransformMatrix {
|
560
|
+
|
561
|
+
-1.000000,0.000000,-0.000000,0.000000,-0.000000,0.000000,1.000000,0.000000,0.000000,1.000000,0.000000,0.000000,-88.696747,-246.341751,858.815247,1.000000;;
|
562
|
+
|
563
|
+
}
|
564
|
+
|
565
|
+
|
566
|
+
|
567
|
+
Frame Bip01 {
|
568
|
+
|
61
569
|
|
62
570
|
|
63
571
|
|
64
572
|
|
65
573
|
FrameTransformMatrix {
|
66
574
|
|
67
|
-
1
|
575
|
+
0.186552,-0.974653,0.123489,0.000000,0.982171,0.187991,0.000000,0.000000,-0.023215,0.121288,0.992346,0.000000,-88.977890,-857.346008,247.541595,1.000000;;
|
68
576
|
|
69
577
|
}
|
70
578
|
|
71
579
|
|
72
580
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
0,
|
86
|
-
|
87
|
-
3449,
|
88
|
-
|
89
|
-
3429,
|
90
|
-
|
91
|
-
3427,
|
92
|
-
|
93
|
-
2,
|
94
|
-
|
95
|
-
3454,
|
96
|
-
|
97
|
-
4,
|
98
|
-
|
99
|
-
3453,
|
100
|
-
|
101
|
-
7,
|
102
|
-
|
103
|
-
15,
|
104
|
-
|
105
|
-
68,
|
106
|
-
|
107
|
-
3456,
|
108
|
-
|
109
|
-
69,
|
110
|
-
|
111
|
-
70,
|
112
|
-
|
113
|
-
71,
|
114
|
-
|
115
|
-
3455,
|
116
|
-
|
117
|
-
72,
|
118
|
-
|
119
|
-
3940,
|
120
|
-
|
121
|
-
73,
|
122
|
-
|
123
|
-
4110,
|
124
|
-
|
125
|
-
4109,
|
126
|
-
|
127
|
-
74,
|
128
|
-
|
129
|
-
4108,
|
130
|
-
|
131
|
-
75,
|
132
|
-
|
133
|
-
3980,
|
134
|
-
|
135
|
-
76,
|
136
|
-
|
137
|
-
4113,
|
138
|
-
|
139
|
-
3936,
|
140
|
-
|
141
|
-
77,
|
142
|
-
|
143
|
-
3939,
|
144
|
-
|
145
|
-
78,
|
146
|
-
|
147
|
-
3979,
|
148
|
-
|
149
|
-
79,
|
150
|
-
|
151
|
-
3981,
|
152
|
-
|
153
|
-
1294,
|
154
|
-
|
155
|
-
1295,
|
156
|
-
|
157
|
-
1296,
|
158
|
-
|
159
|
-
1297,
|
160
|
-
|
161
|
-
1298,
|
162
|
-
|
163
|
-
3950,
|
164
|
-
|
165
|
-
1299,
|
166
|
-
|
167
|
-
3937,
|
168
|
-
|
169
|
-
1300,
|
170
|
-
|
171
|
-
1301,
|
172
|
-
|
173
|
-
3938,
|
174
|
-
|
175
|
-
1302,
|
176
|
-
|
177
|
-
3958,
|
178
|
-
|
179
|
-
3949,
|
180
|
-
|
181
|
-
1303,
|
182
|
-
|
183
|
-
3948,
|
184
|
-
|
185
|
-
1304,
|
186
|
-
|
187
|
-
3954,
|
188
|
-
|
189
|
-
1305,
|
190
|
-
|
191
|
-
3951,
|
192
|
-
|
193
|
-
3941,
|
194
|
-
|
195
|
-
1306,
|
196
|
-
|
197
|
-
3960,
|
198
|
-
|
199
|
-
3952,
|
200
|
-
|
201
|
-
1307,
|
202
|
-
|
203
|
-
3943,
|
204
|
-
|
205
|
-
1308,
|
206
|
-
|
207
|
-
3944,
|
208
|
-
|
209
|
-
1309,
|
210
|
-
|
211
|
-
1310,
|
212
|
-
|
213
|
-
1311,
|
214
|
-
|
215
|
-
1312,
|
216
|
-
|
217
|
-
1313,
|
218
|
-
|
219
|
-
1314,
|
220
|
-
|
221
|
-
1315,
|
222
|
-
|
223
|
-
3957,
|
224
|
-
|
225
|
-
1316,
|
226
|
-
|
227
|
-
1317,
|
228
|
-
|
229
|
-
1318,
|
230
|
-
|
231
|
-
3959,
|
232
|
-
|
233
|
-
1319,
|
234
|
-
|
235
|
-
1320,
|
236
|
-
|
237
|
-
1321,
|
238
|
-
|
239
|
-
1322,
|
240
|
-
|
241
|
-
1323,
|
242
|
-
|
243
|
-
1324,
|
244
|
-
|
245
|
-
3967,
|
246
|
-
|
247
|
-
3947,
|
248
|
-
|
249
|
-
1325,
|
250
|
-
|
251
|
-
3971,
|
252
|
-
|
253
|
-
1326,
|
254
|
-
|
255
|
-
3966,
|
256
|
-
|
257
|
-
1327,
|
258
|
-
|
259
|
-
3969,
|
260
|
-
|
261
|
-
3965,
|
262
|
-
|
263
|
-
1328,
|
264
|
-
|
265
|
-
3976,
|
266
|
-
|
267
|
-
3970,
|
268
|
-
|
269
|
-
3946,
|
270
|
-
|
271
|
-
1329,
|
272
|
-
|
273
|
-
3963,
|
274
|
-
|
275
|
-
1330,
|
276
|
-
|
277
|
-
3977,
|
278
|
-
|
279
|
-
1331,
|
280
|
-
|
281
|
-
3962,
|
282
|
-
|
283
|
-
1332,
|
284
|
-
|
285
|
-
3953,
|
286
|
-
|
287
|
-
1333,
|
288
|
-
|
289
|
-
3961,
|
290
|
-
|
291
|
-
3955,
|
292
|
-
|
293
|
-
1334,
|
294
|
-
|
295
|
-
3956,
|
296
|
-
|
297
|
-
1335,
|
298
|
-
|
299
|
-
1336,
|
300
|
-
|
301
|
-
1337,
|
302
|
-
|
303
|
-
1338,
|
304
|
-
|
305
|
-
3942,
|
306
|
-
|
307
|
-
1339,
|
308
|
-
|
309
|
-
1340,
|
310
|
-
|
311
|
-
1341,
|
312
|
-
|
313
|
-
1342,
|
314
|
-
|
315
|
-
3945,
|
316
|
-
|
317
|
-
1343,
|
318
|
-
|
319
|
-
1344,
|
320
|
-
|
321
|
-
1345,
|
322
|
-
|
323
|
-
1346,
|
324
|
-
|
325
|
-
1347,
|
326
|
-
|
327
|
-
1348,
|
328
|
-
|
329
|
-
1349,
|
330
|
-
|
331
|
-
1350,
|
332
|
-
|
333
|
-
1351,
|
334
|
-
|
335
|
-
1352,
|
336
|
-
|
337
|
-
1353,
|
338
|
-
|
339
|
-
1354,
|
340
|
-
|
341
|
-
3975,
|
342
|
-
|
343
|
-
1357,
|
344
|
-
|
345
|
-
1358,
|
346
|
-
|
347
|
-
1362,
|
348
|
-
|
349
|
-
1364,
|
350
|
-
|
351
|
-
1365,
|
352
|
-
|
353
|
-
1366,
|
354
|
-
|
355
|
-
1367,
|
356
|
-
|
357
|
-
1384,
|
358
|
-
|
359
|
-
1385,
|
360
|
-
|
361
|
-
1386,
|
362
|
-
|
363
|
-
1387,
|
364
|
-
|
365
|
-
1388,
|
366
|
-
|
367
|
-
1389,
|
368
|
-
|
369
|
-
1390,
|
370
|
-
|
371
|
-
3978,
|
372
|
-
|
373
|
-
1391,
|
374
|
-
|
375
|
-
1730,
|
376
|
-
|
377
|
-
4114,
|
378
|
-
|
379
|
-
1731,
|
380
|
-
|
381
|
-
1732,
|
382
|
-
|
383
|
-
1733,
|
384
|
-
|
385
|
-
4107,
|
386
|
-
|
387
|
-
1734,
|
388
|
-
|
389
|
-
1735,
|
390
|
-
|
391
|
-
1736,
|
392
|
-
|
393
|
-
1737,
|
394
|
-
|
395
|
-
1738;
|
396
|
-
|
397
|
-
0.605239,
|
398
|
-
|
399
|
-
0.605239,
|
400
|
-
|
401
|
-
0.605239,
|
402
|
-
|
403
|
-
0.605239,
|
404
|
-
|
405
|
-
0.208568,
|
406
|
-
|
407
|
-
0.208568,
|
408
|
-
|
409
|
-
0.332183,
|
410
|
-
|
411
|
-
0.332183,
|
412
|
-
|
413
|
-
0.490972,
|
414
|
-
|
415
|
-
0.001349,
|
416
|
-
|
417
|
-
0.378335,
|
418
|
-
|
419
|
-
0.378335,
|
420
|
-
|
421
|
-
0.505176,
|
422
|
-
|
423
|
-
0.547675,
|
424
|
-
|
425
|
-
0.378478,
|
426
|
-
|
427
|
-
0.378478,
|
428
|
-
|
429
|
-
0.520681,
|
430
|
-
|
431
|
-
0.520681,
|
432
|
-
|
433
|
-
0.514052,
|
434
|
-
|
435
|
-
0.514052,
|
436
|
-
|
437
|
-
0.514052,
|
438
|
-
|
439
|
-
0.489167,
|
440
|
-
|
441
|
-
0.489167,
|
442
|
-
|
443
|
-
0.500779,
|
444
|
-
|
445
|
-
0.500779,
|
446
|
-
|
447
|
-
0.344750,
|
448
|
-
|
449
|
-
0.344750,
|
450
|
-
|
451
|
-
0.344750,
|
452
|
-
|
453
|
-
0.444251,
|
454
|
-
|
455
|
-
0.444251,
|
456
|
-
|
457
|
-
0.422197,
|
458
|
-
|
459
|
-
0.422197,
|
460
|
-
|
461
|
-
0.459563,
|
462
|
-
|
463
|
-
0.459563,
|
464
|
-
|
465
|
-
1.000000,
|
466
|
-
|
467
|
-
1.000000,
|
468
|
-
|
469
|
-
0.523285,
|
470
|
-
|
471
|
-
0.702523,
|
472
|
-
|
473
|
-
1.000000,
|
474
|
-
|
475
|
-
1.000000,
|
476
|
-
|
477
|
-
1.000000,
|
478
|
-
|
479
|
-
1.000000,
|
480
|
-
|
481
|
-
1.000000,
|
482
|
-
|
483
|
-
0.754566,
|
484
|
-
|
485
|
-
0.754566,
|
486
|
-
|
487
|
-
1.000000,
|
488
|
-
|
489
|
-
1.000000,
|
490
|
-
|
491
|
-
1.000000,
|
492
|
-
|
493
|
-
1.000000,
|
494
|
-
|
495
|
-
1.000000,
|
496
|
-
|
497
|
-
0.999998,
|
498
|
-
|
499
|
-
0.999998,
|
500
|
-
|
501
|
-
1.000000,
|
502
|
-
|
503
|
-
1.000000,
|
504
|
-
|
505
|
-
1.000000,
|
506
|
-
|
507
|
-
1.000000,
|
508
|
-
|
509
|
-
1.000000,
|
510
|
-
|
511
|
-
1.000000,
|
512
|
-
|
513
|
-
0.937900,
|
514
|
-
|
515
|
-
0.937900,
|
516
|
-
|
517
|
-
0.843455,
|
518
|
-
|
519
|
-
0.843455,
|
520
|
-
|
521
|
-
1.000000,
|
522
|
-
|
523
|
-
1.000000,
|
524
|
-
|
525
|
-
0.692347,
|
526
|
-
|
527
|
-
0.536598,
|
528
|
-
|
529
|
-
0.635737,
|
530
|
-
|
531
|
-
0.793743,
|
532
|
-
|
533
|
-
1.000000,
|
534
|
-
|
535
|
-
....省略
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
Frame Box01 {
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
FrameTransformMatrix {
|
546
|
-
|
547
|
-
-1.000000,0.000000,-0.000000,0.000000,-0.000000,0.000000,1.000000,0.000000,0.000000,1.000000,0.000000,0.000000,-88.696747,-246.341751,858.815247,1.000000;;
|
548
|
-
|
549
|
-
}
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
Frame Bip01 {
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
FrameTransformMatrix {
|
560
|
-
|
561
|
-
0.186552,-0.974653,0.123489,0.000000,0.982171,0.187991,0.000000,0.000000,-0.023215,0.121288,0.992346,0.000000,-88.977890,-857.346008,247.541595,1.000000;;
|
581
|
+
Frame Bip01_Footsteps {
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
|
586
|
+
|
587
|
+
FrameTransformMatrix {
|
588
|
+
|
589
|
+
0.186552,0.982171,-0.023215,0.000000,-0.974653,0.187991,0.121288,0.000000,0.123489,-0.000000,0.992346,0.000000,-31.624149,0.000000,-254.128143,1.000000;;
|
590
|
+
|
591
|
+
}
|
562
592
|
|
563
593
|
}
|
564
594
|
|
565
595
|
|
566
596
|
|
567
|
-
Frame Bip01_
|
597
|
+
Frame Bip01_Pelvis {
|
568
598
|
|
569
599
|
|
570
600
|
|
@@ -572,26 +602,10 @@
|
|
572
602
|
|
573
603
|
FrameTransformMatrix {
|
574
604
|
|
575
|
-
0.
|
605
|
+
-0.000000,0.011807,0.999930,0.000000,1.000000,0.000001,-0.000000,0.000000,-0.000001,0.999930,-0.011807,0.000000,-2.454305,-1.950977,-0.000005,1.000000;;
|
576
606
|
|
577
607
|
}
|
578
608
|
|
579
|
-
}
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
Frame Bip01_Pelvis {
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
FrameTransformMatrix {
|
590
|
-
|
591
|
-
-0.000000,0.011807,0.999930,0.000000,1.000000,0.000001,-0.000000,0.000000,-0.000001,0.999930,-0.011807,0.000000,-2.454305,-1.950977,-0.000005,1.000000;;
|
592
|
-
|
593
|
-
}
|
594
|
-
|
595
609
|
|
596
610
|
|
597
611
|
Frame Bip01_Spine {
|
9
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,7 +24,7 @@
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
-
以下が算出
|
27
|
+
以下が算出で使いたいxファイルの一部です。
|
28
28
|
|
29
29
|
|
30
30
|
|
8
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,7 +24,7 @@
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
-
以下がxファイルの一部です。
|
27
|
+
以下が算出したいxファイルの一部です。
|
28
28
|
|
29
29
|
|
30
30
|
|
7
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,6 +22,12 @@
|
|
22
22
|
|
23
23
|
|
24
24
|
|
25
|
+
|
26
|
+
|
27
|
+
以下がxファイルの一部です。
|
28
|
+
|
29
|
+
|
30
|
+
|
25
31
|
> Frame Scene_Root {
|
26
32
|
|
27
33
|
|
6
文の追加
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
xファイルのFrameについて
|
1
|
+
xファイルのFrameについて算出方法がわかりません。
|
test
CHANGED
File without changes
|
5
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -526,180 +526,286 @@
|
|
526
526
|
|
527
527
|
1.000000,
|
528
528
|
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
0.512201,
|
570
|
-
|
571
|
-
0.512201,
|
572
|
-
|
573
|
-
0.512201,
|
574
|
-
|
575
|
-
0.512201,
|
576
|
-
|
577
|
-
0.500000,
|
578
|
-
|
579
|
-
0.500000,
|
580
|
-
|
581
|
-
0.564140,
|
582
|
-
|
583
|
-
0.564140,
|
584
|
-
|
585
|
-
0.499982,
|
586
|
-
|
587
|
-
0.499982,
|
588
|
-
|
589
|
-
0.999997,
|
590
|
-
|
591
|
-
0.999997,
|
592
|
-
|
593
|
-
1.000000,
|
594
|
-
|
595
|
-
1.000000,
|
596
|
-
|
597
|
-
1.000000,
|
598
|
-
|
599
|
-
1.000000,
|
600
|
-
|
601
|
-
1.000000,
|
602
|
-
|
603
|
-
1.000000,
|
604
|
-
|
605
|
-
1.000000,
|
606
|
-
|
607
|
-
1.000000,
|
608
|
-
|
609
|
-
1.000000,
|
610
|
-
|
611
|
-
1.000000,
|
612
|
-
|
613
|
-
1.000000,
|
614
|
-
|
615
|
-
1.000000,
|
616
|
-
|
617
|
-
1.000000,
|
618
|
-
|
619
|
-
1.000000,
|
620
|
-
|
621
|
-
1.000000,
|
622
|
-
|
623
|
-
0.995135,
|
624
|
-
|
625
|
-
0.936519,
|
626
|
-
|
627
|
-
1.000000,
|
628
|
-
|
629
|
-
0.999529,
|
630
|
-
|
631
|
-
0.980016,
|
632
|
-
|
633
|
-
0.999871,
|
634
|
-
|
635
|
-
0.999950,
|
636
|
-
|
637
|
-
1.000000,
|
638
|
-
|
639
|
-
0.951632,
|
640
|
-
|
641
|
-
0.002571,
|
642
|
-
|
643
|
-
0.000138,
|
644
|
-
|
645
|
-
0.003704,
|
646
|
-
|
647
|
-
0.003704,
|
648
|
-
|
649
|
-
0.000096,
|
650
|
-
|
651
|
-
0.000000,
|
652
|
-
|
653
|
-
0.000217,
|
654
|
-
|
655
|
-
0.000002,
|
656
|
-
|
657
|
-
0.000020,
|
658
|
-
|
659
|
-
0.000376,
|
660
|
-
|
661
|
-
0.001713,
|
662
|
-
|
663
|
-
0.017345,
|
664
|
-
|
665
|
-
0.266756,
|
666
|
-
|
667
|
-
0.080934,
|
668
|
-
|
669
|
-
0.226163,
|
670
|
-
|
671
|
-
0.796931,
|
672
|
-
|
673
|
-
1.000000,
|
674
|
-
|
675
|
-
1.000000,
|
676
|
-
|
677
|
-
1.000000,
|
678
|
-
|
679
|
-
0.171247,
|
680
|
-
|
681
|
-
0.501141,
|
682
|
-
|
683
|
-
0.501141,
|
684
|
-
|
685
|
-
0.569803,
|
686
|
-
|
687
|
-
0.914754,
|
688
|
-
|
689
|
-
0.873090,
|
690
|
-
|
691
|
-
0.873090,
|
692
|
-
|
693
|
-
1.000000,
|
694
|
-
|
695
|
-
1.000000,
|
696
|
-
|
697
|
-
0.999889,
|
698
|
-
|
699
|
-
0.999994,
|
700
|
-
|
701
|
-
0.979129;
|
702
|
-
|
703
|
-
-0.941743,-0.646748,0.574719,0.000000,-0.283133,-0.461979,-0.983825,0.000000,0.923060,-1.114919,0.257891,0.000000,-65.499557,30.497688,12.852692,1.000000;;
|
529
|
+
....省略
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
Frame Box01 {
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
|
538
|
+
|
539
|
+
FrameTransformMatrix {
|
540
|
+
|
541
|
+
-1.000000,0.000000,-0.000000,0.000000,-0.000000,0.000000,1.000000,0.000000,0.000000,1.000000,0.000000,0.000000,-88.696747,-246.341751,858.815247,1.000000;;
|
542
|
+
|
543
|
+
}
|
544
|
+
|
545
|
+
|
546
|
+
|
547
|
+
Frame Bip01 {
|
548
|
+
|
549
|
+
|
550
|
+
|
551
|
+
|
552
|
+
|
553
|
+
FrameTransformMatrix {
|
554
|
+
|
555
|
+
0.186552,-0.974653,0.123489,0.000000,0.982171,0.187991,0.000000,0.000000,-0.023215,0.121288,0.992346,0.000000,-88.977890,-857.346008,247.541595,1.000000;;
|
556
|
+
|
557
|
+
}
|
558
|
+
|
559
|
+
|
560
|
+
|
561
|
+
Frame Bip01_Footsteps {
|
562
|
+
|
563
|
+
|
564
|
+
|
565
|
+
|
566
|
+
|
567
|
+
FrameTransformMatrix {
|
568
|
+
|
569
|
+
0.186552,0.982171,-0.023215,0.000000,-0.974653,0.187991,0.121288,0.000000,0.123489,-0.000000,0.992346,0.000000,-31.624149,0.000000,-254.128143,1.000000;;
|
704
570
|
|
705
571
|
}
|
572
|
+
|
573
|
+
}
|
574
|
+
|
575
|
+
|
576
|
+
|
577
|
+
Frame Bip01_Pelvis {
|
578
|
+
|
579
|
+
|
580
|
+
|
581
|
+
|
582
|
+
|
583
|
+
FrameTransformMatrix {
|
584
|
+
|
585
|
+
-0.000000,0.011807,0.999930,0.000000,1.000000,0.000001,-0.000000,0.000000,-0.000001,0.999930,-0.011807,0.000000,-2.454305,-1.950977,-0.000005,1.000000;;
|
586
|
+
|
587
|
+
}
|
588
|
+
|
589
|
+
|
590
|
+
|
591
|
+
Frame Bip01_Spine {
|
592
|
+
|
593
|
+
|
594
|
+
|
595
|
+
|
596
|
+
|
597
|
+
FrameTransformMatrix {
|
598
|
+
|
599
|
+
0.999137,0.041531,0.000982,0.000000,-0.040353,0.975880,-0.214545,0.000000,-0.009868,0.214320,0.976714,0.000000,27.422213,8.709480,-0.319006,1.000000;;
|
600
|
+
|
601
|
+
}
|
602
|
+
|
603
|
+
|
604
|
+
|
605
|
+
Frame Bip01_Spine1 {
|
606
|
+
|
607
|
+
|
608
|
+
|
609
|
+
|
610
|
+
|
611
|
+
FrameTransformMatrix {
|
612
|
+
|
613
|
+
0.984808,-0.173648,-0.000000,0.000000,0.173648,0.984808,-0.000000,0.000000,0.000000,-0.000000,1.000000,0.000000,28.178080,-0.022084,0.000000,1.000000;;
|
614
|
+
|
615
|
+
}
|
616
|
+
|
617
|
+
|
618
|
+
|
619
|
+
Frame Bip01_Spine2 {
|
620
|
+
|
621
|
+
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
FrameTransformMatrix {
|
626
|
+
|
627
|
+
0.999958,0.008483,0.003477,0.000000,-0.008313,0.998890,-0.046374,0.000000,-0.003867,0.046343,0.998918,0.000000,28.182159,-0.022430,0.001040,1.000000;;
|
628
|
+
|
629
|
+
}
|
630
|
+
|
631
|
+
|
632
|
+
|
633
|
+
Frame Bip01_Spine3 {
|
634
|
+
|
635
|
+
|
636
|
+
|
637
|
+
|
638
|
+
|
639
|
+
FrameTransformMatrix {
|
640
|
+
|
641
|
+
0.999837,-0.017696,0.003477,0.000000,0.017838,0.998765,-0.046374,0.000000,-0.002652,0.046428,0.998918,0.000000,28.181417,-0.033880,0.001568,1.000000;;
|
642
|
+
|
643
|
+
}
|
644
|
+
|
645
|
+
|
646
|
+
|
647
|
+
Frame Bip01_Neck {
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
|
652
|
+
|
653
|
+
FrameTransformMatrix {
|
654
|
+
|
655
|
+
0.861629,0.507538,0.000001,0.000000,-0.507538,0.861629,-0.000000,0.000000,-0.000001,-0.000000,1.000000,0.000000,42.566055,-0.019138,0.000001,1.000000;;
|
656
|
+
|
657
|
+
}
|
658
|
+
|
659
|
+
|
660
|
+
|
661
|
+
Frame Bip01_Head {
|
662
|
+
|
663
|
+
|
664
|
+
|
665
|
+
|
666
|
+
|
667
|
+
FrameTransformMatrix {
|
668
|
+
|
669
|
+
0.979775,-0.188667,-0.066683,0.000000,0.195389,0.973921,0.115333,0.000000,0.043184,-0.126029,0.991086,0.000000,27.900173,0.000003,0.000000,1.000000;;
|
670
|
+
|
671
|
+
}
|
672
|
+
|
673
|
+
|
674
|
+
|
675
|
+
Frame Dummy21 {
|
676
|
+
|
677
|
+
|
678
|
+
|
679
|
+
|
680
|
+
|
681
|
+
FrameTransformMatrix {
|
682
|
+
|
683
|
+
1.000000,-0.000000,-0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,-0.000000,1.000000,0.000000,59.615768,0.000027,0.000002,1.000000;;
|
684
|
+
|
685
|
+
}
|
686
|
+
|
687
|
+
}
|
688
|
+
|
689
|
+
}
|
690
|
+
|
691
|
+
|
692
|
+
|
693
|
+
Frame Bip01_L_Clavicle {
|
694
|
+
|
695
|
+
|
696
|
+
|
697
|
+
|
698
|
+
|
699
|
+
FrameTransformMatrix {
|
700
|
+
|
701
|
+
-0.185356,0.308957,0.932839,0.000000,-0.499811,-0.846968,0.181203,0.000000,0.846069,-0.432656,0.311411,0.000000,-12.374969,4.006883,8.346215,1.000000;;
|
702
|
+
|
703
|
+
}
|
704
|
+
|
705
|
+
|
706
|
+
|
707
|
+
Frame Bip01_L_UpperArm {
|
708
|
+
|
709
|
+
|
710
|
+
|
711
|
+
|
712
|
+
|
713
|
+
FrameTransformMatrix {
|
714
|
+
|
715
|
+
0.640423,0.117307,-0.759011,0.000000,0.064965,0.976451,0.205728,0.000000,0.765270,-0.181062,0.617720,0.000000,31.000208,-0.000032,-0.000004,1.000000;;
|
716
|
+
|
717
|
+
}
|
718
|
+
|
719
|
+
|
720
|
+
|
721
|
+
Frame Bip01_L_Forearm {
|
722
|
+
|
723
|
+
|
724
|
+
|
725
|
+
|
726
|
+
|
727
|
+
FrameTransformMatrix {
|
728
|
+
|
729
|
+
0.485335,-0.874328,-0.000000,0.000000,0.874328,0.485335,0.000000,0.000000,-0.000000,-0.000000,1.000000,0.000000,89.202522,-0.000023,0.000014,1.000000;;
|
730
|
+
|
731
|
+
}
|
732
|
+
|
733
|
+
|
734
|
+
|
735
|
+
Frame Bip01_L_Hand {
|
736
|
+
|
737
|
+
|
738
|
+
|
739
|
+
|
740
|
+
|
741
|
+
FrameTransformMatrix {
|
742
|
+
|
743
|
+
0.999511,-0.027531,-0.014824,0.000000,-0.015327,-0.018154,-0.999718,0.000000,0.027254,0.999456,-0.018567,0.000000,61.671467,0.000001,-0.000001,1.000000;;
|
744
|
+
|
745
|
+
}
|
746
|
+
|
747
|
+
|
748
|
+
|
749
|
+
Frame Bip01_L_Finger0 {
|
750
|
+
|
751
|
+
|
752
|
+
|
753
|
+
|
754
|
+
|
755
|
+
FrameTransformMatrix {
|
756
|
+
|
757
|
+
0.713247,-0.002867,-0.700906,0.000000,-0.700353,-0.042855,-0.712509,0.000000,-0.027995,0.999077,-0.032574,0.000000,12.410522,3.054963,-10.755418,1.000000;;
|
758
|
+
|
759
|
+
}
|
760
|
+
|
761
|
+
|
762
|
+
|
763
|
+
Frame Bip01_L_Finger01 {
|
764
|
+
|
765
|
+
|
766
|
+
|
767
|
+
|
768
|
+
|
769
|
+
FrameTransformMatrix {
|
770
|
+
|
771
|
+
1.000000,-0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,-0.000000,0.000000,1.000000,0.000000,10.075084,0.000006,-0.000007,1.000000;;
|
772
|
+
|
773
|
+
}
|
774
|
+
|
775
|
+
|
776
|
+
|
777
|
+
Frame Bip01_L_Finger02 {
|
778
|
+
|
779
|
+
|
780
|
+
|
781
|
+
|
782
|
+
|
783
|
+
FrameTransformMatrix {
|
784
|
+
|
785
|
+
1.000000,-0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,-0.000000,0.000000,1.000000,0.000000,5.961566,-0.000008,0.000006,1.000000;;
|
786
|
+
|
787
|
+
}
|
788
|
+
|
789
|
+
|
790
|
+
|
791
|
+
Frame Dummy06 {
|
792
|
+
|
793
|
+
|
794
|
+
|
795
|
+
|
796
|
+
|
797
|
+
FrameTransformMatrix {
|
798
|
+
|
799
|
+
1.000000,-0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,-0.000000,0.000000,1.000000,0.000000,5.961566,-0.000008,0.000003,1.000000;;
|
800
|
+
|
801
|
+
}
|
802
|
+
|
803
|
+
}
|
804
|
+
|
805
|
+
}
|
806
|
+
|
807
|
+
}
|
808
|
+
|
809
|
+
}
|
810
|
+
|
811
|
+
```
|
4
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -67,3 +67,639 @@
|
|
67
67
|
|
68
68
|
|
69
69
|
まずこれはなんなのかという
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
> SkinWeights {
|
74
|
+
|
75
|
+
"Bip01_R_UpperArm";
|
76
|
+
|
77
|
+
156;
|
78
|
+
|
79
|
+
0,
|
80
|
+
|
81
|
+
3449,
|
82
|
+
|
83
|
+
3429,
|
84
|
+
|
85
|
+
3427,
|
86
|
+
|
87
|
+
2,
|
88
|
+
|
89
|
+
3454,
|
90
|
+
|
91
|
+
4,
|
92
|
+
|
93
|
+
3453,
|
94
|
+
|
95
|
+
7,
|
96
|
+
|
97
|
+
15,
|
98
|
+
|
99
|
+
68,
|
100
|
+
|
101
|
+
3456,
|
102
|
+
|
103
|
+
69,
|
104
|
+
|
105
|
+
70,
|
106
|
+
|
107
|
+
71,
|
108
|
+
|
109
|
+
3455,
|
110
|
+
|
111
|
+
72,
|
112
|
+
|
113
|
+
3940,
|
114
|
+
|
115
|
+
73,
|
116
|
+
|
117
|
+
4110,
|
118
|
+
|
119
|
+
4109,
|
120
|
+
|
121
|
+
74,
|
122
|
+
|
123
|
+
4108,
|
124
|
+
|
125
|
+
75,
|
126
|
+
|
127
|
+
3980,
|
128
|
+
|
129
|
+
76,
|
130
|
+
|
131
|
+
4113,
|
132
|
+
|
133
|
+
3936,
|
134
|
+
|
135
|
+
77,
|
136
|
+
|
137
|
+
3939,
|
138
|
+
|
139
|
+
78,
|
140
|
+
|
141
|
+
3979,
|
142
|
+
|
143
|
+
79,
|
144
|
+
|
145
|
+
3981,
|
146
|
+
|
147
|
+
1294,
|
148
|
+
|
149
|
+
1295,
|
150
|
+
|
151
|
+
1296,
|
152
|
+
|
153
|
+
1297,
|
154
|
+
|
155
|
+
1298,
|
156
|
+
|
157
|
+
3950,
|
158
|
+
|
159
|
+
1299,
|
160
|
+
|
161
|
+
3937,
|
162
|
+
|
163
|
+
1300,
|
164
|
+
|
165
|
+
1301,
|
166
|
+
|
167
|
+
3938,
|
168
|
+
|
169
|
+
1302,
|
170
|
+
|
171
|
+
3958,
|
172
|
+
|
173
|
+
3949,
|
174
|
+
|
175
|
+
1303,
|
176
|
+
|
177
|
+
3948,
|
178
|
+
|
179
|
+
1304,
|
180
|
+
|
181
|
+
3954,
|
182
|
+
|
183
|
+
1305,
|
184
|
+
|
185
|
+
3951,
|
186
|
+
|
187
|
+
3941,
|
188
|
+
|
189
|
+
1306,
|
190
|
+
|
191
|
+
3960,
|
192
|
+
|
193
|
+
3952,
|
194
|
+
|
195
|
+
1307,
|
196
|
+
|
197
|
+
3943,
|
198
|
+
|
199
|
+
1308,
|
200
|
+
|
201
|
+
3944,
|
202
|
+
|
203
|
+
1309,
|
204
|
+
|
205
|
+
1310,
|
206
|
+
|
207
|
+
1311,
|
208
|
+
|
209
|
+
1312,
|
210
|
+
|
211
|
+
1313,
|
212
|
+
|
213
|
+
1314,
|
214
|
+
|
215
|
+
1315,
|
216
|
+
|
217
|
+
3957,
|
218
|
+
|
219
|
+
1316,
|
220
|
+
|
221
|
+
1317,
|
222
|
+
|
223
|
+
1318,
|
224
|
+
|
225
|
+
3959,
|
226
|
+
|
227
|
+
1319,
|
228
|
+
|
229
|
+
1320,
|
230
|
+
|
231
|
+
1321,
|
232
|
+
|
233
|
+
1322,
|
234
|
+
|
235
|
+
1323,
|
236
|
+
|
237
|
+
1324,
|
238
|
+
|
239
|
+
3967,
|
240
|
+
|
241
|
+
3947,
|
242
|
+
|
243
|
+
1325,
|
244
|
+
|
245
|
+
3971,
|
246
|
+
|
247
|
+
1326,
|
248
|
+
|
249
|
+
3966,
|
250
|
+
|
251
|
+
1327,
|
252
|
+
|
253
|
+
3969,
|
254
|
+
|
255
|
+
3965,
|
256
|
+
|
257
|
+
1328,
|
258
|
+
|
259
|
+
3976,
|
260
|
+
|
261
|
+
3970,
|
262
|
+
|
263
|
+
3946,
|
264
|
+
|
265
|
+
1329,
|
266
|
+
|
267
|
+
3963,
|
268
|
+
|
269
|
+
1330,
|
270
|
+
|
271
|
+
3977,
|
272
|
+
|
273
|
+
1331,
|
274
|
+
|
275
|
+
3962,
|
276
|
+
|
277
|
+
1332,
|
278
|
+
|
279
|
+
3953,
|
280
|
+
|
281
|
+
1333,
|
282
|
+
|
283
|
+
3961,
|
284
|
+
|
285
|
+
3955,
|
286
|
+
|
287
|
+
1334,
|
288
|
+
|
289
|
+
3956,
|
290
|
+
|
291
|
+
1335,
|
292
|
+
|
293
|
+
1336,
|
294
|
+
|
295
|
+
1337,
|
296
|
+
|
297
|
+
1338,
|
298
|
+
|
299
|
+
3942,
|
300
|
+
|
301
|
+
1339,
|
302
|
+
|
303
|
+
1340,
|
304
|
+
|
305
|
+
1341,
|
306
|
+
|
307
|
+
1342,
|
308
|
+
|
309
|
+
3945,
|
310
|
+
|
311
|
+
1343,
|
312
|
+
|
313
|
+
1344,
|
314
|
+
|
315
|
+
1345,
|
316
|
+
|
317
|
+
1346,
|
318
|
+
|
319
|
+
1347,
|
320
|
+
|
321
|
+
1348,
|
322
|
+
|
323
|
+
1349,
|
324
|
+
|
325
|
+
1350,
|
326
|
+
|
327
|
+
1351,
|
328
|
+
|
329
|
+
1352,
|
330
|
+
|
331
|
+
1353,
|
332
|
+
|
333
|
+
1354,
|
334
|
+
|
335
|
+
3975,
|
336
|
+
|
337
|
+
1357,
|
338
|
+
|
339
|
+
1358,
|
340
|
+
|
341
|
+
1362,
|
342
|
+
|
343
|
+
1364,
|
344
|
+
|
345
|
+
1365,
|
346
|
+
|
347
|
+
1366,
|
348
|
+
|
349
|
+
1367,
|
350
|
+
|
351
|
+
1384,
|
352
|
+
|
353
|
+
1385,
|
354
|
+
|
355
|
+
1386,
|
356
|
+
|
357
|
+
1387,
|
358
|
+
|
359
|
+
1388,
|
360
|
+
|
361
|
+
1389,
|
362
|
+
|
363
|
+
1390,
|
364
|
+
|
365
|
+
3978,
|
366
|
+
|
367
|
+
1391,
|
368
|
+
|
369
|
+
1730,
|
370
|
+
|
371
|
+
4114,
|
372
|
+
|
373
|
+
1731,
|
374
|
+
|
375
|
+
1732,
|
376
|
+
|
377
|
+
1733,
|
378
|
+
|
379
|
+
4107,
|
380
|
+
|
381
|
+
1734,
|
382
|
+
|
383
|
+
1735,
|
384
|
+
|
385
|
+
1736,
|
386
|
+
|
387
|
+
1737,
|
388
|
+
|
389
|
+
1738;
|
390
|
+
|
391
|
+
0.605239,
|
392
|
+
|
393
|
+
0.605239,
|
394
|
+
|
395
|
+
0.605239,
|
396
|
+
|
397
|
+
0.605239,
|
398
|
+
|
399
|
+
0.208568,
|
400
|
+
|
401
|
+
0.208568,
|
402
|
+
|
403
|
+
0.332183,
|
404
|
+
|
405
|
+
0.332183,
|
406
|
+
|
407
|
+
0.490972,
|
408
|
+
|
409
|
+
0.001349,
|
410
|
+
|
411
|
+
0.378335,
|
412
|
+
|
413
|
+
0.378335,
|
414
|
+
|
415
|
+
0.505176,
|
416
|
+
|
417
|
+
0.547675,
|
418
|
+
|
419
|
+
0.378478,
|
420
|
+
|
421
|
+
0.378478,
|
422
|
+
|
423
|
+
0.520681,
|
424
|
+
|
425
|
+
0.520681,
|
426
|
+
|
427
|
+
0.514052,
|
428
|
+
|
429
|
+
0.514052,
|
430
|
+
|
431
|
+
0.514052,
|
432
|
+
|
433
|
+
0.489167,
|
434
|
+
|
435
|
+
0.489167,
|
436
|
+
|
437
|
+
0.500779,
|
438
|
+
|
439
|
+
0.500779,
|
440
|
+
|
441
|
+
0.344750,
|
442
|
+
|
443
|
+
0.344750,
|
444
|
+
|
445
|
+
0.344750,
|
446
|
+
|
447
|
+
0.444251,
|
448
|
+
|
449
|
+
0.444251,
|
450
|
+
|
451
|
+
0.422197,
|
452
|
+
|
453
|
+
0.422197,
|
454
|
+
|
455
|
+
0.459563,
|
456
|
+
|
457
|
+
0.459563,
|
458
|
+
|
459
|
+
1.000000,
|
460
|
+
|
461
|
+
1.000000,
|
462
|
+
|
463
|
+
0.523285,
|
464
|
+
|
465
|
+
0.702523,
|
466
|
+
|
467
|
+
1.000000,
|
468
|
+
|
469
|
+
1.000000,
|
470
|
+
|
471
|
+
1.000000,
|
472
|
+
|
473
|
+
1.000000,
|
474
|
+
|
475
|
+
1.000000,
|
476
|
+
|
477
|
+
0.754566,
|
478
|
+
|
479
|
+
0.754566,
|
480
|
+
|
481
|
+
1.000000,
|
482
|
+
|
483
|
+
1.000000,
|
484
|
+
|
485
|
+
1.000000,
|
486
|
+
|
487
|
+
1.000000,
|
488
|
+
|
489
|
+
1.000000,
|
490
|
+
|
491
|
+
0.999998,
|
492
|
+
|
493
|
+
0.999998,
|
494
|
+
|
495
|
+
1.000000,
|
496
|
+
|
497
|
+
1.000000,
|
498
|
+
|
499
|
+
1.000000,
|
500
|
+
|
501
|
+
1.000000,
|
502
|
+
|
503
|
+
1.000000,
|
504
|
+
|
505
|
+
1.000000,
|
506
|
+
|
507
|
+
0.937900,
|
508
|
+
|
509
|
+
0.937900,
|
510
|
+
|
511
|
+
0.843455,
|
512
|
+
|
513
|
+
0.843455,
|
514
|
+
|
515
|
+
1.000000,
|
516
|
+
|
517
|
+
1.000000,
|
518
|
+
|
519
|
+
0.692347,
|
520
|
+
|
521
|
+
0.536598,
|
522
|
+
|
523
|
+
0.635737,
|
524
|
+
|
525
|
+
0.793743,
|
526
|
+
|
527
|
+
1.000000,
|
528
|
+
|
529
|
+
1.000000,
|
530
|
+
|
531
|
+
1.000000,
|
532
|
+
|
533
|
+
1.000000,
|
534
|
+
|
535
|
+
1.000000,
|
536
|
+
|
537
|
+
1.000000,
|
538
|
+
|
539
|
+
1.000000,
|
540
|
+
|
541
|
+
1.000000,
|
542
|
+
|
543
|
+
0.562271,
|
544
|
+
|
545
|
+
1.000000,
|
546
|
+
|
547
|
+
0.606859,
|
548
|
+
|
549
|
+
0.525610,
|
550
|
+
|
551
|
+
0.525610,
|
552
|
+
|
553
|
+
0.525610,
|
554
|
+
|
555
|
+
0.505657,
|
556
|
+
|
557
|
+
0.505657,
|
558
|
+
|
559
|
+
0.499507,
|
560
|
+
|
561
|
+
0.499507,
|
562
|
+
|
563
|
+
0.502042,
|
564
|
+
|
565
|
+
0.502042,
|
566
|
+
|
567
|
+
0.502042,
|
568
|
+
|
569
|
+
0.512201,
|
570
|
+
|
571
|
+
0.512201,
|
572
|
+
|
573
|
+
0.512201,
|
574
|
+
|
575
|
+
0.512201,
|
576
|
+
|
577
|
+
0.500000,
|
578
|
+
|
579
|
+
0.500000,
|
580
|
+
|
581
|
+
0.564140,
|
582
|
+
|
583
|
+
0.564140,
|
584
|
+
|
585
|
+
0.499982,
|
586
|
+
|
587
|
+
0.499982,
|
588
|
+
|
589
|
+
0.999997,
|
590
|
+
|
591
|
+
0.999997,
|
592
|
+
|
593
|
+
1.000000,
|
594
|
+
|
595
|
+
1.000000,
|
596
|
+
|
597
|
+
1.000000,
|
598
|
+
|
599
|
+
1.000000,
|
600
|
+
|
601
|
+
1.000000,
|
602
|
+
|
603
|
+
1.000000,
|
604
|
+
|
605
|
+
1.000000,
|
606
|
+
|
607
|
+
1.000000,
|
608
|
+
|
609
|
+
1.000000,
|
610
|
+
|
611
|
+
1.000000,
|
612
|
+
|
613
|
+
1.000000,
|
614
|
+
|
615
|
+
1.000000,
|
616
|
+
|
617
|
+
1.000000,
|
618
|
+
|
619
|
+
1.000000,
|
620
|
+
|
621
|
+
1.000000,
|
622
|
+
|
623
|
+
0.995135,
|
624
|
+
|
625
|
+
0.936519,
|
626
|
+
|
627
|
+
1.000000,
|
628
|
+
|
629
|
+
0.999529,
|
630
|
+
|
631
|
+
0.980016,
|
632
|
+
|
633
|
+
0.999871,
|
634
|
+
|
635
|
+
0.999950,
|
636
|
+
|
637
|
+
1.000000,
|
638
|
+
|
639
|
+
0.951632,
|
640
|
+
|
641
|
+
0.002571,
|
642
|
+
|
643
|
+
0.000138,
|
644
|
+
|
645
|
+
0.003704,
|
646
|
+
|
647
|
+
0.003704,
|
648
|
+
|
649
|
+
0.000096,
|
650
|
+
|
651
|
+
0.000000,
|
652
|
+
|
653
|
+
0.000217,
|
654
|
+
|
655
|
+
0.000002,
|
656
|
+
|
657
|
+
0.000020,
|
658
|
+
|
659
|
+
0.000376,
|
660
|
+
|
661
|
+
0.001713,
|
662
|
+
|
663
|
+
0.017345,
|
664
|
+
|
665
|
+
0.266756,
|
666
|
+
|
667
|
+
0.080934,
|
668
|
+
|
669
|
+
0.226163,
|
670
|
+
|
671
|
+
0.796931,
|
672
|
+
|
673
|
+
1.000000,
|
674
|
+
|
675
|
+
1.000000,
|
676
|
+
|
677
|
+
1.000000,
|
678
|
+
|
679
|
+
0.171247,
|
680
|
+
|
681
|
+
0.501141,
|
682
|
+
|
683
|
+
0.501141,
|
684
|
+
|
685
|
+
0.569803,
|
686
|
+
|
687
|
+
0.914754,
|
688
|
+
|
689
|
+
0.873090,
|
690
|
+
|
691
|
+
0.873090,
|
692
|
+
|
693
|
+
1.000000,
|
694
|
+
|
695
|
+
1.000000,
|
696
|
+
|
697
|
+
0.999889,
|
698
|
+
|
699
|
+
0.999994,
|
700
|
+
|
701
|
+
0.979129;
|
702
|
+
|
703
|
+
-0.941743,-0.646748,0.574719,0.000000,-0.283133,-0.461979,-0.983825,0.000000,0.923060,-1.114919,0.257891,0.000000,-65.499557,30.497688,12.852692,1.000000;;
|
704
|
+
|
705
|
+
}
|
3
テキストの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -19,3 +19,51 @@
|
|
19
19
|
|
20
20
|
|
21
21
|
再帰はつかわずに解きたいです。何をしているのか、よくわからないので。
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
> Frame Scene_Root {
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
FrameTransformMatrix {
|
32
|
+
|
33
|
+
1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000;;
|
34
|
+
|
35
|
+
}
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
Frame body {
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
FrameTransformMatrix {
|
46
|
+
|
47
|
+
1.278853,0.000000,-0.000000,0.000000,0.000000,0.000000,1.123165,0.000000,0.000000,-1.470235,0.000000,0.000000,0.135977,2.027985,133.967667,1.000000;;
|
48
|
+
|
49
|
+
}
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
Frame {
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
FrameTransformMatrix {
|
60
|
+
|
61
|
+
1.000000,-0.000000,-0.000000,0.000000,-0.000000,1.000000,0.000000,0.000000,-0.000000,0.000000,1.000000,0.000000,-0.142114,0.000023,-49.556850,1.000000;;
|
62
|
+
|
63
|
+
}
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
まずこれはなんなのかという
|
2
文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -12,4 +12,10 @@
|
|
12
12
|
|
13
13
|
Frameについてわからないのでもう一回上げてみる
|
14
14
|
|
15
|
+
|
16
|
+
|
15
|
-
ソースはみせないけど
|
17
|
+
ソースはみせないけど、tiny.xというモデルです。変数がグローバルであっても、
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
再帰はつかわずに解きたいです。何をしているのか、よくわからないので。
|
1
画像の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,4 +2,14 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
だけど、何をすればいいのか分かりません。どういった手順で計算すればいいのか、手順が知りたいです。何にたしあわせて、どこのAPIに入力すればいいのでしょうか。APIに入力するかも分かりません。詳細が分からないので詳細な質問ができず申し訳ありません
|
5
|
+
だけど、何をすればいいのか分かりません。どういった手順で計算すればいいのか、手順が知りたいです。何にたしあわせて、どこのAPIに入力すればいいのでしょうか。APIに入力するかも分かりません。詳細が分からないので詳細な質問ができず申し訳ありません![イメージ説明](67542d826e70468ec5bb40c82138e331.png)
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
画像の追加、画像は後で消すんだ
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
Frameについてわからないのでもう一回上げてみる
|
14
|
+
|
15
|
+
ソースはみせないけど
|