Changeset 3154 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Geometry.cpp
- Timestamp:
- 11/23/08 21:31:29 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Geometry.cpp
r3153 r3154 86 86 Vector3 normal = Normalize(mNormals[i]); 87 87 88 float dotProd = DotProd(tangent,normal); 89 90 tangent -= normal * dotProd; 91 tangent = Normalize(tangent); 88 float dotProd = DotProd(tangent, normal); 89 //tangent -= normal * dotProd;tangent = Normalize(tangent); 92 90 93 91 //mTangents[i] = tangent; 94 mTangents[i] = Vector3(0,1,0);//tangent * 0.5f + Vector3(0.5f);92 mTangents[i] = tangent * 0.5f + Vector3(0.5f); 95 93 } 96 94 … … 98 96 ((Vector3 *)data)[mNumVertices * 2 + i] = mTangents[i]; 99 97 100 for (int i = 0; i < 3; ++ i)101 cout << ((Vector3 *)data)[mNumVertices * 2 + i] << " ";102 103 98 currentPData += mNumVertices * 3; 104 99 } … … 125 120 if (mTangents) 126 121 { 127 cout << "dotprods: " << endl;128 129 for (int i = 0; i < 1000; ++ i)122 //cout << "dotprods: " << endl; 123 124 /*for (int i = 0; i < 100; ++ i) 130 125 { 131 126 //cout << mTangents[i] << " " << mNormals[i] << " " << DotProd(Normalize(mTangents[i]), Normalize(mNormals[i])) << endl; … … 135 130 } 136 131 cout << endl; 132 */ 137 133 134 for (int i = 0; i < 50; ++ i) 135 { 136 cout << mTexCoords[i].first << "," << mTexCoords[i].second << " "; 137 } 138 138 139 glColorPointer(3, GL_FLOAT, 0, (char *)NULL + currentPVbo); 139 140 currentPVbo += mNumVertices * sizeof(Vector3); … … 159 160 if (mHasTangents) 160 161 { 161 cout<<"x";162 162 glEnableClientState(GL_COLOR_ARRAY); 163 163 } 164 164 165 if (state->GetCurrentVboId() != mVboId) 165 166 {
Note: See TracChangeset
for help on using the changeset viewer.