implemented + (void) setInputModelScale: (GLfloat) value; which sets the scale at which the next model will be loaded
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@638 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
8fb0065249
commit
3911a6b723
@ -398,6 +398,8 @@ BOOL maintainLinkedLists(Universe* uni);
|
||||
- (NSDictionary*) modelData;
|
||||
- (void) setModelFromModelData:(NSDictionary*) dict;
|
||||
|
||||
+ (void) setInputModelScale: (GLfloat) value;
|
||||
|
||||
- (void) loadData:(NSString *) filename;
|
||||
- (void) checkNormalsAndAdjustWinding;
|
||||
- (void) calculateVertexNormals;
|
||||
|
@ -1385,6 +1385,12 @@ static Universe *data_store_universe;
|
||||
}
|
||||
}
|
||||
|
||||
GLfloat input_model_scale = 1.0f;
|
||||
+ (void) setInputModelScale: (GLfloat) value
|
||||
{
|
||||
input_model_scale = value;
|
||||
}
|
||||
|
||||
- (void) loadData:(NSString *) filename
|
||||
{
|
||||
NSScanner *scanner;
|
||||
@ -1550,7 +1556,7 @@ static Universe *data_store_universe;
|
||||
failFlag = YES;
|
||||
if (!failFlag)
|
||||
{
|
||||
vertices[j].x = x; vertices[j].y = y; vertices[j].z = z;
|
||||
vertices[j].x = input_model_scale * x; vertices[j].y = input_model_scale * y; vertices[j].z = input_model_scale * z;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1763,6 +1769,9 @@ static Universe *data_store_universe;
|
||||
}
|
||||
//
|
||||
|
||||
// reset the scale
|
||||
//
|
||||
[Entity setInputModelScale: 1.0];
|
||||
}
|
||||
|
||||
- (void) checkNormalsAndAdjustWinding
|
||||
|
Loading…
x
Reference in New Issue
Block a user