当前位置: 首页>>代码示例>>C++>>正文


C++ ParamDictionary::addParameter方法代码示例

本文整理汇总了C++中ogre::ParamDictionary::addParameter方法的典型用法代码示例。如果您正苦于以下问题:C++ ParamDictionary::addParameter方法的具体用法?C++ ParamDictionary::addParameter怎么用?C++ ParamDictionary::addParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ogre::ParamDictionary的用法示例。


在下文中一共展示了ParamDictionary::addParameter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: BulletOperator

	BulletSpeedOperator::BulletSpeedOperator(BulletEventSystem* eventSystem) : BulletOperator(),
		m_isOperated(false)
	{
		m_type = "speed";
		m_parent = eventSystem;
		
		m_direction = Ogre::Vector3::ZERO;
		m_speed = 0.0;

		if (createParamDictionary("BulletSpeedOperator"))
        {
			Ogre::ParamDictionary* dict = getParamDictionary();
			dict->addParameter(Ogre::ParameterDef("mode", 
				"The mode of bullet speed operator.",
				Ogre::PT_STRING),&ms_modeCmd);	  

			dict->addParameter(Ogre::ParameterDef("direction", 
				"The direction of bullet speed operator.",
				Ogre::PT_VECTOR3),&ms_directionCmd);	

			dict->addParameter(Ogre::ParameterDef("speed", 
				"The speed of bullet speed operator.",
				Ogre::PT_REAL),&ms_speedCmd);	

		}
	}
开发者ID:gitrider,项目名称:wxsj2,代码行数:26,代码来源:FairyBulletSpeedOperator.cpp

示例2: initDefaults

	//---------------------------------------------------------------------
	bool EffectElement::initDefaults(const String &mType)
	{		
		if (createParamDictionary(mType + "EffectElement"))
		{
			Ogre::ParamDictionary* dict = getParamDictionary();

			dict->addParameter(Ogre::ParameterDef("StartTime", 
				"the start time of this element.",
				Ogre::PT_REAL),&msStartTimeCmd);

			dict->addParameter(Ogre::ParameterDef("LifeTime", 
				"the life time of this element.",
				Ogre::PT_REAL),&msLifeTimeCmd);

			dict->addParameter(Ogre::ParameterDef("Position", 
				"the relative pos from parent.",
				Ogre::PT_VECTOR3),&msRelPosCmd);

            dict->addParameter(Ogre::ParameterDef("Orientation", 
                "the relative orientation from parent.",
                Ogre::PT_QUATERNION),&msRelOrientationCmd);

			return true;

		}
		return false;
	}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:28,代码来源:WXEffectElement.cpp

示例3: force_title

    /** Default constructor. */
    GravityAffector(Ogre::ParticleSystem *psys)
      : ParticleAffector(psys)
      , mForce(0.0f)
      , mForceType(Type_Wind)
      , mPosition(0.0f)
      , mDirection(0.0f)
    {
        mType = "Gravity";

        // Init parameters
        if(createParamDictionary("GravityAffector"))
        {
            Ogre::ParamDictionary *dict = getParamDictionary();

            Ogre::String force_title("force");
            Ogre::String force_descr("Amount of force applied to particles.");
            Ogre::String force_type_title("force_type");
            Ogre::String force_type_descr("Type of force applied to particles (point or wind).");
            Ogre::String direction_title("direction");
            Ogre::String direction_descr("Direction of wind forces.");
            Ogre::String position_title("position");
            Ogre::String position_descr("Position of point forces.");

            dict->addParameter(Ogre::ParameterDef(force_title, force_descr, Ogre::PT_REAL), &msForceCmd);
            dict->addParameter(Ogre::ParameterDef(force_type_title, force_type_descr, Ogre::PT_STRING), &msForceTypeCmd);
            dict->addParameter(Ogre::ParameterDef(direction_title, direction_descr, Ogre::PT_VECTOR3), &msDirectionCmd);
            dict->addParameter(Ogre::ParameterDef(position_title, position_descr, Ogre::PT_VECTOR3), &msPositionCmd);
        }
    }
开发者ID:Adrian-Revk,项目名称:openmw,代码行数:30,代码来源:particles.cpp

