- sgdVec3 normal;
- sgdSetVec3( normal,
- (ptr[0]) / 127.5 - 1.0,
- (ptr[1]) / 127.5 - 1.0,
- (ptr[2]) / 127.5 - 1.0 );
- sgdNormalizeVec3( normal );
-
- p = Point3D( normal[0], normal[1], normal[2] );
- // cout << "normal = " << p << endl;
- normals.push_back( p );
+ SGVec3f normal((ptr[0]) / 127.5 - 1.0,
+ (ptr[1]) / 127.5 - 1.0,
+ (ptr[2]) / 127.5 - 1.0);
+
+ normals.push_back(normalize(normal));