枚举类型

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 未声明,但是数字可直接使用
原文地址:https://www.cnblogs.com/qingsunny/p/3228125.html