79 #define HIT_SIG_SHAPE_INTERNAL_NULL_STATIC { -1, { HIT_SIG_NULL_STATIC, HIT_SIG_NULL_STATIC, HIT_SIG_NULL_STATIC, HIT_SIG_NULL_STATIC } }
82 #define HIT_SIG_SHAPE_NULL_STATIC { HIT_SIG_SHAPE, { HIT_SIG_SHAPE_INTERNAL_NULL_STATIC} }
85 #define HIT_SIG_SHAPE_WHOLE_STATIC { 0, { HIT_SIG_NULL_STATIC, HIT_SIG_NULL_STATIC, HIT_SIG_NULL_STATIC, HIT_SIG_NULL_STATIC } }
88 #define HIT_SHAPE_WHOLE_STATIC { HIT_SIG_SHAPE, { HIT_SIG_SHAPE_WHOLE_STATIC} }
134 #define hit_sShapeAccess(s) ((s).info.sig)
175 #define hit_shape(nd, ...) hit_shape##nd(__VA_ARGS__)
227 #define hit_shapeIndex(nd, ...) hit_shapeIndex##nd(__VA_ARGS__)
233 static inline HitShape hit_shapeIndex1(
int idx ) {
241 static inline HitShape hit_shapeIndex2(
int idx1,
int idx2 ) {
243 hit_sig( idx1, idx1, 1 ),
244 hit_sig( idx2, idx2, 1 )
252 static inline HitShape hit_shapeIndex3(
int idx1,
int idx2,
int idx3 ) {
254 hit_sig( idx1, idx1, 1 ),
255 hit_sig( idx2, idx2, 1 ),
256 hit_sig( idx3, idx3, 1 )
264 static inline HitShape hit_shapeIndex4(
int idx1,
int idx2,
int idx3,
int idx4 ) {
266 hit_sig( idx1, idx1, 1 ),
267 hit_sig( idx2, idx2, 1 ),
268 hit_sig( idx3, idx3, 1 ),
269 hit_sig( idx4, idx4, 1 )
295 #define hit_shapeStd(nd, ...) hit_shapeStd##nd(__VA_ARGS__)
302 static inline HitShape hit_shapeStd1(
int _size ) {
310 static inline HitShape hit_shapeStd2(
int size1,
int size2 ) {
321 static inline HitShape hit_shapeStd3(
int size1,
int size2,
int size3 ) {
333 static inline HitShape hit_shapeStd4(
int size1,
int size2,
int size3,
int size4 ) {
364 #define hit_shapeDims(shape) (((shape).type==HIT_SIG_SHAPE)?hit_sshapeDims(shape):(1))
376 #define hit_sshapeDims(shape) (hit_sShapeAccess(shape).numDims)
387 #define hit_shapeDimsSet(shape,value) (hit_sshapeDims(shape) = (value))
400 #define hit_shapeSig(shape,dim) ((hit_sShapeAccess((shape))).sig[(dim)])
412 #define hit_shapeSigCard(shape,dim) hit_sigCard((hit_sShapeAccess((shape))).sig[(dim)])
515 #define HIT_SHAPE_BEGIN 0
522 #define HIT_SHAPE_END 1
603 #define hit_shapeIterator(var,shape,dim) for(var=hit_shapeSig((shape),(dim)).begin;var<=hit_shapeSig((shape),(dim)).end;var++)
619 #define hit_shapeIteratorTileCoord(var,shape,dim) for(var=0; var<=hit_sigCard(hit_shapeSig((shape),(dim)))-1;var++)
HitShape hit_shapeBorder(HitShape shape, int dim, int position, int offset)
HitShape hit_shapeExpand(HitShape shape, int dims, int offset)
HitShape hit_shapeIntersect(HitShape sh1, HitShape sh2)
HitShape HIT_SIG_SHAPE_NULL
int hit_shapeCmp(HitShape sh1, HitShape sh2)
HitShape hit_shapeTileToArray(HitShape sh1, HitShape sh2)
#define hit_shapeDims(shape)
HitShape hit_shapeSubset(HitShape sh1, HitShape sh2)
#define hit_shapeSigCard(shape, dim)
HitShape hit_shapeDimExpand(HitShape shape, int dim, int position, int offset)
void dumpShape(HitShape sh)
HitSigShape HIT_SIG_SHAPE_WHOLE