Missed a few changed

db4
erikc 2010-01-31 16:56:58 -08:00
parent 676673fc7e
commit c86bedd912
2 changed files with 9 additions and 2 deletions

View File

@ -31,7 +31,11 @@ HELP: <indexed-seq>
HELP: string>numbers ( string -- number-seq )
{ $values { "string" string } { "number-seq" sequence } }
{ $description "Splits a string on whitespace and converts the elements to a number sequence" } ;
{ $description "Splits a string on whitespace and converts the elements to a number sequence." } ;
HELP: string>floats ( string -- float-seq )
{ $values { "string" string } { "float-seq" sequence } }
{ $description "Splits a string on whitespace and converts the elements to a float sequence." } ;
HELP: x-up { $class-description "Right-handed 3D coordinate system where X is up." } ;
HELP: y-up { $class-description "Right-handed 3D coordinate system where Y is up." } ;

View File

@ -59,6 +59,9 @@ M: indexed-seq new-resizable
: string>numbers ( string -- number-seq )
" \t\n" split [ "" = ] trim [ string>number ] map ;
: string>floats ( string -- float-seq )
" \t\n" split [ "" = ] trim [ string>float ] map ;
: x/ ( tag child-name -- child-tag )
[ tag-named ]
[ rot dup [ drop missing-child ] unless 2nip ]
@ -107,7 +110,7 @@ M: z-up >y-up-axis!
: source>seq ( source-tag up-axis scale -- sequence )
rot
[ "float_array" x/ xt string>numbers [ * ] with map ]
[ "float_array" x/ xt string>floats [ * ] with map ]
[ nip "technique_common" x/ "accessor" x/ "stride" x@ string>number ] 2bi
group
[ swap over length 2 > [ >y-up-axis! ] [ drop ] if ] with map ;