bunny-vertex-struct-array - Factor Documentation

bunny-vertex-struct-array


Vocabulary
specialized-arrays .instances .gpu .demos .bunny .bunny-vertex-struct

Definition
USING: alien sequences.private ;

IN:
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct

TUPLE: bunny-vertex-struct-array
{ underlying c-ptr read-only initial: f }
{ length array-capacity read-only initial: 0 } ; final


Methods
USING: prettyprint.custom
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
;

M: bunny-vertex-struct-array >pprint-sequence ;


USING: accessors kernel
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
;

M: bunny-vertex-struct-array clone
[ underlying>> clone ] [ length>> ] bi
<direct-bunny-vertex-struct-array> ; inline


USING: kernel
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
specialized-arrays.private ;

M: bunny-vertex-struct-array direct-like
drop <direct-bunny-vertex-struct-array> ; inline


USING: alien alien.c-types gpu.demos.bunny kernel
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
;

M: bunny-vertex-struct-array element-size
drop \ bunny-vertex-struct heap-size ; inline


USING: classes kernel sequences
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
;

M: bunny-vertex-struct-array equal?
over bunny-vertex-struct-array instance?
[ sequence= ] [ 2drop f ] if ;


USING: accessors sequences
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
;

M: bunny-vertex-struct-array length length>> ; inline


USING: accessors alien alien.data classes gpu.demos.bunny kernel
sequences
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
specialized-vectors.instances.gpu.demos.bunny.bunny-vertex-struct
;

M: bunny-vertex-struct-array like
drop dup bunny-vertex-struct-array instance? [
dup bunny-vertex-struct-vector instance? [
[ >c-ptr ] [ length>> ] bi
<direct-bunny-vertex-struct-array>
] [ \ bunny-vertex-struct >c-array ] if
] unless ; inline


USING: kernel sequences
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
specialized-vectors.instances.gpu.demos.bunny.bunny-vertex-struct
;

M: bunny-vertex-struct-array new-resizable
drop <bunny-vertex-struct-vector> ; inline


USING: kernel sequences
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
;

M: bunny-vertex-struct-array new-sequence
drop (bunny-vertex-struct-array) ; inline


USING: accessors alien alien.c-types gpu.demos.bunny kernel
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
specialized-arrays.private ;

M: bunny-vertex-struct-array nth-c-ptr
underlying>> \ bunny-vertex-struct array-accessor drop
swap <displaced-alien> ; inline


USING: accessors alien.c-types gpu.demos.bunny kernel math
sequences.private
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
;

M: bunny-vertex-struct-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ bunny-vertex-struct alien-element ; inline


USING: kernel prettyprint.custom
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
;

M: bunny-vertex-struct-array pprint-delims
drop \ bunny-vertex-struct-array{ \ } ;


USING: accessors alien.c-types byte-arrays gpu.demos.bunny
kernel math sequences.private
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
;

M: bunny-vertex-struct-array resize
[
[ \ bunny-vertex-struct heap-size * ] [ underlying>> ]
bi* resize-byte-array
] keepd <direct-bunny-vertex-struct-array> ; inline


USING: accessors alien.c-types gpu.demos.bunny kernel math
sequences.private
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
;

M: bunny-vertex-struct-array set-nth-unsafe
[ integer>fixnum ] dip
underlying>> \ bunny-vertex-struct set-alien-element ;
inline


USING: gpu.demos.bunny kernel specialized-arrays
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
;

M: bunny-vertex-struct-array underlying-type
drop \ bunny-vertex-struct ;


USING: alien.c-types gpu.demos.bunny math math.vectors sequences
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
;

M: bunny-vertex-struct-array v*high
[ * \ bunny-vertex-struct heap-size neg shift ] 2map ;
inline


USING: alien.c-types gpu.demos.bunny math math.vectors sequences
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
;

M: bunny-vertex-struct-array vs*
[ * \ bunny-vertex-struct c-type-clamp ] 2map ; inline


USING: alien.c-types gpu.demos.bunny math math.vectors sequences
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
;

M: bunny-vertex-struct-array vs+
[ + \ bunny-vertex-struct c-type-clamp ] 2map ; inline


USING: alien.c-types gpu.demos.bunny math math.vectors sequences
specialized-arrays.instances.gpu.demos.bunny.bunny-vertex-struct
;

M: bunny-vertex-struct-array vs-
[ - \ bunny-vertex-struct c-type-clamp ] 2map ; inline

AltStyle によって変換されたページ (->オリジナル) /