1 /* { dg-do compile } */
3 typedef unsigned long ULONG;
4 void iwos_ErrorMessage(long error, const char * const file_name,
5 ULONG line_num, const char * const message);
12 enum AbcZyParamType { ABC_SP_1 };
17 AbcExtent2d(const AbcA2d & rMin, const AbcA2d & rMax);
18 AbcA2d ClampPoint2d(const AbcA2d & rPoint) const;
19 AbcA2d GetMax() const { return m_vMax; }
20 AbcA2d GetMin() const { }
21 AbcA2d Evaluate(double dNormalizedX, double dNormalizedY) const;
23 inline AbcExtent2d::AbcExtent2d(const AbcA2d & rMin, const AbcA2d & rMax)
25 if (rMin.x > rMax.x || rMin.y > rMax.y)
29 iwos_ErrorMessage(sErr,(const char * const)__null,
30 0,(const char * const)__null);
38 inline AbcA2d AbcExtent2d::ClampPoint2d(const AbcA2d & rPoint) const
41 if (rPoint.x < m_vMin.x)
45 inline AbcA2d AbcExtent2d::Evaluate(double dNormalizedX, double dNormalizedY)
49 sRet.x = m_vMin.x + dNormalizedX * (m_vMax.x - m_vMin.x);
50 sRet.y = m_vMin.y + dNormalizedY * (m_vMax.y - m_vMin.y);
51 return ClampPoint2d(sRet);
54 AbcExtent2d m_vUVDomain;
55 virtual long TestIsoAbcde(AbcZyParamType eZyParam, double dParam,
56 int & rbZyxIsSolution);
57 virtual int DoesPointLieOnAbcde(AbcA2d & rUV, int bRefinePoint) const;
59 long AbcAbcdTracer::TestIsoAbcde(AbcZyParamType eZyParam, double dParam,
60 int & rbZyxIsSolution)
62 AbcA2d sUV1(m_vUVDomain.GetMin());
63 AbcA2d sUV2(m_vUVDomain.GetMax());
64 AbcExtent2d sUVIso(sUV1,sUV2);
65 for (ULONG i=0; i<10; i++)
67 double dT = i / (10 -1.0);
68 AbcA2d sUV = sUVIso.Evaluate(dT,dT);
69 if (!DoesPointLieOnAbcde(sUV,0))