示例4: force_title

    /** Default constructor. */
    GravityAffector(Ogre::ParticleSystem *psys)
      : ParticleAffector(psys)
      , mForce(0.0f)
      , mForceType(Type_Wind)
      , mPosition(0.0f)
      , mDirection(0.0f)
    {
        std::vector<Ogre::Bone*> bones = Ogre::any_cast<NiNodeHolder>(psys->getUserObjectBindings().getUserAny()).mBones;
        assert (!bones.empty());
        mEmitterBone = bones[0];
        Ogre::TagPoint* tag = static_cast<Ogre::TagPoint*>(mParent->getParentNode());
        mParticleBone = static_cast<Ogre::Bone*>(tag->getParent());

        mType = "Gravity";

        // Init parameters
        if(createParamDictionary("GravityAffector"))
        {
            Ogre::ParamDictionary *dict = getParamDictionary();

            Ogre::String force_title("force");
            Ogre::String force_descr("Amount of force applied to particles.");
            Ogre::String force_type_title("force_type");
            Ogre::String force_type_descr("Type of force applied to particles (point or wind).");
            Ogre::String direction_title("direction");
            Ogre::String direction_descr("Direction of wind forces.");
            Ogre::String position_title("position");
            Ogre::String position_descr("Position of point forces.");

            dict->addParameter(Ogre::ParameterDef(force_title, force_descr, Ogre::PT_REAL), &msForceCmd);
            dict->addParameter(Ogre::ParameterDef(force_type_title, force_type_descr, Ogre::PT_STRING), &msForceTypeCmd);
            dict->addParameter(Ogre::ParameterDef(direction_title, direction_descr, Ogre::PT_VECTOR3), &msDirectionCmd);
            dict->addParameter(Ogre::ParameterDef(position_title, position_descr, Ogre::PT_VECTOR3), &msPositionCmd);
        }
    }
开发者ID:AAlderman,项目名称:openmw,代码行数:36,代码来源:particles.cpp

示例5: mAttachTime

    AnimationSceneLightInfo::AnimationSceneLightInfo(void) :
    mAttachTime(0.0f),
    mLastTime(0.0f),
    mFadeInTime(0.0f),
    mFadeOutTime(0.0f),
    mDestColour(Ogre::ColourValue::Black)
    {
        if (createParamDictionary("AnimationSceneLightInfo"))
        {
            Ogre::ParamDictionary* dict = getParamDictionary();

            dict->addParameter(Ogre::ParameterDef("AttachTime", 
                "the time that starting changing the light.",
                Ogre::PT_REAL),&msAttachTimeCmd);	

            dict->addParameter(Ogre::ParameterDef("LastTime", 
                "the last time that changing the light.",
                Ogre::PT_REAL),&msLastTimeCmd);			

            dict->addParameter(Ogre::ParameterDef("FadeInTime", 
                "the fade in time.",
                Ogre::PT_REAL),&msFadeInTimeCmd);

            dict->addParameter(Ogre::ParameterDef("FadeOutTime", 
                "the fade out time.",
                Ogre::PT_REAL),&msFadeOutTimeCmd);

            dict->addParameter(Ogre::ParameterDef("DestColour", 
                "the dest colour of light.",
                Ogre::PT_COLOURVALUE),&msDestColourCmd);
        }
    }
开发者ID:brock7,项目名称:TianLong,代码行数:32,代码来源:WXAnimationSceneLightInfo.cpp

示例6: initParamDictionary

	//---------------------------------------------------------------------
	bool Skill::initParamDictionary(void)
	{
		if (createParamDictionary("Skill"))
		{
			Ogre::ParamDictionary* dict = getParamDictionary();			

			dict->addParameter(Ogre::ParameterDef("Animation", 
				"name of animation.",
				Ogre::PT_STRING),&msAnimationNameCmd);	  

			dict->addParameter(Ogre::ParameterDef("BreakTime", 
				"the break time of skill.",
				Ogre::PT_STRING),&msBreakTimeCmd);	  

			dict->addParameter(Ogre::ParameterDef("HitTime", 
				"the hit time of skill.",
				Ogre::PT_STRING),&msHitTimeCmd);	  

			dict->addParameter(Ogre::ParameterDef("ShakeTime", 
				"the shake time of skill.",
				Ogre::PT_STRING),&msShakeTimeCmd);	 

            dict->addParameter(Ogre::ParameterDef("RepeatEffect", 
                "whether recreate effect when the animation is loop.",
                Ogre::PT_BOOL),&msRepeatEffectCmd);	  

			return true;
		}

		return false;
	}
