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

C++ setZ函数代码示例

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

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



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

示例1: setX

AGE_Vector3D::AGE_Vector3D(const AGE_Vector2D &vector, float zpos)
{
    setX(vector.x());
    setY(vector.y());
    setZ(zpos);

}
开发者ID:HeeroNight,项目名称:AGE2D,代码行数:7,代码来源:age_vector3d.cpp


示例2: NoteCanvas

StereotypePropertiesCanvas::StereotypePropertiesCanvas(UmlCanvas * canvas,
        DiagramItem * it,
        QString s)
    : NoteCanvas(canvas, 0, 0, 0), di(it)
{
    connect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(update()));

    note = s;	// already unicode

    QFontMetrics fm(the_canvas()->get_font(itsfont));
    QSize sz = fm.size(0, s);
    const int margin = (int)(2 * NOTE_MARGIN * the_canvas()->zoom());
    int w = sz.width() + margin;
    int h = sz.height() + margin;

    if (w < width())
        w = width();

    if (h < height())
        h = height();

    DiagramCanvas::resize(w, h);
    setZ(it->get_z());

    width_scale100 = w;
    height_scale100 = h;
    set_center100();
}
开发者ID:harmegnies,项目名称:douml,代码行数:28,代码来源:StereotypePropertiesCanvas.cpp


示例3: setX

HomogenusPosition::HomogenusPosition(const Vector3& vec)
{
	setX(vec.getX());
	setY(vec.getY());
	setZ(vec.getZ());
	setW(1.0f);
};
开发者ID:jfischoff,项目名称:obido_math,代码行数:7,代码来源:HomogenusPosition.cpp


示例4: _metricsFont

DataSetView::DataSetView() : _metricsFont(_font)
{
	setFlag(QQuickItem::ItemHasContents, true);

	material.setColor(Qt::black);

	connect(this, &DataSetView::parentChanged, this, &DataSetView::myParentChanged);

	connect(this, &DataSetView::viewportXChanged, this, &DataSetView::viewportChanged);
	connect(this, &DataSetView::viewportYChanged, this, &DataSetView::viewportChanged);
	connect(this, &DataSetView::viewportWChanged, this, &DataSetView::viewportChanged);
	connect(this, &DataSetView::viewportHChanged, this, &DataSetView::viewportChanged);

	connect(this, &DataSetView::itemDelegateChanged, this, &DataSetView::reloadTextItems);
	connect(this, &DataSetView::rowNumberDelegateChanged, this, &DataSetView::reloadRowNumbers);
	connect(this, &DataSetView::columnHeaderDelegateChanged, this, &DataSetView::reloadColumnHeaders);
	connect(this, &DataSetView::leftTopCornerDelegateChanged, this, &DataSetView::reloadLeftTopCorner);

	connect(this, &DataSetView::itemHorizontalPaddingChanged, this, &DataSetView::calculateCellSizes);
	connect(this, &DataSetView::itemVerticalPaddingChanged, this, &DataSetView::calculateCellSizes);

	connect(this, &DataSetView::itemSizeChanged, this, &DataSetView::reloadTextItems);
	connect(this, &DataSetView::itemSizeChanged, this, &DataSetView::reloadRowNumbers);
	connect(this, &DataSetView::itemSizeChanged, this, &DataSetView::reloadColumnHeaders);
	connect(this, &DataSetView::itemSizeChanged, this, &DataSetView::reloadLeftTopCorner);

	setZ(10);
}
开发者ID:akashrajkn,项目名称:jasp-desktop,代码行数:28,代码来源:datasetview.cpp


示例5: setX

const Vec3f& Vec3f::operator*=(float fValue)
{
    setX(X()*fValue);
    setY(Y()*fValue);
    setZ(Z()*fValue);
    return (*this);
}
开发者ID:NicolasLutz,项目名称:cpoa_m1s1,代码行数:7,代码来源:vec3f.cpp


