Пример #1
0
void Cylinder::displace(XnPoint3D d)
{
	this->center.X += d.X;
	this->center.Y += d.Y;
	this->center.Z += d.Z;
    clamp_point(center, boundingBox);
}
Пример #2
0
void RectPrism::displace(XnPoint3D d)
{
	this->center.X += d.X;
	this->center.Y += d.Y;
	this->center.Z += d.Z;
    clamp_point(center, boundingBox);
}
Пример #3
0
static inline int
clamp_point_aux(bool clamp_coordinates, gs_fixed_point *ppt, floatp x, floatp y)
{
    if (!f_fits_in_bits(x, fixed_int_bits) || !f_fits_in_bits(y, fixed_int_bits)) {
	if (!clamp_coordinates)
	    return_error(gs_error_limitcheck);
	clamp_point(ppt, x, y);
    } else {
	/* 181-01.ps" fails with no rounding in 
	   "Verify as last element of a userpath and effect on setbbox." */
	ppt->x = float2fixed_rounded(x);
	ppt->y = float2fixed_rounded(y);
    }
    return 0;
}