本文整理汇总了C++中IoMessage_locals_doubleArgAt_函数的典型用法代码示例。如果您正苦于以下问题:C++ IoMessage_locals_doubleArgAt_函数的具体用法?C++ IoMessage_locals_doubleArgAt_怎么用?C++ IoMessage_locals_doubleArgAt_使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IoMessage_locals_doubleArgAt_函数的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:AlexGensek,项目名称:io,代码行数:8,代码来源:IoODEMass.c
示例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));
}
开发者ID:Akiyah,项目名称:io,代码行数:8,代码来源:_IoCairoSVGSurface.c
示例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;
}
开发者ID:AlexGensek,项目名称:io,代码行数:9,代码来源:IoCairoSurface.c
示例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));
}
开发者ID:robertpfeiffer,项目名称:io,代码行数:9,代码来源:IoCairoLinearGradient.c
示例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;
}
开发者ID:gahr,项目名称:io,代码行数:9,代码来源:_IoCairoPDFSurface.c
示例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));
}
开发者ID:ADTSH,项目名称:io,代码行数:9,代码来源:IoODEBox.c
示例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;
}
开发者ID:Akiyah,项目名称:io,代码行数:9,代码来源:IoODEJoint.c
示例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;
}
开发者ID:eklitzke,项目名称:io,代码行数:10,代码来源:IoCairoContext.c
示例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;
}
开发者ID:cdcarter,项目名称:io,代码行数:10,代码来源:IoODEBody.c
示例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;
}
开发者ID:eklitzke,项目名称:io,代码行数:10,代码来源:IoCairoContext.c
示例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;
}
开发者ID:Akiyah,项目名称:io,代码行数:11,代码来源:IoODEPlane.c
示例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);
}
开发者ID:Akiyah,项目名称:io,代码行数:53,代码来源:IoRandom.c
示例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)));
}
开发者ID:Akiyah,项目名称:io,代码行数:13,代码来源:IoNumber.c
示例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;
}
开发者ID:ADTSH,项目名称:io,代码行数:29,代码来源:IoVector_gl.c
示例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;
}
开发者ID:eklitzke,项目名称:io,代码行数:7,代码来源:IoEventManager.c
示例16: IoMessage_locals_doubleArgAt_
IOIMAGE_API IoObject *IoImage_filterGauss(IoImage *self, IoObject *locals, IoMessage *m)
{
/*doc Image filterGauss(sigma)
Returns new image as a result of applying filter. Implements Gauss smoothing filtering with parameter sigma.
*/
double sigma = IoMessage_locals_doubleArgAt_(m, locals, 0);
int filterSize = round(sigma * 2.5) * 2 + 1;
UArray* filter = UArray_new();
UArray_setItemType_(filter, CTYPE_int8_t);
UArray_setEncoding_(filter, CENCODING_NUMBER);
UArray_setSize_(filter, filterSize * filterSize);
int8_t *filterBytes = UArray_mutableBytes(filter);
int x, y, x1, y1;
for(y = 0; y < filterSize; y++)
{
y1 = y - filterSize / 2;
for(x = 0; x < filterSize; x++)
{
x1 = x - filterSize / 2;
filterBytes[x + y * filterSize] = exp(-(x1*x1 + y1*y1)/2/sigma) * filterSize * filterSize * 2;
}
}
IoImage* toReturn = IoImage_newWithImage_(IOSTATE, Image_applyLinearFilter(DATA(self)->image, filterSize, filterSize, filter));
UArray_free(filter);
return toReturn;
}
开发者ID:Alessandroo,项目名称:io,代码行数:26,代码来源:IoImage.c
注:本文中的IoMessage_locals_doubleArgAt_函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论