mirror of
https://github.com/thes3m/XNI
synced 2024-12-26 13:26:06 +01:00
Adding Game Center classes skeletons. git-svn-id: http://xni.googlecode.com/svn/XNI@62 ac433895-eea3-a490-d80a-17149a75e588
34 lines
965 B
Objective-C
34 lines
965 B
Objective-C
//
|
|
// ModelMeshReader.m
|
|
// XNI
|
|
//
|
|
// Created by Matej Jan on 23.11.10.
|
|
// Copyright 2010 Retronator. All rights reserved.
|
|
//
|
|
|
|
#import "ModelMeshReader.h"
|
|
|
|
#import "Retronator.Xni.Framework.Content.h"
|
|
#import "Retronator.Xni.Framework.Graphics.h"
|
|
#import "Retronator.Xni.Framework.Content.Pipeline.Processors.h"
|
|
#import "ModelMesh+Internal.h"
|
|
|
|
@implementation ModelMeshReader
|
|
|
|
- (id) readFromInput:(ContentReader *)input into:(id)existingInstance {
|
|
ModelMeshContent *content = input.content;
|
|
|
|
// Create all model mesh parts.
|
|
NSMutableArray *meshParts = [NSMutableArray array];
|
|
for (ModelMeshPartContent *meshPartContent in content.meshParts) {
|
|
[meshParts addObject:[input readObjectFrom:meshPartContent]];
|
|
}
|
|
|
|
ModelBone *parentBone = [input readSharedResourceFrom:content.parentBone];
|
|
|
|
ModelMesh *mesh = [[[ModelMesh alloc] initWithName:content.name parentBone:parentBone modelMeshParts:meshParts tag:content.tag] autorelease];
|
|
return mesh;
|
|
}
|
|
|
|
@end
|