枚举类型

typedef enum { COLINEAR, COPLANAR, PARALLEL, FACING_AWAY, INTERSECTING } IntersectionType;

const FPlane::IntersectionType FPlane::LineIntersection(const FPoint3& Origin, const FPoint3& Direction, FPoint3& Intersection, float fEpsilon) const

FPlane::IntersectionType intersectionType;
intersectionType = triPlanes[j].LineIntersection(centers[i], normals[i], intersectPoint, fEpsilon);
if (intersectionType == 4)
{...}
//如果写if(intersectionType == INTERSECTING ) 当枚举声明不在同一个cpp里头时会报错,说INTERSECTING 未声明,但是数字可直接使用

 

posted @ 2013-07-31 16:33  qingsun_ny  阅读(162)  评论(0编辑  收藏  举报