示例6: cos

            Point3& Point3::rotate(const Point3 direction, const double &angle) {
                const double cosTheta = cos(angle);
                const double sinTheta = sin(angle);
                const double x = direction.getX();
                const double y = direction.getY();
                const double z = direction.getZ();

                Point3 p;
                double newX = (cosTheta + (1 - cosTheta) * x * x) * m_x;
                newX += ((1 - cosTheta) * x * y - z * sinTheta) * m_y;
                newX += ((1 - cosTheta) * x * z + y * sinTheta) * m_z;

                double newY = ((1 - cosTheta) * x * y + z * sinTheta) * m_x;
                newY += (cosTheta + (1 - cosTheta) * y * y) * m_y;
                newY += ((1 - cosTheta) * y * z - x * sinTheta) * m_z;

                double newZ = ((1 - cosTheta) * x * z - y * sinTheta) * m_x;
                newZ += ((1 - cosTheta) * y * z + x * sinTheta) * m_y;
                newZ += (cosTheta + (1 - cosTheta) * z * z) * m_z;

                setX(newX);
                setY(newY);
                setZ(newZ);

                return *this;
            }
开发者ID:DKarlberg,项目名称:OpenDaVINCI,代码行数:26,代码来源:Point3.cpp


示例7: setX

	void Rotation::set(const Double& av, const Double& ax, const Double& ay, const Double& az)
	{
		a = av;
		setX(ax);
		setY(ay);
		setZ(az);
	}
开发者ID:Dagal,项目名称:libDGL,代码行数:7,代码来源:Rotation.cpp


示例8: createProperties

KReportItemCheckBox::KReportItemCheckBox(const QDomNode &element)
{
    createProperties();
    QDomNodeList nl = element.childNodes();
    QString n;
    QDomNode node;

    nameProperty()->setValue(element.toElement().attribute(QLatin1String("report:name")));
    m_controlSource->setValue(element.toElement().attribute(QLatin1String("report:item-data-source")));
    setZ(element.toElement().attribute(QLatin1String("report:z-index")).toDouble());
    m_foregroundColor->setValue(QColor(element.toElement().attribute(QLatin1String("fo:foreground-color"))));
    m_checkStyle->setValue(element.toElement().attribute(QLatin1String("report:check-style")));
    m_staticValue->setValue(QVariant(element.toElement().attribute(QLatin1String("report:value"))).toBool());

    parseReportRect(element.toElement());

    for (int i = 0; i < nl.count(); i++) {
        node = nl.item(i);
        n = node.nodeName();

        if (n == QLatin1String("report:line-style")) {
            KReportLineStyle ls;
            if (parseReportLineStyleData(node.toElement(), &ls)) {
                m_lineWeight->setValue(ls.width());
                m_lineColor->setValue(ls.color());
                m_lineStyle->setValue(QPen(ls.penStyle()));
            }
        } else {
            kreportpluginWarning() << "while parsing check element encountered unknow element: " << n;
        }
    }

}
开发者ID:KDE,项目名称:kreport,代码行数:33,代码来源:KReportItemCheck.cpp


示例9: PfPvPlotZoneLabel

    PfPvPlotZoneLabel(PfPvPlot *_parent, int _zone_number)
    {
        parent = _parent;
        zone_number = _zone_number;

        RideItem *rideItem = parent->rideItem;
        const Zones *zones = rideItem->zones;
        int zone_range = rideItem->zoneRange();

        setZ(1.0 + zone_number / 100.0);

        // create new zone labels if we're shading
        if (zone_range >= 0) {

            // retrieve zone setup
            QList <int> zone_lows = zones->getZoneLows(zone_range);
            QList <QString> zone_names = zones->getZoneNames(zone_range);
            int num_zones = zone_lows.size();
            assert(zone_names.size() == num_zones);

            if (zone_number < num_zones) {

                watts = ((zone_number + 1 < num_zones) ?  0.5 * (zone_lows[zone_number] + zone_lows[zone_number + 1]) : ( (zone_number > 0) ?  (1.5 * zone_lows[zone_number] - 0.5 * zone_lows[zone_number - 1]) : 2.0 * zone_lows[zone_number]));

                text = QwtText(zone_names[zone_number]);
                text.setFont(QFont("Helvetica",24, QFont::Bold));
                QColor text_color = zoneColor(zone_number, num_zones);
                text_color.setAlpha(64);
                text.setColor(text_color);
            }
        }
    }
