• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetPoint函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetPoint函数的典型用法代码示例。如果您正苦于以下问题:C++ GetPoint函数的具体用法?C++ GetPoint怎么用?C++ GetPoint使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetPoint函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ROOT_VERSION

Bool_t RooHistN::hasIdenticalBinning(const RooHistN& other) const 
{
  // First check if number of bins is the same
  if (GetN() != other.GetN()) {
    return kFALSE ;
  }

  // Next require that all bin centers are the same
  Int_t i ;
  for (i=0 ; i<GetN() ; i++) {
    Double_t x1,x2,y1,y2 ;
    
#if ROOT_VERSION_CODE >= ROOT_VERSION(4,0,1)
    GetPoint(i,x1,y1) ;
    other.GetPoint(i,x2,y2) ;
#else
    const_cast<RooHistN&>(*this).GetPoint(i,x1,y1) ;
    const_cast<RooHistN&>(other).GetPoint(i,x2,y2) ;
#endif

    if (fabs(x1-x2)>1e-10) {
      return kFALSE ;
    }

  }

  return kTRUE ;
}
开发者ID:benitezj,项目名称:PhDAnalysisSoftware,代码行数:28,代码来源:RooHistN.C


示例2: oTrig1

	//某一特定顶点在三角形之内
	Bool HawkRect2D::IsPointInside(const HawkVector2D& oVec) const
	{ 
		HawkTriangle2D oTrig1(Point,Edge[0],Edge[1]);
		HawkTriangle2D oTrig2(GetPoint(2),-Edge[0],-Edge[1]);

		return oTrig1.IsPointInside(oVec) || oTrig2.IsPointInside(oVec);
	}
开发者ID:SleepingBearZ,项目名称:hawkproject,代码行数:8,代码来源:HawkRect2D.cpp


示例3: cvCreateImage

IplImage* ShiftMapHierarchy::GetRetargetImageH()
{
	IplImage* output = cvCreateImage(_outputSize, _input->depth, _input->nChannels);
	int num_pixels = _outputSize.width * _outputSize.height;

	printf("Rendering graph-cut result to image... \n");
	for(int i = 0; i < num_pixels; i++)
	{
		int label = _gc->whatLabel(i);
		CvPoint point = GetPoint(i, _outputSize);		
		CvPoint pointLabel = GetMappedPointInitialGuess(i, label, _outputSize, _shiftSize, _initialGuess);
		
		if(!IsOutside(pointLabel, _inputSize))
		{
			CvScalar value = cvGet2D(_input, pointLabel.y, pointLabel.x);
			cvSet2D(output, point.y, point.x, value);		
		}
		else
		{
			printf("warning mapped outside");
			cvSet2D(output, point.y, point.x, cvScalar(255, 0, 0));
		}
	}
	return output;
}
开发者ID:TTgogogo,项目名称:retarget-toolkit,代码行数:25,代码来源:ShiftMapHierarchy.cpp


示例4: Max

float3 Ray::ClosestPoint(const float3 &targetPoint, float *d) const
{
	float u = Max(0.f, Dot(targetPoint - pos, dir));
	if (d)
		*d = u;
	return GetPoint(u);
}
开发者ID:360degrees-fi,项目名称:tundra,代码行数:7,代码来源:Ray.cpp


示例5: GetPoint

void CIni::SerGetPoint( BOOL bGet,CPoint & pt, CString strEntry, LPCSTR strSection, CPoint ptDefault)
{
	if (bGet)
		pt = GetPoint(strEntry,ptDefault,strSection);
	else
		WritePoint(strEntry,pt, strSection);
}
开发者ID:Wanghuaichen,项目名称:SignalProcess,代码行数:7,代码来源:axIni.cpp


示例6: GetPoint

