本文整理汇总了C++中ogre::ParamDictionary类的典型用法代码示例。如果您正苦于以下问题:C++ ParamDictionary类的具体用法?C++ ParamDictionary怎么用?C++ ParamDictionary使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ParamDictionary类的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);
}
}
示例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;
}
示例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);
}
}
示例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);
}
}
示例5: 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);
}
}
示例6: 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;
}
示例7: _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;
}
示例8: BulletOperator
BulletForceOperator::BulletForceOperator(BulletEventSystem* eventSystem) : BulletOperator()
{
m_type = "force";
m_parent = eventSystem;
m_isOperated = false;
m_forceVector = Ogre::Vector3::ZERO;
if (createParamDictionary("BulletForceOperator"))
{
Ogre::ParamDictionary* dict = getParamDictionary();
dict->addParameter(Ogre::ParameterDef("forceVector",
"The mode of bullet speed operator.",
Ogre::PT_VECTOR3),&ms_forceVectorCmd);
}
}
示例9: 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);
}
}
示例10: 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);
}
}
示例11: 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;
}
示例12: 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);
}
}
示例13: 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);
}
}
示例14: 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);
}
}
示例15: grow_title
/** Default constructor. */
GrowFadeAffector(Ogre::ParticleSystem *psys) : ParticleAffector(psys)
{
mGrowTime = 0.0f;
mFadeTime = 0.0f;
mType = "GrowFade";
// Init parameters
if(createParamDictionary("GrowFadeAffector"))
{
Ogre::ParamDictionary *dict = getParamDictionary();
Ogre::String grow_title("grow_time");
Ogre::String fade_title("fade_time");
Ogre::String grow_descr("Time from begin to reach full size.");
Ogre::String fade_descr("Time from end to shrink.");
dict->addParameter(Ogre::ParameterDef(grow_title, grow_descr, Ogre::PT_REAL), &msGrowCmd);
dict->addParameter(Ogre::ParameterDef(fade_title, fade_descr, Ogre::PT_REAL), &msFadeCmd);
}
}