开发者ID:dodong471520,项目名称:pap,代码行数:32,代码来源:FairySkill.cpp

示例7: mSoundName

	AnimationSound::AnimationSound() :	
		mAttachTime(0.0f), mSoundName(""), mSoundHandle(-1), mPlayed(false)
	{
		if (createParamDictionary("AnimationSound"))
		{
			Ogre::ParamDictionary* dict = getParamDictionary();

			dict->addParameter(Ogre::ParameterDef("SoundName", 
				"the file name of sound.",
				Ogre::PT_STRING),&msSoundNameCmd);	

			dict->addParameter(Ogre::ParameterDef("AttachTime", 
				"the time that play sound.",
				Ogre::PT_REAL),&msAttachTimeCmd);			
		}
	}
开发者ID:gitrider,项目名称:wxsj2,代码行数:16,代码来源:FairyAnimationSound.cpp

示例8: getParamDictionary

	DLightEffect::DLightEffect(Ogre::Entity* parent)
	:AttachEffectBase(parent)
	,m_light(nullptr)
	,m_dlType(eDLightType_None)
	,m_fRadius(0)
	,m_dlPointParam(1,0,0)
	{
		m_type = eAttachEffect_DLight;
		if (InitParamDict("DLight"))
		{
			Ogre::ParamDictionary* dict = getParamDictionary();
			dict->addParameter(Ogre::ParameterDef("lighttype", "Deferred light type", Ogre::PT_INT), &m_sCmdLightType);
			dict->addParameter(Ogre::ParameterDef("radius", "Radius of point light", Ogre::PT_REAL), &m_sCmdLightRadius);
			dict->addParameter(Ogre::ParameterDef("PointAtteParam", "Attenuation info of point light", Ogre::PT_VECTOR3), &m_sCmdPointAttenParam);
		}
	}
开发者ID:mavaL,项目名称:MiniCraft,代码行数:16,代码来源:DeferredLightEffect.cpp

示例9: mMaterialName

	MeshElement::MeshElement(const String &type, System *system) :
	EffectElement(type, system),
	mEntity(NULL),
	mMeshName(""), mMaterialName("none")
	{
		if ( initDefaults(mElementType) )
		{
			Ogre::ParamDictionary* dict = getParamDictionary();

        // Custom params      
			dict->addParameter(Ogre::ParameterDef("MeshName", 
            "the name of mesh.",
			Ogre::PT_STRING),&msMeshNameCmd);  

			dict->addParameter(Ogre::ParameterDef("Material", 
			"the name of material.",
			Ogre::PT_STRING),&msMaterialNameCmd);  
		}
	}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:19,代码来源:WXMeshElement.cpp

示例10: BulletOperator

	BulletBirthOperator::BulletBirthOperator(BulletEventSystem* eventSystem) : BulletOperator(),
		m_birthedTimes(0.0f),m_birthTimes(0.0f),m_isOperated(false)
	{
		m_type = "birth";
		m_parent = eventSystem;

		if (createParamDictionary("BulletBirthOperator"))
        {
			Ogre::ParamDictionary* dict = getParamDictionary();
			dict->addParameter(Ogre::ParameterDef("bulletsystemname", 
				"The bulletsystemname of bullet birth operator.",
				Ogre::PT_STRING),&ms_bulletTemplateCmd);	  

			dict->addParameter(Ogre::ParameterDef("birthtimes", 
				"The times of bullet birth operator.",
				Ogre::PT_REAL),&ms_birthTimesCmd);	

		}
	}
开发者ID:dodong471520,项目名称:pap,代码行数:19,代码来源:FairyBulletBirthOperator.cpp

示例11: BulletOperator

