view col.h @ 134:42337585fb7c

fix merge
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 22 Jul 2011 18:32:39 +0900
parents 4f50f5a3b363
children d1ddd095ab03
line wrap: on
line source

#ifndef COL_H
#define COL_H

#include "libps2.h"
#include "stdbool.h"

typedef struct detection_face {
  FVECTOR p0;
  FVECTOR v0;
  FVECTOR v1;
  FVECTOR normal; // 外積かな
} ColFace, *ColFacePtr;

typedef struct col_face_handler {
  ColFacePtr colface;
  void* free_addr;
  int facenum;
} ColFaceHd;

//void col_init(ColFaceHd* hd, OBJECT* face);
//void col_init(ColFaceHd* hd, PolygonInfo* face);
void col_init(ColFaceHd* hd, char* face);

bool col_detect(ColFaceHd* hd, FVECTOR pose, FVECTOR p);

bool col_detect_approx(FVECTOR p, FVECTOR v0, FVECTOR v1);


#endif