internal static NodeAttachment Read(ResourceReader reader, uint version) { NodeAttachmentType type = ( NodeAttachmentType )reader.ReadInt32(); switch (type) { case NodeAttachmentType.Invalid: case NodeAttachmentType.Model: throw new NotSupportedException(); //case NodeAttachmentType.Mesh: // return new NodeMeshAttachment( ReadMesh( version ) ); case NodeAttachmentType.Node: return(new NodeNodeAttachment(reader.ReadResource <Node>(version))); case NodeAttachmentType.Mesh: return(new NodeMeshAttachment(reader.ReadResource <Mesh>(version))); case NodeAttachmentType.Camera: return(new NodeCameraAttachment(reader.ReadResource <Camera>(version))); case NodeAttachmentType.Light: return(new NodeLightAttachment(reader.ReadResource <Light>(version))); case NodeAttachmentType.Epl: return(new NodeEplAttachment(reader.ReadResource <Epl>(version))); case NodeAttachmentType.EplLeaf: return(new NodeEplLeafAttachment(reader.ReadResource <EplLeaf>(version))); case NodeAttachmentType.Morph: return(new NodeMorphAttachment(reader.ReadResource <Morph>(version))); default: throw new NotImplementedException($"Unimplemented node attachment type: {type}"); } }
protected NodeAttachment(NodeAttachmentType type) { Type = type; }