开发者ID:jasonwiener,项目名称:GoldenCheetah,代码行数:32,代码来源:PfPvPlot.cpp


示例10: Line

LedgerLine::LedgerLine(Score* s)
   : Line(s, false)
      {
      setZ(int(Element::Type::NOTE) * 100 - 50);
      setSelectable(false);
      _next = 0;
      }
开发者ID:Angeldude,项目名称:MuseScore,代码行数:7,代码来源:ledgerline.cpp


示例11: setX

Vertex& Vertex::operator=(const Vect &other) {
    setX(other.getX());
    setY(other.getY());
    setZ(other.getZ());
    
    return *this;
}
开发者ID:sondrele,项目名称:NTNU,代码行数:7,代码来源:rayscene_shapes.cpp


示例12: setZ

void SColor::B(float b) {
    if (b > 1.0f)
        b = 1;
    if (b < 0)
        b = 0;
    setZ(b);
}
开发者ID:sondrele,项目名称:NTNU,代码行数:7,代码来源:rayscene_shapes.cpp


示例13: setX

PacketMotion::PacketMotion(int8_t x, int8_t y, int8_t z, int8_t rot) {
	setX(x);
	setY(y);
	setZ(z);
	setRot(rot);

	mCurrentField = 0;
}
开发者ID:quadcopter5,项目名称:quadcopter,代码行数:8,代码来源:packetmotion.cpp


示例14: setX

Triangle::Triangle(float x, float y, float z, float size, int farbindex):size(size)
{
	setX(x);
	setY(y);
	setZ(z);
	setFilled(true);
	setActiveColorByIndex(farbindex);
}
开发者ID:saha0010,项目名称:graffiti,代码行数:8,代码来源:Triangle.cpp


示例15: getVertexCircular3

void Poly::transform(const Matrix4d &T) {
  for (uint i = 0; i < vertices.size();  i++) {
    const Vector3d v = T * getVertexCircular3(i) ;
    vertices[i].set(v.x(),v.y());
  }
  setZ((T * Vector3d(0,0,z)).z());
  calcHole();
}
开发者ID:CyberWalkingGuy,项目名称:repsnapper,代码行数:8,代码来源:poly.cpp


示例16: setData

// Initialize internal members
void AllPlotSlopeCurve::init()
{

    d_data = new PrivateData;
    setData( new QwtPointSeriesData() );

    setZ( 25.0 );
}
开发者ID:cernst72,项目名称:GoldenCheetah,代码行数:9,代码来源:AllPlotSlopeCurve.cpp


示例17: cos

            Point3& Point3::rotateX(const double &angle) {
                double y = cos(angle) * getY() - sin(angle) * getZ();
                double z = sin(angle) * getY() + cos(angle) * getZ();
                setY(y);
                setZ(z);

                return (*this);
            }
开发者ID:Duxiao777,项目名称:2013-mini-smart-vehicles,代码行数:8,代码来源:Point3.cpp


示例18: QwtPlotItem

//! Constructor 
QwtPlotLegendItem::QwtPlotLegendItem():
    QwtPlotItem( QwtText( "Legend" ) )
{
    d_data = new PrivateData;

    setItemInterest( QwtPlotItem::LegendInterest, true );
    setZ( 100.0 );
}
开发者ID:iclosure,项目名称:jdataanalyse,代码行数:9,代码来源:qwt_plot_legenditem.cpp


示例19: setX

Vector4D& Vector4D::operator*=(float m)
{
	setX(x() * m);
	setY(y() * m);
	setZ(z() * m);
	setW(w() * m);
	return *this;
}
开发者ID:zhiyb,项目名称:graphic,代码行数:8,代码来源:vector4d.cpp


示例20: GraphicalCell

Decoration::Decoration( Cell * parent, QCanvas *canvas)
	: GraphicalCell( parent->getRow(), parent->getCol(), canvas )
{
	_parent = parent;
	setZ( CAN_DECO );
	setSequence( ImageTheme.decoration );
	setFrame( 0 );
}
开发者ID:q4a,项目名称:attal,代码行数:8,代码来源:graphicalCell.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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