本文整理汇总了C++中setZ函数的典型用法代码示例。如果您正苦于以下问题:C++ setZ函数的具体用法?C++ setZ怎么用?C++ setZ使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setZ函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setX
AGE_Vector3D::AGE_Vector3D(const AGE_Vector2D &vector, float zpos)
{
setX(vector.x());
setY(vector.y());
setZ(zpos);
}
示例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();
}
示例3: setX
HomogenusPosition::HomogenusPosition(const Vector3& vec)
{
setX(vec.getX());
setY(vec.getY());
setZ(vec.getZ());
setW(1.0f);
};
示例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);
}
示例5: setX
const Vec3f& Vec3f::operator*=(float fValue)
{
setX(X()*fValue);
setY(Y()*fValue);
setZ(Z()*fValue);
return (*this);
}
示例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;
}
示例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);
}
示例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;
}
}
}
示例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);
}
}
}
示例10: Line
LedgerLine::LedgerLine(Score* s)
: Line(s, false)
{
setZ(int(Element::Type::NOTE) * 100 - 50);
setSelectable(false);
_next = 0;
}
示例11: setX
Vertex& Vertex::operator=(const Vect &other) {
setX(other.getX());
setY(other.getY());
setZ(other.getZ());
return *this;
}
示例12: setZ
void SColor::B(float b) {
if (b > 1.0f)
b = 1;
if (b < 0)
b = 0;
setZ(b);
}
示例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;
}
示例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);
}
示例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();
}