本文整理汇总了C++中IoMessage_locals_doubleArgAt_函数的典型用法代码示例。如果您正苦于以下问题:C++ IoMessage_locals_doubleArgAt_函数的具体用法?C++ IoMessage_locals_doubleArgAt_怎么用?C++ IoMessage_locals_doubleArgAt_使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IoMessage_locals_doubleArgAt_函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IoMessage_locals_doubleArgAt_
IoObject *IoODEMass_setSphereMass(IoODEMass *self, IoObject *locals, IoMessage *m)
{
const double totalMass = IoMessage_locals_doubleArgAt_(m, locals, 0);
const double radius = IoMessage_locals_doubleArgAt_(m, locals, 1);
dMassSetSphereTotal(DATA(self), totalMass, radius);
return self;
}
示例2: CSTRING
IoObject *IoCairoSVGSurface_create(IoCairoSVGSurface *self, IoObject *locals, IoMessage *m)
{
char *filename = CSTRING(IoMessage_locals_symbolArgAt_(m, locals, 0));
double w = IoMessage_locals_doubleArgAt_(m, locals, 1);
double h = IoMessage_locals_doubleArgAt_(m, locals, 2);
return IoCairoSurface_newWithRawSurface_(IOSTATE, m, cairo_svg_surface_create(filename, w, h));
}
示例3: IoMessage_locals_doubleArgAt_
IoObject *IoCairoSurface_setFallbackResolution(IoCairoSurface *self, IoObject *locals, IoMessage *m)
{
double x = IoMessage_locals_doubleArgAt_(m, locals, 0);
double y = IoMessage_locals_doubleArgAt_(m, locals, 1);
cairo_surface_set_fallback_resolution(SURFACE(self), x, y);
CHECK_STATUS(self);
return self;
}
示例4: IoMessage_locals_doubleArgAt_
IoObject *IoCairoLinearGradient_create(IoCairoLinearGradient *self, IoObject *locals, IoMessage *m)
{
double x0 = IoMessage_locals_doubleArgAt_(m, locals, 0);
double y0 = IoMessage_locals_doubleArgAt_(m, locals, 1);
double x1 = IoMessage_locals_doubleArgAt_(m, locals, 2);
double y1 = IoMessage_locals_doubleArgAt_(m, locals, 3);
return IoCairoPattern_newWithRawPattern_(IOSTATE, m, cairo_pattern_create_linear(x0, y0, x1, y1));
}
示例5: IoMessage_locals_doubleArgAt_
IoObject *IoCairoPDFSurface_setSize(IoCairoPDFSurface *self, IoObject *locals, IoMessage *m)
{
double w = IoMessage_locals_doubleArgAt_(m, locals, 0);
double h = IoMessage_locals_doubleArgAt_(m, locals, 1);
cairo_pdf_surface_set_size(SURFACE(self), w, h);
CHECK_STATUS(self);
return self;
}
示例6: IoMessage_locals_doubleArgAt_
IoObject *IoODEBox_pointDepth(IoODEBox *self, IoObject *locals, IoMessage *m)
{
dReal lx = IoMessage_locals_doubleArgAt_(m, locals, 0);
dReal ly = IoMessage_locals_doubleArgAt_(m, locals, 1);
dReal lz = IoMessage_locals_doubleArgAt_(m, locals, 2);
IoODEBox_assertHasBoxId(self, locals, m);
return IONUMBER(dGeomBoxPointDepth(GEOMID, lx, ly, lz));
}
示例7: IoMessage_locals_doubleArgAt_
IoObject *IoODEJoint_setReal2(IoODEJoint *self, IoObject *locals, IoMessage *m, IoODEJointSetReal2 func)
{
dReal value1 = IoMessage_locals_doubleArgAt_(m, locals, 0);
dReal value2 = IoMessage_locals_doubleArgAt_(m, locals, 1);
IoODEJoint_assertValidJoint(self, locals, m);
func(JOINTID, value1, value2);
return self;
}
示例8: IoMessage_locals_valueArgAt_
IoObject *IoCairoContext_setSourceSurface(IoCairoContext *self, IoObject *locals, IoMessage *m)
{
IoCairoSurface *surface = IoMessage_locals_valueArgAt_(m, locals, 0);
double x = IoMessage_locals_doubleArgAt_(m, locals, 1);
double y = IoMessage_locals_doubleArgAt_(m, locals, 2);
cairo_set_source_surface(CONTEXT(self), IoCairoSurface_rawSurface(surface), x, y);
CHECK_STATUS(self);
return self;
}
示例9: IoMessage_locals_doubleArgAt_
IoObject *IoODEBody_addRelTorque(IoODEBody *self, IoObject *locals, IoMessage *m)
{
const double x = IoMessage_locals_doubleArgAt_(m, locals, 0);
const double y = IoMessage_locals_doubleArgAt_(m, locals, 1);
const double z = IoMessage_locals_doubleArgAt_(m, locals, 2);
IoODEBody_assertValidBody(self, locals, m);
dBodyAddRelTorque(BODYID, x, y, z);
return self;
}
示例10: IoMessage_locals_doubleArgAt_
IoObject *IoCairoContext_setSourceRGB(IoCairoContext *self, IoObject *locals, IoMessage *m)
{
double r = IoMessage_locals_doubleArgAt_(m, locals, 0);
double g = IoMessage_locals_doubleArgAt_(m, locals, 1);
double b = IoMessage_locals_doubleArgAt_(m, locals, 2);
cairo_set_source_rgb(CONTEXT(self), r, g, b);
CHECK_STATUS(self);
return self;
}
示例11: IoMessage_locals_doubleArgAt_
IoObject *IoODEPlane_setParams(IoODEPlane *self, IoObject *locals, IoMessage *m)
{
dReal a = IoMessage_locals_doubleArgAt_(m, locals, 0);
dReal b = IoMessage_locals_doubleArgAt_(m, locals, 1);
dReal c = IoMessage_locals_doubleArgAt_(m, locals, 2);
dReal d = IoMessage_locals_doubleArgAt_(m, locals, 3);
IoODEPlane_assertHasPlaneId(self, locals, m);
dGeomPlaneSetParams(GEOMID, a, b, c, d);
return self;
}
示例12: RandomGen_randomDouble
IoObject *IoRandom_value(IoObject *self, IoObject *locals, IoMessage *m)
{
/*doc Random value(optionalArg1, optionalArg2)
If called with:
<ul>
<li> no arguments, it returns a floating point
random Number between 0 and 1.
<li> one argument, it returns a floating point random
Number between 0 and optionalArg1.
<li> two arguments, it returns a floating point random
Number between optionalArg1 and optionalArg2.
</ul>
*/
double f = RandomGen_randomDouble(DATA(self));
double result = 0;
if (IoMessage_argCount(m) > 0)
{
double a = IoMessage_locals_doubleArgAt_(m, locals, 0);
if (IoMessage_argCount(m) > 1)
{
double b = IoMessage_locals_doubleArgAt_(m, locals, 1);
if (a == b )
{
result = a;
}
else
{
result = a + (b - a) * f;
}
}
else
{
if (a == 0)
{
result = 0;
}
else
{
result = a * f;
}
}
}
else
{
result = f;
}
return IONUMBER(result);
}
示例13: IO_METHOD
IO_METHOD(IoNumber, between)
{
/*doc Number between(aNumber1, aNumber2)
Returns the true if the receiver's value is between or
equal to aNumber1 and aNumber2, otherwise returns false.
*/
double a = IoMessage_locals_doubleArgAt_(m, locals, 0);
double b = IoMessage_locals_doubleArgAt_(m, locals, 1);
double n = DATA(self);
return IOBOOL(self, ((n >= a) && (n <= b)) || (n <= a && (n >= b)));
}
示例14: IoSeq_assertIsVector
IoObject *IoSeq_drawQuadTo(IoSeq *self, IoObject *locals, IoMessage *m)
{
IoSeq_assertIsVector(self, locals, m);
{
IoSeq *other = IoMessage_locals_pointArgAt_(m, locals, 0);
vec2f p = IoSeq_vec2f(self);
vec2f p2 = IoSeq_vec2f(other);
double x1, y1, x2, y2;
double s = 0;
if (IoMessage_argCount(m) > 1)
{
s = IoMessage_locals_doubleArgAt_(m, locals, 1);
}
x1 = (p.x) + s;
y1 = (p.y) + s;
x2 = (p2.x) - s;
y2 = (p2.y) - s;
glBegin(GL_QUADS);
glVertex2d(x1, y1);
glVertex2d(x2, y1);
glVertex2d(x2, y2);
glVertex2d(x1, y2);
glEnd();
}
return self;
}
示例15: IoMessage_locals_doubleArgAt_
IoObject *IoEventManager_setListenTimeout(IoEventManager *self, IoObject *locals, IoMessage *m)
{
double timeout = IoMessage_locals_doubleArgAt_(m, locals, 0);
struct timeval tv = timevalFromDouble(timeout);
event_loopexit(&tv);
return self;
}