void CChartCandlestickSerie::DrawAll(CDC *pDC)
{
	if (!m_bIsVisible)
		return;

	unsigned uFirst=0, uLast=0;
	if (!GetVisiblePoints(uFirst,uLast))
		return;

	if (pDC->GetSafeHdc())
	{
		ShadowBrush.CreateSolidBrush(m_ShadowColor);
		NewPen.CreatePen(PS_SOLID,1,m_SerieColor);
		ShadowPen.CreatePen(PS_SOLID,1,m_ShadowColor);
		BrushFill.CreateSolidBrush(m_SerieColor);
		BrushEmpty.CreateSolidBrush(RGB(255,255,255));

		pDC->SetBkMode(TRANSPARENT);
		//To have lines limited in the drawing rectangle :
		pDC->IntersectClipRect(m_PlottingRect);

		for (m_uLastDrawnPoint=uFirst;m_uLastDrawnPoint<=uLast;m_uLastDrawnPoint++)
		{
			SChartCandlestickPoint Point = GetPoint(m_uLastDrawnPoint);
			DrawCandleStick(pDC, Point);
		}

		pDC->SelectClipRgn(NULL);
		BrushFill.DeleteObject();
		BrushEmpty.DeleteObject();
		NewPen.DeleteObject();
		ShadowBrush.DeleteObject();
		ShadowPen.DeleteObject();
	}
}
开发者ID:QC-git,项目名称:MyLab,代码行数:35,代码来源:ChartCandlestickSerie.cpp


示例7: GetPointCount

void Shape::Update()
{
    // Get the total number of points of the shape
    unsigned int count = GetPointCount();
    if (count < 3)
    {
        myVertices.Resize(0);
        myOutlineVertices.Resize(0);
        return;
    }

    myVertices.Resize(count + 2); // + 2 for center and repeated first point

    // Position
    for (unsigned int i = 0; i < count; ++i)
        myVertices[i + 1].Position = GetPoint(i);
    myVertices[count + 1].Position = myVertices[1].Position;

    // Update the bounding rectangle
    myVertices[0] = myVertices[1]; // so that the result of GetBounds() is correct
    myInsideBounds = myVertices.GetBounds();

    // Compute the center and make it the first vertex
    myVertices[0].Position.x = myInsideBounds.Left + myInsideBounds.Width / 2;
    myVertices[0].Position.y = myInsideBounds.Top + myInsideBounds.Height / 2;

    // Color
    UpdateFillColors();

    // Texture coordinates
    UpdateTexCoords();

    // Outline
    UpdateOutline();
}
开发者ID:MegatronX,项目名称:KHMPOld,代码行数:35,代码来源:Shape.cpp


示例8: GetCoeff

void SplineSeg3<D> :: GetCoeff (Vector & u) const
{
  double t;
  int i;
  Point<D> p;
  DenseMatrix a(6, 6);
  DenseMatrix ata(6, 6);
  Vector f(6);

  u.SetSize(6);

  //  ata.SetSymmetric(1);

  t = 0;
  for (i = 1; i <= 5; i++, t += 0.25)
    {
      p = GetPoint (t);
      a.Elem(i, 1) = p(0) * p(0);
      a.Elem(i, 2) = p(1) * p(1);
      a.Elem(i, 3) = p(0) * p(1);
      a.Elem(i, 4) = p(0);
      a.Elem(i, 5) = p(1);
      a.Elem(i, 6) = 1;
    }
  a.Elem(6, 1) = 1;

  CalcAtA (a, ata);

  u = 0;
  u.Elem(6) = 1;
  a.MultTrans (u, f);
  ata.Solve (f, u);
}
开发者ID:AlexanderToifl,项目名称:viennamesh-dev,代码行数:33,代码来源:spline.hpp


示例9: GetPoints

void SplineSeg<D> :: GetPoints (int n, ARRAY<Point<D> > & points)
{
  points.SetSize (n);
  if (n >= 2)
    for (int i = 0; i < n; i++)
      points[i] = GetPoint(double(i) / (n-1));
}
开发者ID:AlexanderToifl,项目名称:viennamesh-dev,代码行数:7,代码来源:spline.hpp


示例10: GetPoint

Bounds Bounds::GetTransformedBounds(const Matrix &m) const
{
    Bounds newBounds;
    BOOL bInitialized=0;
    for(int i=0; i<8; i++)
    {
        Vect p = GetPoint(i);
        p.TransformPoint(m);

        if(!bInitialized)
        {
            newBounds.Max = newBounds.Min = p;
            bInitialized = 1;
        }
        else
        {
            if(p.x < newBounds.Min.x)
                newBounds.Min.x = p.x;
            else if(p.x > newBounds.Max.x)
                newBounds.Max.x = p.x;

            if(p.y < newBounds.Min.y)
                newBounds.Min.y = p.y;
            else if(p.y > newBounds.Max.y)
                newBounds.Max.y = p.y;

            if(p.z < newBounds.Min.z)
                newBounds.Min.z = p.z;
            else if(p.z > newBounds.Max.z)
                newBounds.Max.z = p.z;
        }
    }

    return newBounds;
}
开发者ID:373137461,项目名称:rtmp_streamer_for_windows,代码行数:35,代码来源:XMath.cpp


