您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetPoint函数代码示例

51自学网 2021-06-01 21:13:07
  C++
这篇教程C++ GetPoint函数代码示例写得很实用,希望能帮到您。

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

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


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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*=50cmsBool 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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例19: GetPoint

boolVectorPath::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,


示例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,


示例21: switch

void Nightcharts::drawLegend(QPainter *painter) {    //double ptext = 25;    double angle = palpha;    painter->setPen(Qt::SolidLine);    switch(cltype) {    case Nightcharts::Vertical:    {        int dist = 5;        painter->setBrush(Qt::white);        for (int i = pieces.size()-1; i >= 0; i--) {            painter->setBrush(pieces[i].rgbColor);            float x = lX+dist;            float y = lY+dist+i*(painter->fontMetrics().height()+2*dist);            painter->drawRect(x,y,painter->fontMetrics().height(),painter->fontMetrics().height());            painter->drawText(x+painter->fontMetrics().height()+dist,y+painter->fontMetrics().height()/2+dist,pieces[i].pname + " - " + QString::number(pieces[i].pPerc)+"%");        }        break;    }    case Nightcharts::Round:        for (int i=pieces.size()-1;i>=0;i--) {            float len = 100;            double pdegree = 3.6*pieces[i].pPerc;            angle -= pdegree/2;            QPointF p = GetPoint(angle);            QPointF p_ = GetPoint(angle, cW+len,cH+len);            int q = GetQuater(angle);            if (q == 3 || q == 4)            {                p.setY(p.y()+pW/2);                p_.setY(p_.y()+pW/2);            }            painter->drawLine(p.x(),p.y(),p_.x(),p_.y());            QString label = pieces[i].pname + " - " + QString::number(pieces[i].pPerc)+"%";            float recW = painter->fontMetrics().width(label)+10;            float recH = painter->fontMetrics().height()+10;            p_.setX(p_.x()-recW/2 + recW/2*cos(angle*M_PI/180));            p_.setY(p_.y()+recH/2 + recH/2*sin(angle*M_PI/180));            painter->setBrush(Qt::white);            painter->drawRoundRect(p_.x() ,p_.y(), recW, -recH);            painter->drawText(p_.x()+5, p_.y()-recH/2+5, label);            angle -= pdegree/2;        }        break;    }}
开发者ID:vmichele,项目名称:MangaReader,代码行数:46,


示例22: while

void PolyLine2::Refine(){    int cP = 0;    while (cP < m_Points.size())    {        const Vec2& pc = GetPoint( cP );        const Vec2& pn = GetPoint( cP + 1 );        if (pc.equal( pn ))        {            DeletePoint( cP );        }        else        {            cP++;        }    }}
开发者ID:skopp,项目名称:rush,代码行数:17,


示例23: ContainingPlane

float3 Circle::ClosestPointToEdge(const float3 &point) const{	float3 pointOnPlane = ContainingPlane().Project(point);	float3 diff = pointOnPlane - pos;	if (diff.IsZero())		return GetPoint(0); // The point is in the center of the circle, all points are equally close.	return pos + diff.ScaledToLength(r);}
开发者ID:360degrees-fi,项目名称:tundra,代码行数:8,


示例24: LineIntersections

void SplineSeg3<D> :: LineIntersections (const double a, const double b, const double c,					 ARRAY < Point<D> > & points, const double eps) const{  points.SetSize(0);  double t;  const double c1 = a*p1(0) - sqrt(2.)*a*p2(0) + a*p3(0)     + b*p1(1) - sqrt(2.)*b*p2(1) + b*p3(1)     + (2.-sqrt(2.))*c;  const double c2 = -2.*a*p1(0) + sqrt(2.)*a*p2(0) -2.*b*p1(1) + sqrt(2.)*b*p2(1) + (sqrt(2.)-2.)*c;  const double c3 = a*p1(0) + b*p1(1) + c;  if(fabs(c1) < 1e-20)    {      if(fabs(c2) < 1e-20)	return;      t = -c3/c2;      if((t > -eps) && (t < 1.+eps))	points.Append(GetPoint(t));      return;    }  const double discr = c2*c2-4.*c1*c3;  if(discr < 0)    return;  if(fabs(discr/(c1*c1)) < 1e-14)    {      t = -0.5*c2/c1;      if((t > -eps) && (t < 1.+eps))	points.Append(GetPoint(t));      return;    }  t = (-c2 + sqrt(discr))/(2.*c1);  if((t > -eps) && (t < 1.+eps))    points.Append(GetPoint(t));  t = (-c2 - sqrt(discr))/(2.*c1);  if((t > -eps) && (t < 1.+eps))    points.Append(GetPoint(t));}
开发者ID:AlexanderToifl,项目名称:viennamesh-dev,代码行数:45,


示例25: SaveBinary

void STLTopology :: SaveBinary (const char* filename, const char* aname) const{  ofstream ost(filename);  PrintFnStart("Write STL binary file '",filename,"'");  if (sizeof(int) != 4 || sizeof(float) != 4)     {PrintWarning("for stl-binary compatibility only use 32 bit compilation!!!");}  //specific settings for stl-binary format  const int namelen = 80; //length of name of header in file  const int nospaces = 2; //number of spaces after a triangle  //write header: aname  int i, j;  char buf[namelen+1];  int strend = 0;  for(i = 0; i <= namelen; i++)     {      if (aname[i] == 0) {strend = 1;}      if (!strend) {buf[i] = aname[i];}      else {buf[i] = 0;}    }  FIOWriteString(ost,buf,namelen);  PrintMessage(5,"header = ",buf);  //RWrite Number of facets  int nofacets = GetNT();  FIOWriteInt(ost,nofacets);  PrintMessage(5,"NO facets = ", nofacets);  float f;  char spaces[nospaces+1];  for (i = 0; i < nospaces; i++) {spaces[i] = ' ';}  spaces[nospaces] = 0;  for (i = 1; i <= GetNT(); i++)    {      const STLTriangle & t = GetTriangle(i);      const Vec<3> & n = t.Normal();      f = n(0); FIOWriteFloat(ost,f);      f = n(1); FIOWriteFloat(ost,f);      f = n(2); FIOWriteFloat(ost,f);      for (j = 1; j <= 3; j++)	{	  const Point3d p = GetPoint(t.PNum(j));	  	  f = p.X(); FIOWriteFloat(ost,f);	  f = p.Y(); FIOWriteFloat(ost,f);	  f = p.Z(); FIOWriteFloat(ost,f);	}      FIOWriteString(ost,spaces,nospaces);    }  PrintMessage(5,"done");}
开发者ID:AlexanderToifl,项目名称:viennamesh-dev,代码行数:57,


示例26: assert

voidContestDijkstra::AddStartEdges(){  assert(num_stages <= MAX_STAGES);  assert(n_points > 0);  const int max_altitude = incremental    ? GetMaximumStartAltitude(GetPoint(n_points - 1))    : 0;  for (ScanTaskPoint destination(0, 0), end(0, n_points);       destination != end; destination.IncrementPointIndex()) {    // only add points that are valid for the finish    if (!incremental ||        GetPoint(destination).GetIntegerAltitude() <= max_altitude)      LinkStart(destination);  }}
开发者ID:FlorianR,项目名称:XCSoar,代码行数:18,


示例27: printAllPoint

void printAllPoint() {    int i, j;    for (i = 0; i < SSize; i++) {        tmpInput = GetPoint(i, SHead);        for (j = 0; j < dataDimension; j++) {            printf("%d", *(tmpInput->data[j]));        }    }}
开发者ID:AlanRuijia,项目名称:KeySkyBandQuery,代码行数:9,


示例28: TextEntity

void InputEntity::SetLabel(std::string text){	if(NULL != label)		label->SetText(text);	else			label = new TextEntity(text, FONT_SIZE_NORMAL);	SetPoint(GetPoint());}
开发者ID:dreamsxin,项目名称:bwakngin,代码行数:9,



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


C++ GetPointer函数代码示例
C++ GetPlayers函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。