public override bool Intersect(Ray r, ref float dist) { Vector norm = SurfaceFunc.CalculateSurfaceNormal(m_pos); norm.m_y = -norm.m_y; float facing = norm.DotProduct(r.orgin); if (facing <= Config.Tolerance && facing >= Config.MinTolerance) { //normal = norm; //closest = quad; dist = (float)SurfaceFunc.Vec3Distance(r.orgin, norm); if (dist < Config.MinHitDistance) { return(false); } return(true); } return(false); }
public override Vector CalculateSurfaceNormal() { return(SurfaceFunc.CalculateSurfaceNormal(m_pos)); }