示例11: GetNPoints

 void Mesh::Clip(const Plane            & plane, 
                 SArray< Vec3<double> > & positivePart, 
                 SArray< Vec3<double> > & negativePart) const
 {
     const size_t nV = GetNPoints();
     if (nV == 0)
     {
         return;
     }       
     double d;
     for (size_t v = 0; v < nV; v++)
     {
         const Vec3<double> & pt =  GetPoint(v);
         d     = plane.m_a * pt[0] + plane.m_b * pt[1] + plane.m_c * pt[2] + plane.m_d;
         if (d > 0.0)
         {
             positivePart.PushBack(pt);
         }
         else if (d < 0.0)
         {
             negativePart.PushBack(pt);
         }
         else
         {
             positivePart.PushBack(pt);
             negativePart.PushBack(pt);
         }
     }
 }
开发者ID:K-Tone,项目名称:v-hacd,代码行数:29,代码来源:vhacdMesh.cpp


示例12: sum

Double_t RooHistN::getFitRangeNEvt(Double_t xlo, Double_t xhi) const 
{
  // Calculate integral of histogram in given range 
  Double_t sum(0) ;
  for (int i=0 ; i<GetN() ; i++) {
    Double_t x,y ;

#if ROOT_VERSION_CODE >= ROOT_VERSION(4,0,1)
    GetPoint(i,x,y) ;
#else
    const_cast<RooHistN*>(this)->GetPoint(i,x,y) ;
#endif

    if (x>=xlo && x<=xhi) {
      sum += y ;
    }
  }
  
  if (_rawEntries!=-1) {
    coutW(Plotting) << "RooHistN::getFitRangeNEvt() WARNING: Number of normalization events associated to histogram is not equal to number of events in histogram" << endl
		    << "                           due cut made in RooAbsData::plotOn() call. Automatic normalization over sub-range of plot variable assumes"    << endl
		    << "                           that the effect of that cut is uniform across the plot, which may be an incorrect assumption. To be sure of"   << endl 
		    << "                           correct normalization explicit pass normalization information to RooAbsPdf::plotOn() call using Normalization()" << endl ;
    sum *= _rawEntries / _entries ;
  }

  return sum ;
}
开发者ID:benitezj,项目名称:PhDAnalysisSoftware,代码行数:28,代码来源:RooHistN.C


示例13: cmsGDBAddPoint

// Add a point to gamut descriptor. Point to add is in Lab color space.
// GBD is centered on a=b=0 and L*=50
cmsBool CMSEXPORT cmsGDBAddPoint(cmsHANDLE hGBD, const cmsCIELab* Lab)
{
    cmsGDB* gbd = (cmsGDB*) hGBD;
    cmsGDBPoint* ptr;
    cmsSpherical sp;


    // Get pointer to the sector
    ptr = GetPoint(gbd, Lab, &sp);
    if (ptr == NULL) return FALSE;

    // If no samples at this sector, add it
    if (ptr ->Type == GP_EMPTY) {

        ptr -> Type = GP_SPECIFIED;
        ptr -> p    = sp;
    }
    else {


        // Substitute only if radius is greater
        if (sp.r > ptr -> p.r) {

                ptr -> Type = GP_SPECIFIED;
                ptr -> p    = sp;
        }
    }

    return TRUE;
}
开发者ID:123woodman,项目名称:minko,代码行数:32,代码来源:cmssm.c


示例14: Dot

vec Line::ClosestPoint(const vec &targetPoint, float *d) const
{
	float u = Dot(targetPoint - pos, dir);
	if (d)
		*d = u;
	return GetPoint(u);
}
开发者ID:clement-z,项目名称:MathGeoLib,代码行数:7,代码来源:Line.cpp


示例15: while