BulletHelixOperator::BulletHelixOperator(BulletEventSystem* eventSystem) : BulletOperator()
{
    m_type = "helix";
    m_parent = eventSystem;
    m_amplitude = 0.0;
    m_frequency = 0.0;

    if (createParamDictionary("BulletHelixOperator"))
    {
        Ogre::ParamDictionary* dict = getParamDictionary();

        dict->addParameter(Ogre::ParameterDef("amplitude",
                                              "The amplitude of bullet helix operator.",
                                              Ogre::PT_REAL),&ms_amplitudeCmd);

        dict->addParameter(Ogre::ParameterDef("frequency",
                                              "The frequency of bullet helix operator.",
                                              Ogre::PT_REAL),&ms_frequencyCmd);

    }
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:21,代码来源:FairyBulletHelixOperator.cpp

示例12: BulletTester

	BulletScriptTester::BulletScriptTester(BulletEventSystem* eventSystem) : BulletTester()
	{
		m_type = "script";
		m_parent = eventSystem;
		if (createParamDictionary("BulletScriptTester"))
        { 
			Ogre::ParamDictionary* dict = getParamDictionary();
			dict->addParameter(Ogre::ParameterDef("output", 
				"The output of bullet Tester.",
				Ogre::PT_STRING),&ms_outputCmd);	
		}
	}
开发者ID:dodong471520,项目名称:pap,代码行数:12,代码来源:FairyBulletScriptTester.cpp

示例13: initParamDictionary

    //---------------------------------------------------------------------
	bool AnimationEffectInfo::initParamDictionary(void)
	{
		if (createParamDictionary("AnimationEffectInfo"))
		{
			Ogre::ParamDictionary* dict = getParamDictionary();			

			dict->addParameter(Ogre::ParameterDef("AttachTime", 
				"the time that showing the effect.",
				Ogre::PT_REAL),&msAttachTimeCmd);	  

			dict->addParameter(Ogre::ParameterDef("AttachPoint", 
				"the attached bone or locator.",
				Ogre::PT_STRING),&msAttachPointCmd);	  

			dict->addParameter(Ogre::ParameterDef("EffectTemplateName", 
				"name of effect template.",
				Ogre::PT_STRING),&msEffectTemplateNameCmd);	  

			dict->addParameter(Ogre::ParameterDef("OffsetPos", 
				"offset position to the attach point.",
				Ogre::PT_VECTOR3),&msOffsetPosCmd);	  

			dict->addParameter(Ogre::ParameterDef("OffsetRotation", 
				"offset orientation to the attach point.",
				Ogre::PT_QUATERNION),&msOffsetRotationCmd);	  

			dict->addParameter(Ogre::ParameterDef("Attach", 
				"whether the effect will move along with the attach point.",
				Ogre::PT_BOOL),&msAttachCmd);	  

			return true;
		}

		return false;
	}
开发者ID:gitrider,项目名称:wxsj2,代码行数:36,代码来源:FairyAnimationEffectInfo.cpp

示例14: initParamDictionary

	bool BulletFlowSystem::initParamDictionary(void)
	{
		if (createParamDictionary("BulletFlow"))
		{
			Ogre::ParamDictionary* dict = getParamDictionary();			

			dict->addParameter(Ogre::ParameterDef("maxtime", 
				"bullet flow max time",
				Ogre::PT_REAL),&ms_maxTimeCmd);	  

			return true;
		}

		return false;
	}
开发者ID:gitrider,项目名称:wxsj2,代码行数:15,代码来源:FairyBulletFlowSystem.cpp

示例15: _initDefaults

VBOOL VEffect::_initDefaults()
{
	if (createParamDictionary("Effect"))
	{
		Ogre::ParamDictionary* dict = getParamDictionary();

		dict->addParameter(Ogre::ParameterDef("LifeTime", 
			"the life time of this effect.",
			Ogre::PT_REAL),&msLifeTimeCmd);		

		return VTRUE;
	}

	return VFALSE;
}
开发者ID:asnwerear,项目名称:VEngine,代码行数:15,代码来源:VEffect.cpp


注:本文中的ogre::ParamDictionary::addParameter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。