//============================================================================== void EndEffector::copy(const EndEffector& _otherEndEffector) { if(this == &_otherEndEffector) return; setState(_otherEndEffector.getEndEffectorState()); setProperties(_otherEndEffector.getEndEffectorProperties()); }
//============================================================================== EndEffector::EndEffector(BodyNode* _parent, const PropertiesData& _properties) : Entity(ConstructFrame), Frame(_parent, ""), FixedFrame(_parent, "", _properties.mDefaultTransform), TemplatedJacobianNode<EndEffector>(_parent) { setProperties(_properties); }
// Set velocities, with a dialog void ParameterPattern:: setVelocities(QMainWindow *parent, EventSelection *selection, int normVelocity) { setProperties(parent, selection, Note::EventType, &ParameterPattern::VelocityPatterns, normVelocity); }
void radiationWallPatch::updateProperties(const dictionary& newDict) { //- the main properties should be updated first updateBoundaryProperties(newDict); propsDict_ = newDict.subDict(typeName + "Properties"); setProperties(); }
void JniManager::toProcessRequest(jobject obj, MonoObject* processRequest) { JNIEnv* env = getEnv(); MonoDomain* monoDomain = getMonoDomain(); string c_assemblyName = typeConverter->convertToC<string>(env, env->CallObjectMethod(obj, getAssemblyName, "()Ljava/lang/String;")); string c_assemblyPath = typeConverter->convertToC<string>(env, env->CallObjectMethod(obj, getAssemblyPath, "()Ljava/lang/String;")); string c_methodName = typeConverter->convertToC<string>(env, env->CallObjectMethod(obj, getMethodName, "()Ljava/lang/String;")); MonoString* assemblyName = mono_string_new(monoDomain, c_assemblyName.c_str()); MonoString* assemblyPath = mono_string_new(monoDomain, c_assemblyPath.c_str()); MonoString* methodName = mono_string_new(monoDomain, c_methodName.c_str()); bool fullTrust = env->CallBooleanMethod(obj, getFullTrust); bool isSingleton = env->CallBooleanMethod(obj, getIsSingleton); bool log = env->CallBooleanMethod(obj, getLog); bool notifyEvents = env->CallBooleanMethod(obj, getNotifyEvents); MonoObject* exception = NULL; void* args[1]; args[0] = assemblyName; mono_runtime_invoke(setAssemblyNameField, processRequest, args, &exception); args[0] = assemblyPath; mono_runtime_invoke(setAssemblyPathField, processRequest, args, &exception); args[0] = methodName; mono_runtime_invoke(setMethodNameField, processRequest, args, &exception); args[0] = &fullTrust; mono_runtime_invoke(setFullTrustField, processRequest, args, &exception); args[0] = &log; mono_runtime_invoke(setLogField, processRequest, args, &exception); args[0] = &isSingleton; mono_runtime_invoke(setIsSingletonField, processRequest, args, &exception); args[0] = ¬ifyEvents; mono_runtime_invoke(setNotifyEventsField, processRequest, args, &exception); if (exception) { const char* message = mono_string_to_utf8(mono_object_to_string(exception, NULL)); throwException(message); } jobject javaMethodArguments = env->CallObjectMethod(obj, getMethodArguments); setProperties(env, javaMethodArguments, addMethodArgumentsProperty, processRequest); //request->MethodArguments = typeConverter->convertToC<Dictionary<String^, Object^>^>(env, env->CallObjectMethod(obj, getMethodArguments)); //request->InboundProperties = typeConverter->convertToC<Dictionary<String^, Object^>^>(env, env->CallObjectMethod(obj, getInboundProperties)); //request->InvocationProperties = typeConverter->convertToC<Dictionary<String^, Object^>^>(env, env->CallObjectMethod(obj, getInvocationProperties)); //request->OutboundProperties = typeConverter->convertToC<Dictionary<String^, Object^>^>(env, env->CallObjectMethod(obj, getOutboundProperties)); //request->SessionProperties = typeConverter->convertToC<Dictionary<String^, Object^>^>(env, env->CallObjectMethod(obj, getSessionProperties)); }
ModelEntityItem::ModelEntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties) : EntityItem(entityItemID, properties) { _type = EntityTypes::Model; setProperties(properties, true); _lastAnimated = usecTimestampNow(); _jointMappingCompleted = false; _color[0] = _color[1] = _color[2] = 0; }
bool DVBC::tune(int streamID, int feFD, const input::dvb::FrontendData &frontendData) { SI_LOG_INFO("Stream: %d, Start tuning process for DVB-C(2)...", streamID); // Now tune by setting properties if (!setProperties(feFD, frontendData)) { return false; } return true; }
EntityItem::EntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties) { _type = EntityTypes::Unknown; _lastEdited = 0; _lastEditedFromRemote = 0; _lastEditedFromRemoteInRemoteTime = 0; _lastUpdated = 0; _created = properties.getCreated(); initFromEntityItemID(entityItemID); setProperties(properties, true); // force copy }
void RedSpreadBoom::shoot(int angle, D3DXVECTOR3 startPoint, int ally, float scaleX) { setProperties(angle, ally, scaleX); D3DXVECTOR3 velo = D3DXVECTOR3(RED_SPREAD_MOVE_SPEED * Default::cos(DEGREE_TO_RADIAN(angle)), RED_SPREAD_MOVE_SPEED * Default::sin(DEGREE_TO_RADIAN(angle)), 0.0F); shoot(velo, startPoint, ally, scaleX); }
// our non-pure virtual subclass for now... SphereEntityItem::SphereEntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties) : EntityItem(entityItemID, properties) { _type = EntityTypes::Sphere; setProperties(properties); // NOTE: _volumeMultiplier is used to compute volume: // volume = _volumeMultiplier * _dimensions.x * _dimensions.y * _dimensions.z // The formula below looks funny because _dimension.xyz = diameter rather than radius. _volumeMultiplier *= PI / 6.0f; }
Spaceship::Spaceship() { std::cout << "Spaceship() noparam-constructor called." << std::endl; setProperties("Default Name", Vector3D(0.0f, 0.0f,0.0f), Vector3D(0.0f, 0.0f,0.0f), 100, 0); //m_name = "Default Name"; //m_position = Vector3D(0.0f,0.0f,0.0f); //m_velocity = Vector3D(0.0f,0.0f,0.0f); //m_fuelLevel = 100; //m_damage = 0; }
//============================================================================== EndEffector::EndEffector(BodyNode* parent, const BasicProperties& properties) : Entity(ConstructFrame), Frame(parent), FixedFrame(parent, properties.mDefaultTransform), common::EmbedPropertiesOnTopOf< EndEffector, detail::EndEffectorProperties, detail::EndEffectorCompositeBase>( std::make_tuple(parent, properties.mDefaultTransform), common::NoArg) { setProperties(properties); }
void processSubIntegrators(QDomDocument &doc, const Integrator *integrator, QDomElement integratorNode) { int idx = 0; while (integrator->getSubIntegrator(idx) != NULL) { const Integrator *childIntegrator = integrator->getSubIntegrator(idx); QDomElement childIntegratorNode = doc.createElement("integrator"); setProperties(doc, childIntegratorNode, childIntegrator->getProperties()); integratorNode.appendChild(childIntegratorNode); processSubIntegrators(doc, childIntegrator, childIntegratorNode); idx++; } }
//============================================================================== ShapeNode::ShapeNode(BodyNode* bodyNode, const BasicProperties& properties) : Entity(ConstructFrame), Frame(bodyNode), FixedFrame(bodyNode), detail::ShapeNodeCompositeBase( std::make_tuple(bodyNode, properties.mRelativeTf), bodyNode, properties) { setProperties(properties); mAmShapeNode = true; }
void PropagateRemoteMkdir::slotMkcolJobFinished() { _propagator->_activeJobs--; Q_ASSERT(_job); qDebug() << Q_FUNC_INFO << _job->reply()->request().url() << "FINISHED WITH STATUS" << _job->reply()->error() << (_job->reply()->error() == QNetworkReply::NoError ? QLatin1String("") : _job->reply()->errorString()); QNetworkReply::NetworkError err = _job->reply()->error(); _item->_httpErrorCode = _job->reply()->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); if (_item->_httpErrorCode == 405) { // This happens when the directory already exists. Nothing to do. } else if (err != QNetworkReply::NoError) { SyncFileItem::Status status = classifyError(err, _item->_httpErrorCode, &_propagator->_anotherSyncNeeded); auto errorString = _job->reply()->errorString(); if (_job->reply()->hasRawHeader("OC-ErrorString")) { errorString = _job->reply()->rawHeader("OC-ErrorString"); } done(status, errorString); return; } else if (_item->_httpErrorCode != 201) { // Normally we expect "201 Created" // If it is not the case, it might be because of a proxy or gateway intercepting the request, so we must // throw an error. done(SyncFileItem::NormalError, tr("Wrong HTTP code returned by server. Expected 201, but received \"%1 %2\".") .arg(_item->_httpErrorCode).arg(_job->reply()->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toString())); return; } _item->_requestDuration = _job->duration(); _item->_responseTimeStamp = _job->responseTimestamp(); _item->_fileId = _job->reply()->rawHeader("OC-FileId"); if (_item->_fileId.isEmpty()) { // Owncloud 7.0.0 and before did not have a header with the file id. // (https://github.com/owncloud/core/issues/9000) // So we must get the file id using a PROPFIND // This is required so that we can detect moves even if the folder is renamed on the server // while files are still uploading _propagator->_activeJobs++; auto propfindJob = new PropfindJob(_job->account(), _job->path(), this); propfindJob->setProperties(QList<QByteArray>() << "getetag" << "http://owncloud.org/ns:id"); QObject::connect(propfindJob, SIGNAL(result(QVariantMap)), this, SLOT(propfindResult(QVariantMap))); QObject::connect(propfindJob, SIGNAL(finishedWithError()), this, SLOT(propfindError())); propfindJob->start(); _job = propfindJob; return; } success(); }
Spaceship::Spaceship(const std::string& name, const Vector3D& pos, const Vector3D& vel, int fuel, int damage) { std::cout << "Spaceship() constructor w/params called." << std::endl; setProperties(name, pos, vel, fuel, damage); //m_name = name; //m_position = pos; //m_velocity = vel; //m_fuelLevel = fuel; //m_damage = damage; }
LineEntityItem::LineEntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties) : EntityItem(entityItemID) , _lineWidth(DEFAULT_LINE_WIDTH), _pointsChanged(true), _points(QVector<glm::vec3>(0)) { _type = EntityTypes::Line; setProperties(properties); }
PeriodicFunction::PeriodicFunction( PropertySettings& prop ) : OutputFunction() { phasev = 0.0; spanv = 1.0; amplitudev = 1.0; addProperty( "phase", Variant::t_real, this, &SawtoothFunction::phase, &SawtoothFunction::setPhase ); addProperty( "span", Variant::t_real, this, &SawtoothFunction::span, &SawtoothFunction::setSpan ); addProperty( "amplitude", Variant::t_real, this, &SawtoothFunction::amplitude, &SawtoothFunction::setAmplitude ); setProperties( prop ); //setTypename( "PeriodicFunction" ); // is abstract }
Exercise::Exercise(const QString &name, const QString &description, const QString &titleFilename, const QString &figureFilename, QObject *parent) :QObject(parent), m_id(0), m_name(name), m_description(description), m_titleFilename(titleFilename), m_figureFilename(figureFilename) { setProperties(); }
void FireCircle::shoot(int angle, D3DXVECTOR3 startPoint, int ally, float scaleX) { setProperties(angle, ally, scaleX); shoot(D3DXVECTOR3(BULLET_FIRE_CIRCLE_MOVE_SPEED * Default::cos(DEGREE_TO_RADIAN(angle)), BULLET_FIRE_CIRCLE_MOVE_SPEED * Default::sin(DEGREE_TO_RADIAN(angle)), 0.0F), startPoint, ally, scaleX); }
void B011001::initialize() { m_Obj = gluNewQuadric(); gluQuadricTexture(m_Obj, GL_TRUE); m_Earth = loadTextureBMP("EarthTexture.bmp"); glMatrixMode(GL_MODELVIEW); setProperties(); return ; }
// Set parameters bool HbDeviceNotificationDialogWidget::setDeviceDialogParameters(const QVariantMap ¶meters) { TRACE_ENTRY bool ret(false); mLastError = NoError; if (checkProperties(parameters)) { setProperties(parameters); ret = true; } TRACE_EXIT return ret; }
bool CCTMXLayer::initWithTilesetInfo(CCTMXTilesetInfo *tilesetInfo, CCTMXLayerInfo *layerInfo, CCTMXMapInfo *mapInfo) { // XXX: is 35% a good estimate ? CCSize size = layerInfo->m_tLayerSize; float totalNumberOfTiles = size.width * size.height; float capacity = totalNumberOfTiles * 0.35f + 1; // 35 percent is occupied ? CCTexture2D *texture = NULL; if( tilesetInfo ) { texture = CCTextureCache::sharedTextureCache()->addImage(tilesetInfo->m_sSourceImage.c_str()); } if (CCSpriteBatchNode::initWithTexture(texture, (unsigned int)capacity)) { if(tilesetInfo->m_IsNeedFlipX) { layerInfo->m_tOffset.x = layerInfo->m_tLayerSize.width; setScaleX(-1); } // layerInfo m_sLayerName = layerInfo->m_sName; m_tLayerSize = size; m_pTiles = layerInfo->m_pTiles; m_uMinGID = layerInfo->m_uMinGID; m_uMaxGID = layerInfo->m_uMaxGID; m_cOpacity = layerInfo->m_cOpacity; setProperties(CCDictionary::createWithDictionary(layerInfo->getProperties())); m_fContentScaleFactor = CCDirector::sharedDirector()->getContentScaleFactor(); // tilesetInfo m_pTileSet = tilesetInfo; CC_SAFE_RETAIN(m_pTileSet); // mapInfo m_tMapTileSize = mapInfo->getTileSize(); m_uLayerOrientation = mapInfo->getOrientation(); // offset (after layer orientation is set); CCPoint offset = this->calculateLayerOffset(layerInfo->m_tOffset); this->setPosition(CC_POINT_PIXELS_TO_POINTS(offset)); m_pAtlasIndexArray = ccCArrayNew((unsigned int)totalNumberOfTiles); this->setContentSize(CC_SIZE_PIXELS_TO_POINTS(CCSizeMake(m_tLayerSize.width * m_tMapTileSize.width, m_tLayerSize.height * m_tMapTileSize.height))); m_bUseAutomaticVertexZ = false; m_nVertexZvalue = 0; return true; } return false; }
void dsmcDiffuseCatalyticWallPatch::updateProperties(const dictionary& newDict) { // Info << "old dictionary: " << propsDict_ << endl; //- the main properties should be updated first updateBoundaryProperties(newDict); propsDict_ = newDict.subDict(typeName + "Properties"); setProperties(); }
ModelEntityItem::ModelEntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties) : EntityItem(entityItemID) { _animationProperties.associateWithAnimationLoop(&_animationLoop); _animationLoop.setResetOnRunning(false); _type = EntityTypes::Model; setProperties(properties); _jointMappingCompleted = false; _lastKnownCurrentFrame = -1; _color[0] = _color[1] = _color[2] = 0; }
PolyVoxEntityItem::PolyVoxEntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties) : EntityItem(entityItemID), _voxelVolumeSize(PolyVoxEntityItem::DEFAULT_VOXEL_VOLUME_SIZE), _voxelData(PolyVoxEntityItem::DEFAULT_VOXEL_DATA), _voxelDataDirty(true), _voxelSurfaceStyle(PolyVoxEntityItem::DEFAULT_VOXEL_SURFACE_STYLE), _xTextureURL(PolyVoxEntityItem::DEFAULT_X_TEXTURE_URL), _yTextureURL(PolyVoxEntityItem::DEFAULT_Y_TEXTURE_URL), _zTextureURL(PolyVoxEntityItem::DEFAULT_Z_TEXTURE_URL) { _type = EntityTypes::PolyVox; setProperties(properties); }
void BrickWallBuilder::computeBrickInfo(const hkpShape* shape, const hkReal& mass, hkpRigidBodyCinfo& boxInfo) { // set properties for a brick boxInfo.m_mass = mass; hkpMassProperties massProperties; computeBrickPropertiesShape(shape, mass, massProperties); setProperties(massProperties, boxInfo); boxInfo.m_shape = shape; }
TextSprite::TextSprite(MaterialPtr material, const std::string &text, FontPtr font, PropertiesPtr properties) : Sprite(), _text(text), _font(font) { // Create geometry createGeometry(); // Add atlas texture to the material material->setTexture(bRenderer::DEFAULT_SHADER_UNIFORM_CHARACTER_MAP(), font->getAtlas()); setMaterial(material); setProperties(properties); }
MainWindow::MainWindow(Camera *camera): camera(camera), imageBeforeArea(this, &brushSizeScale), imageAfterArea(this, &deltaChooseScale), playing(true), masking(false) { setProperties(); construct(); show_all_children(); updateFrame(); }
ZoneEntityItem::ZoneEntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties) : EntityItem(entityItemID) { _type = EntityTypes::Zone; _shapeType = DEFAULT_SHAPE_TYPE; _compoundShapeURL = DEFAULT_COMPOUND_SHAPE_URL; _backgroundMode = BACKGROUND_MODE_INHERIT; setProperties(properties); }