primitiveSetFog(void) { // B3DAcceleratorPlugin>>#primitiveSetFog double density; sqInt fogType; sqInt handle; sqInt result; sqInt rgba; double start; double stop; if (!((methodArgumentCount()) == 6)) { return primitiveFail(); } rgba = positive32BitValueOf(stackValue(0)); stop = floatValueOf(stackValue(1)); start = floatValueOf(stackValue(2)); density = floatValueOf(stackValue(3)); fogType = stackIntegerValue(4); handle = stackIntegerValue(5); if (failed()) { return null; } result = b3dxSetFog(handle, fogType, density, start, stop, rgba); if (!result) { return primitiveFail(); } return pop(6); }
primitiveAtPut(void) { float *floatPtr; double floatValue; sqInt index; sqInt rcvr; sqInt value; value = stackValue(0); if (isIntegerObject(value)) { floatValue = ((double) (integerValueOf(value)) ); } else { floatValue = floatValueOf(value); } index = stackIntegerValue(1); rcvr = stackValue(2); if (!((!(failed())) && ((isWords(rcvr)) && ((index > 0) && (index <= (slotSizeOf(rcvr))))))) { return primitiveFail(); } floatPtr = firstIndexableField(rcvr); floatPtr[index - 1] = (((float) floatValue)); popthenPush(3, value); return 0; }
primitiveAtPut(void) { // FloatArrayPlugin>>#primitiveAtPut float *floatPtr; double floatValue; sqInt index; sqInt rcvr; sqInt value; value = stackValue(0); if (isIntegerObject(value)) { floatValue = ((double) (integerValueOf(value)) ); } else { floatValue = floatValueOf(value); } index = stackIntegerValue(1); rcvr = stackObjectValue(2); if (failed()) { return null; } success(isWords(rcvr)); success((index > 0) && (index <= (slotSizeOf(rcvr)))); if (failed()) { return null; } floatPtr = firstIndexableField(rcvr); floatPtr[index - 1] = (((float) floatValue)); if (!(failed())) { popthenPush(3, value); } }
/* Matrix2x3Plugin>>#loadArgumentPoint: */ static sqInt loadArgumentPoint(sqInt point) { int isInt; sqInt oop; if (failed()) { return null; } if (!((fetchClassOf(point)) == (classPoint()))) { return primitiveFail(); } oop = fetchPointerofObject(0, point); isInt = isIntegerObject(oop); if (!(isInt || (isFloatObject(oop)))) { return primitiveFail(); } if (isInt) { m23ArgX = integerValueOf(oop); } else { m23ArgX = floatValueOf(oop); } oop = fetchPointerofObject(1, point); isInt = isIntegerObject(oop); if (!(isInt || (isFloatObject(oop)))) { return primitiveFail(); } if (isInt) { m23ArgY = integerValueOf(oop); } else { m23ArgY = floatValueOf(oop); } return 0; }
//----------------------------------------------------------------------------- // Function: IPXactValueParser::parseExpression() //----------------------------------------------------------------------------- qreal IPXactValueParser::parseConstant(QString const& expression, QString const& format) const { if (format == "long") { return longValueOf(expression); } else if (format == "float") { return floatValueOf(expression); } else { return expression.toDouble(); } }