Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do i split a list into smaller lists based on keywords? (C# XNA)
    text
    copied!<p>Hi I'm currently working on a importer for a C# / XNA application and I need some help with filtering out the input( a List of string where each line is a "new" string) into smaller chunks(smaller List of string).</p> <p>This is a sample of how the input is divided into "frames" with the mesh and camera data necessary to create a "keyframe".</p> <pre><code>num_frames 4 start 1 end 24 frame_rate 24 frame 1 meshes 2 name pCube1 color F:/MayaImporterExporter/ImporterExporter/Bin/Textures/image2.gif bump F:/MayaImporterExporter/ImporterExporter/Bin/Textures/images.jpg bumpDepth 1 vertices 36 meshData... name pCube2 color NONE bump none bumpDepth 0 vertices 36 meshData... cameras 1 name persp cameraData... frame 5 meshes 2 name pCube1 color F:/MayaImporterExporter/ImporterExporter/Bin/Textures/image2.gif bump F:/MayaImporterExporter/ImporterExporter/Bin/Textures/images.jpg bumpDepth 1 vertices 36 meshData... name pCube2 color NONE bump none bumpDepth 0 vertices 36 meshData... cameras 1 name persp cameraData... frame 10 meshes 2 name pCube1 color F:/MayaImporterExporter/ImporterExporter/Bin/Textures/image2.gif bump F:/MayaImporterExporter/ImporterExporter/Bin/Textures/images.jpg bumpDepth 1 vertices 36 meshData... name pCube2 color NONE bump none bumpDepth 0 vertices 36 meshData... cameras 1 name persp cameraData... frame 24 meshes 2 name pCube1 color F:/MayaImporterExporter/ImporterExporter/Bin/Textures/image2.gif bump F:/MayaImporterExporter/ImporterExporter/Bin/Textures/images.jpg bumpDepth 1 vertices 36 meshData... name pCube2 color NONE bump none bumpDepth 0 vertices 36 meshData... cameras 1 name persp cameraData... </code></pre> <p>so the things i need to do is:</p> <ol> <li>Split the input down into a smaller list containing the mesh and camera data for each keyframe .</li> <li>Split the keyframe data into two lists( one for the meshes, and one to the cameras).</li> <li>split the meshes/cameras into a List of List of Strings.</li> <li>create the meshes and cameras form the "List of List of Strings"(I know this part ).</li> </ol> <p>So I need some help to figure out how to filter out the input data into smaller chunks to create the meshes and cameras from the input.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload