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

C++ ry函数代码示例

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

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



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

示例1: random_robot_pos2

static Pos2 random_robot_pos2(const FieldGeometry *f) {
  std::uniform_real_distribution<Float> rx(
      -f->field_length / 2 + ROBOT_DIAM / 2,
      f->field_length / 2 + ROBOT_DIAM / 2);
  std::uniform_real_distribution<Float> ry(-f->field_width / 2 + ROBOT_DIAM / 2,
                                           f->field_width / 2 + ROBOT_DIAM / 2);
  std::uniform_real_distribution<Float> rw(-RAD(180), RAD(180));
  // return std::forward(rx(gen), ry(gen), rw(gen));
  return {rx(gen), ry(gen), rw(gen)};
}
开发者ID:gustavokcouto,项目名称:ssl-sim,代码行数:10,代码来源:sslsim.cpp


示例2: rtest_eq_dom_check

 RelTest
 rtest_eq_dom_check(View x, View y) {
   ViewRanges<View> rx(x), ry(y);
   while (rx() && ry()) {
     if (rx.max() < ry.min()) {
       ++rx;
     } else if (ry.max() < rx.min()) {
       ++ry;
     } else return RT_MAYBE;
   }
   return RT_FALSE;
 }
开发者ID:YoshihisaMaruya,项目名称:tool_test_chef,代码行数:12,代码来源:rel-test.hpp


示例3: rect

Path SVGRectElement::toPathData() const
{
    FloatRect rect(x().value(this), y().value(this), width().value(this), height().value(this));

    bool hasRx = hasAttribute(SVGNames::rxAttr);
    bool hasRy = hasAttribute(SVGNames::ryAttr);
    if (hasRx || hasRy) {
        float _rx = hasRx ? rx().value(this) : ry().value(this);
        float _ry = hasRy ? ry().value(this) : rx().value(this);
        return Path::createRoundedRectangle(rect, FloatSize(_rx, _ry));
    }

    return Path::createRectangle(rect);
}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:14,代码来源:SVGRectElement.cpp


示例4: x

KCanvasPath* SVGRectElement::toPathData() const
{
    float _x = x()->baseVal()->value(), _y = y()->baseVal()->value();
    float _width = width()->baseVal()->value(), _height = height()->baseVal()->value();

    bool hasRx = hasAttribute(String("rx").impl());
    bool hasRy = hasAttribute(String("ry").impl());
    if(hasRx || hasRy)
    {
        float _rx = hasRx ? rx()->baseVal()->value() : ry()->baseVal()->value();
        float _ry = hasRy ? ry()->baseVal()->value() : rx()->baseVal()->value();
        return KCanvasCreator::self()->createRoundedRectangle(_x, _y, _width, _height, _rx, _ry);
    }

    return KCanvasCreator::self()->createRectangle(_x, _y, _width, _height);
}
开发者ID:oroisec,项目名称:ios,代码行数:16,代码来源:SVGRectElement.cpp


示例5: ry

//////////////////////////////////////////////////////////////////////
/// @brief Add the circle and assign the position and radius with yellow
/// @param pos
/// @param vel
//////////////////////////////////////////////////////////////////////
void Physicsworld::addYellowObject(Vec4 pos,Vec4 vel)
{
  Rigidbody ry(pos, 1.0f, colour.yellow().r,colour.yellow().g,colour.yellow().b);

  ry.setVelocity(vel);
  Objectslist.push_back(ry);
}
开发者ID:yangg17,项目名称:box2d-,代码行数:12,代码来源:physicsworld.cpp


示例6: rx

void XYView::request(Requisition& req) const {
    TransformSetter::request(req);
    Requirement rx(xsize_orig_);
    Requirement ry(ysize_orig_);
    req.require_x(rx);
    req.require_y(ry);
}
开发者ID:vortexlaboratory,项目名称:neuron,代码行数:7,代码来源:xyview.cpp


示例7: rx

void VStrut::request(Requisition& requisition) const {
    Coord height = ascent_ + descent_;
    Requirement rx(natural_, stretch_, shrink_, 0);
    Requirement ry(height, 0, 0, (height == 0) ? 0 : descent_ / height);
    requisition.require(Dimension_X, rx);
    requisition.require(Dimension_Y, ry);
}
开发者ID:LambdaCalculus379,项目名称:SLS-1.02,代码行数:7,代码来源:layout.c


示例8: shapeMarginBounds

LineSegment RectangleShape::getExcludedInterval(LayoutUnit logicalTop, LayoutUnit logicalHeight) const
{
    const FloatRect& bounds = shapeMarginBounds();
    if (bounds.isEmpty())
        return LineSegment();

    float y1 = logicalTop.toFloat();
    float y2 = (logicalTop + logicalHeight).toFloat();

    if (y2 < bounds.y() || y1 >= bounds.maxY())
        return LineSegment();

    float x1 = bounds.x();
    float x2 = bounds.maxX();

    float marginRadiusX = rx() + shapeMargin();
    float marginRadiusY = ry() + shapeMargin();

    if (marginRadiusY > 0) {
        if (y2 < bounds.y() + marginRadiusY) {
            float yi = y2 - bounds.y() - marginRadiusY;
            float xi = ellipseXIntercept(yi, marginRadiusX, marginRadiusY);
            x1 = bounds.x() + marginRadiusX - xi;
            x2 = bounds.maxX() - marginRadiusX + xi;
        } else if (y1 > bounds.maxY() - marginRadiusY) {
            float yi =  y1 - (bounds.maxY() - marginRadiusY);
            float xi = ellipseXIntercept(yi, marginRadiusX, marginRadiusY);
            x1 = bounds.x() + marginRadiusX - xi;
            x2 = bounds.maxX() - marginRadiusX + xi;
        }
    }

    return LineSegment(x1, x2);
}
开发者ID:335969568,项目名称:Blink-1,代码行数:34,代码来源:RectangleShape.cpp


示例9: cx

KCanvasPath* SVGEllipseElement::toPathData() const
{
    float _cx = cx()->baseVal()->value(), _cy = cy()->baseVal()->value();
    float _rx = rx()->baseVal()->value(), _ry = ry()->baseVal()->value();

    return KCanvasCreator::self()->createEllipse(_cx, _cy, _rx, _ry);
}
开发者ID:oroisec,项目名称:ios,代码行数:7,代码来源:SVGEllipseElement.cpp


示例10: ry

void TextLine::request(Requisition& requisition) const 
{
	FontBoundingBox fbb;
	font_->font_bbox(fbb);
	Text::request(requisition);
	Requirement ry(fbb.ascent() + fbb.descent(), 0, 0, 0);
	requisition.require(Dimension_Y, ry);
}
开发者ID:PNCG,项目名称:neuron,代码行数:8,代码来源:iv3text.cpp


示例11: post_false

 forceinline ExecStatus
 post_false(Home home, ViewArray<VX>& x, const IntSet& y) {
   for (int i = x.size(); i--; ) {
     IntSetRanges ry(y);
     GECODE_ME_CHECK(x[i].minus_r(home,ry,false));
   }
   return ES_OK;
 }
开发者ID:MGKhKhD,项目名称:easy-IP,代码行数:8,代码来源:rel.hpp


示例12: rx

//---------------------------------------------------------------------------
void __fastcall TForm1::updateedits(TObject *Sender)
{
        CSpinNr->MaxValue = Ilosc-1;
        EditX->Text = rx(L[Nr].x);
        EditY->Text = ry(L[Nr].y);
        EditQ->Text = L[Nr].q;
        EditR->Text = L[Nr].r;
}
开发者ID:MChudak,项目名称:builder_nbody,代码行数:9,代码来源:Unit1.cpp


示例13: drawpiece

void drawpiece (WINDOW *w, int y, int x, int rot, int piece, int color) {
  int c, d;

  wattrset (w, COLOR_PAIR (color));
  for (d = 0; d < 4; d++) for (c = 0; c < 4; c++)
    if (blocks[rx(rot % rots[piece], d, c)][piece][ry(rot % rots[piece], d, c)] != '.')
      mvwaddstr (w, d + y, (c + x - 1) * 2 - 1, "  "); /* 2 spaces */
}
开发者ID:Bencepapa,项目名称:CymonsGames,代码行数:8,代码来源:main.c


示例14: mapToVideo

QPointF VideoRendererItem::mapToVideo(const QPointF &pos) {
	auto hratio = d->mposd->targetSize().width()/d->vtx.width();
	auto vratio = d->mposd->targetSize().height()/d->vtx.height();
	auto p = pos - d->vtx.topLeft();
	p.rx() *= hratio;
	p.ry() *= vratio;
	return p;
}
开发者ID:akhilo,项目名称:cmplayer,代码行数:8,代码来源:videorendereritem.cpp


示例15: DivideByZeroException

Point&
Point::operator/=(const int divisor) {
    if (divisor == 0)
        throw DivideByZeroException();

    rx() /= divisor;
    ry() /= divisor;
    return *this;
}
开发者ID:cgyan,项目名称:Prism,代码行数:9,代码来源:Point.cpp


示例16: rx

void Text::request(Requisition& requisition) const 
{
	FontBoundingBox fbb;
	font_->font_bbox(fbb);
	Requirement rx(width(' ') * initialColumns_, fil,
		width(' ') * (initialColumns_ - 1), 0);
	Requirement ry((fbb.ascent() + fbb.descent()) * initialLines_, fil,
		(fbb.ascent() + fbb.descent()) * (initialLines_ - 1), 0);
	requisition.require(Dimension_X, rx);
	requisition.require(Dimension_Y, ry);
}
开发者ID:PNCG,项目名称:neuron,代码行数:11,代码来源:iv3text.cpp


示例17: clip

int clip (BRICKTYPE *b) { /*collision detection */
  int c, d;

  for (d = 0; d < 4; d++) for (c = 0; c < 4; c++)
    if (blocks[rx(b->rot % rots[b->piece], d, c)][b->piece][ry(b->rot % rots[b->piece], d, c)] != '.') {
      if ((d + b->y < 0) && ((c + b->x - 1 < 1) || (c + b->x - 1 > col_width)))
        return 1; /* Edge collisions */
      else if ((d + b->y >= 0) && (buf[d + b->y][c + b->x - 1])) return 1;
    }
  return 0;
}
开发者ID:Bencepapa,项目名称:CymonsGames,代码行数:11,代码来源:main.c


示例18: rx

 void ModelView::rotate_by(int steps_x, int steps_y) {
     /* x -> rotate about y axis */
     Eigen::Transform3f rx(
         Eigen::AngleAxis<float>(steps_x * ROTATION_ANGLE_,
                                 Eigen::Vector3f(0, 1, 0)));
     /* y -> rotate about x axis */
     Eigen::Transform3f ry(
         Eigen::AngleAxis<float>(steps_y * ROTATION_ANGLE_,
                                 Eigen::Vector3f(1, 0, 0)));
     user_rotation_ = rx * ry * user_rotation_;
 }
开发者ID:gholms,项目名称:4107hw3,代码行数:11,代码来源:ModelView.cpp


示例19: getProjection

bool Camera::calcViewRay(      Line    &line, 
                               Int32     x, 
                               Int32     y, 
                         const Viewport &port,
                               Real32   *t   )
{
    if(port.getPixelWidth() <= 0 || port.getPixelHeight() <= 0)
    {
        return false;
    }

    Matrix proj, projtrans, view;

    getProjection(proj,
                  port.getPixelWidth(),
                  port.getPixelHeight());

    getProjectionTranslation(projtrans,
                             port.getPixelWidth(),
                             port.getPixelHeight());

    getViewing(view,
               port.getPixelWidth(),
               port.getPixelHeight());

    Matrix wctocc = proj;

    wctocc.mult(projtrans);
    wctocc.mult(view);

    Matrix cctowc;

    cctowc.invertFrom(wctocc);

    Real32 rx(0.f), ry(0.f);
    port.getNormalizedCoordinates(rx, ry, x, y);

    Pnt3f from, at;

    cctowc.multFull(Pnt3f(rx, ry, -1), from);
    cctowc.multFull(Pnt3f(rx, ry,  1), at  );

	Vec3f dir = at - from;
	
	if(t != NULL)
	{
		*t = dir.length();
	}

    line.setValue(from, dir);

    return true;
}
开发者ID:DaveHarrison,项目名称:OpenSGDevMaster,代码行数:53,代码来源:OSGCamera.cpp


示例20: mousePressEvent

void ImageS::mousePressEvent(QMouseEvent *e)
{
    if(e->button()==Qt::LeftButton){
        auto cursor = e->pos();
        int x = cursor.rx();
        int y = cursor.ry()-45;
        int temp = x/60 + (y/60)*5;
        if(temp>=0 && temp< imageS.size())
            select = temp;
    }
    this->update();
}
开发者ID:KasenJ,项目名称:QuadraticCraft,代码行数:12,代码来源:Images.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ s0函数代码示例发布时间:2022-05-30
下一篇:
C++ rxrpc_skb函数代码示例发布时间: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