double NURBSSurface::Getv(double u, CVector r)
{
	double sine = 10000.0;

	if(u<=0.0)          return 0.0;
	if(u>=1.0)          return 0.0;
	if(r.VAbs()<1.0e-5) return 0.0;

	int iter=0;
	double v, v1, v2;

	r.Normalize();
	v1 = 0.0; v2 = 1.0;

	while(qAbs(sine)>1.0e-4 && iter<200)
	{
		v=(v1+v2)/2.0;
		GetPoint(u, v, t_R);
		t_R.x = 0.0;
		t_R.Normalize();//t_R is the unit radial vector for u,v

		sine = (r.y*t_R.z - r.z*t_R.y);

		if(sine>0.0) v1 = v;
		else         v2 = v;
		iter++;
	}

	return (v1+v2)/2.0;
}
开发者ID:subprotocol,项目名称:xflr5,代码行数:30,代码来源:NURBSSurface.cpp


示例16: GetPoint

void CIni::SerGetPoint(	bool bGet,CPoint	& pt,	LPCTSTR strEntry,	LPCTSTR strSection,	CPoint ptDefault)
{
	if(bGet)
		pt = GetPoint(strEntry,ptDefault,strSection);
	else
		WritePoint(strEntry,pt, strSection);
}
开发者ID:axxapp,项目名称:winxgui,代码行数:7,代码来源:ini2.cpp


示例17: GetPoint

void Curve::Update() {
	// calculate length once
	length = 0.0f;

	// Approxmate using 100 straight curves
	int numsegs = 100;

	// Add lengths of pieces
	float3 oldpoint, newpoint, movement;
	for(int i = 0; i < numsegs; i++) {
		oldpoint = GetPoint(1.0f/numsegs * i);
		newpoint = GetPoint(1.0f/numsegs * (i + 1));
		movement = newpoint - oldpoint;
		length += movement.Length();
	}
}
开发者ID:JohanMes,项目名称:JohanEngine,代码行数:16,代码来源:Curve.cpp


示例18: GetNPoints

bool PolyLine2::PtIn( const Vec2& pt ) const
{
    int nP = GetNPoints();
    if (nP < 3) return false;
    int nW = 0;

    //  loop through all edges of the polygon
    for (int i = 0; i < nP; i++)
    {
        const Vec2& a = m_Points[i];
        const Vec2& b = GetPoint( i + 1 );
        if (a.y <= pt.y)
        {
            if (b.y > pt.y)
            {
                if (pt.leftof( a, b ) > 0.0f)
                {
                    nW++;
                }
            }
        }
        else
        {
            if (b.y <= pt.y)
            {
                if (pt.leftof( a, b ) < 0.0f)
                {
                    nW--;
                }
            }
        }
    }
    return (nW != 0);
}
开发者ID:skopp,项目名称:rush,代码行数:34,代码来源:polyline2.cpp


示例19: GetPoint

bool
VectorPath::FindBezierScale(int32 index, BPoint point, double* scale) const
{
	if (index >= 0 && index < fPointCount && scale) {
		int maxStep = 1000;

		double t = 0.0;
		double dt = 1.0 / maxStep;

		*scale = 0.0;
		double min = FLT_MAX;

		BPoint curvePoint;
		for (int step = 1; step < maxStep; step++) {
			t += dt;

			GetPoint(index, t, curvePoint);
			double d = agg::calc_distance(curvePoint.x, curvePoint.y,
				point.x, point.y);

			if (d < min) {
				min = d;
				*scale = t;
			}
		}
		return true;
	}
	return false;
}
开发者ID:Barrett17,项目名称:haiku-contacts-kit-old,代码行数:29,代码来源:VectorPath.cpp


示例20: GetPoint

Point Polygon::ClosestPoint(const Point& point) const
{
    if (Intersects(point))
        return point;

    Point closestSoFar = GetPoint(0);

    for (int i = 0; i < NumPoints(); ++i)
    {
        Segment seg(GetPoint(i), GetPoint(i + 1));
        Point closestNow = seg.ClosestPoint(point);
        if (point.IsCloserToFirstThanSecond(closestNow, closestSoFar))
            closestSoFar = closestNow;
    }

    return closestSoFar;
}
开发者ID:mraggi,项目名称:Graph,代码行数:17,代码来源:Polygon.cpp



注:本文中的GetPoint函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetPointer函数代码示例发布时间:2022-05-30
下一篇:
C++ GetPlayers函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap