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


C++ ValueToObject函数代码示例

本文整理汇总了C++中ValueToObject函数的典型用法代码示例。如果您正苦于以下问题:C++ ValueToObject函数的具体用法?C++ ValueToObject怎么用?C++ ValueToObject使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: hx_AnimationTarget_destroyAnimation

// DECL: void destroyAnimation(const char* id = NULL);
void hx_AnimationTarget_destroyAnimation(value thisObj, value id)
{
    AnimationTarget *_thisObj;
    const char *_id = ValueToString(id);
    ValueToObject(thisObj, _thisObj);
    _thisObj->destroyAnimation(_id);
}
开发者ID:jgranick,项目名称:hx-gameplay,代码行数:8,代码来源:hx_AnimationTarget.cpp

示例2: hx_Technique_getPass

// DECL: Pass* getPass(const char* id) const;
value hx_Technique_getPass(value thisObj, value id)
{
    Technique *_thisObj;
    const char *_id = ValueToString(id);
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->getPass(_id), true);
}
开发者ID:Amadren,项目名称:hx-gameplay,代码行数:8,代码来源:Technique.cpp

示例3: hx_Technique_getPassByIndex

// DECL: Pass* getPassByIndex(unsigned int index) const;
value hx_Technique_getPassByIndex(value thisObj, value index)
{
    Technique *_thisObj;
    unsigned int _index = ValueToUint(index);
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->getPassByIndex(_index), true);
}
开发者ID:Amadren,项目名称:hx-gameplay,代码行数:8,代码来源:Technique.cpp

示例4: hx_PhysicsCollisionObject_setEnabled

// DECL: void setEnabled(bool enable);
void hx_PhysicsCollisionObject_setEnabled(value thisObj, value enable)
{
    PhysicsCollisionObject *_thisObj;
    bool _enable = val_get_bool(enable);
    ValueToObject(thisObj, _thisObj);
    _thisObj->setEnabled(_enable);
}
开发者ID:Amadren,项目名称:hx-gameplay,代码行数:8,代码来源:PhysicsCollisionObject.cpp

示例5: hx_Quaternion_property_z_set

value hx_Quaternion_property_z_set(value thisObj, value _value)
{
    Quaternion *_thisObj;
    float _flt = ValueToFloat(_value);
    ValueToObject(thisObj, _thisObj);
    return alloc_float(_thisObj->z = _flt);
}
开发者ID:jgranick,项目名称:hx-gameplay,代码行数:7,代码来源:hx_Quaternion.cpp

示例6: hx_Quaternion_Construct_V3_Flt

// DECL: Quaternion(const Vector3& axis, float angle);
value hx_Quaternion_Construct_V3_Flt(value axis, value angle)
{
    Vector3 *_axis;
    float _angle = ValueToFloat(angle);
    ValueToObject(axis, _axis);
    return ObjectToValue(new Quaternion(*_axis, _angle));
}
开发者ID:jgranick,项目名称:hx-gameplay,代码行数:8,代码来源:hx_Quaternion.cpp

示例7: hx_AnimationTarget_getAnimation

// DECL: Animation* getAnimation(const char* id = NULL) const;
value hx_AnimationTarget_getAnimation(value thisObj, value id)
{
    AnimationTarget *_thisObj;
    const char *_id = ValueToString(id);
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->getAnimation(_id), true, true);
}
开发者ID:jgranick,项目名称:hx-gameplay,代码行数:8,代码来源:hx_AnimationTarget.cpp

示例8: hx_RenderState_getParameter

// DECL: MaterialParameter* getParameter(const char* name) const;
value hx_RenderState_getParameter(value thisObj, value name)
{
    RenderState *_thisObj;
    const char *_name = ValueToString(name);
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->getParameter(_name), true, true);
}
开发者ID:jgranick,项目名称:hx-gameplay,代码行数:8,代码来源:hx_RenderState.cpp

示例9: hx_AudioListener_setGain

// DECL: void setGain(float gain);
void hx_AudioListener_setGain(value thisObj, value gain)
{
    AudioListener *_thisObj;
    float _gain = ValueToFloat(gain);
    ValueToObject(thisObj, _thisObj);
    _thisObj->setGain(_gain);
}
开发者ID:jgranick,项目名称:hx-gameplay,代码行数:8,代码来源:hx_AudioListener.cpp

示例10: hx_AudioSource_setPitch

// DECL: void setPitch(float pitch);
void hx_AudioSource_setPitch(value thisObj, value pitch)
{
    AudioSource *_thisObj;
    float _pitch = ValueToFloat(pitch);
    ValueToObject(thisObj, _thisObj);
    _thisObj->setPitch(_pitch);
}
开发者ID:Amadren,项目名称:hx-gameplay,代码行数:8,代码来源:AudioSource.cpp

示例11: hx_AudioSource_setLooped

// DECL: void setLooped(bool looped);
void hx_AudioSource_setLooped(value thisObj, value looped)
{
    AudioSource *_thisObj;
    bool _looped = val_get_bool(looped);
    ValueToObject(thisObj, _thisObj);
    _thisObj->setLooped(_looped);
}
开发者ID:Amadren,项目名称:hx-gameplay,代码行数:8,代码来源:AudioSource.cpp

示例12: hx_AudioSource_setGain

// DECL: void setGain(float gain);
void hx_AudioSource_setGain(value thisObj, value gain)
{
    AudioSource *_thisObj;
    float _gain = ValueToFloat(gain);
    ValueToObject(thisObj, _thisObj);
    _thisObj->setGain(_gain);
}
开发者ID:Amadren,项目名称:hx-gameplay,代码行数:8,代码来源:AudioSource.cpp

示例13: hx_AnimationTarget_createAnimation_Str_IntX2_DatX4_Int

// DECL: Animation* createAnimation(const char* id, int propertyId, unsigned int keyCount, unsigned int* keyTimes, float* keyValues, float* keyInValue, float* keyOutValue, Curve::InterpolationType type);
value hx_AnimationTarget_createAnimation_Str_IntX2_DatX4_Int(value *args, int nargs)
{
    const value& thisObj = *args++;
    const value& id = *args++;
    const value& propertyId = *args++;
    const value& keyCount = *args++;
    const value& keyTimes = *args++;
    const value& keyValues = *args++;
    const value& keyInValue = *args++;
    const value& keyOutValue = *args++;
    const value& type = *args;

    AnimationTarget *_thisObj;
    const char *_id = ValueToString(id);
    int _propertyId = val_get_int(propertyId);
    unsigned int _keyCount = ValueToUint(keyCount);
    unsigned int *_keyTimes;
    float *_keyValues;
    float *_keyInValue;
    float *_keyOutValue;
    Curve::InterpolationType _type;
    ValueToObject(thisObj, _thisObj);
    ValueToBuffer(keyTimes, _keyTimes);
    ValueToBuffer(keyValues, _keyValues);
    ValueToBuffer(keyInValue, _keyInValue);
    ValueToBuffer(keyOutValue, _keyOutValue);
    ValueToEnum(type, _type);
    return ReferenceToValue(_thisObj->createAnimation(_id, _propertyId, _keyCount, _keyTimes, _keyValues, _keyInValue, _keyOutValue, _type));
}
开发者ID:jgranick,项目名称:hx-gameplay,代码行数:30,代码来源:hx_AnimationTarget.cpp

示例14: hx_AIStateMachine_setState_Str

// DECL: AIState* setState(const char* id);
value hx_AIStateMachine_setState_Str(value thisObj, value id)
{
    AIStateMachine *_thisObj;
    const char *_id = ValueToString(id);
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->setState(_id), true);
}
开发者ID:Amadren,项目名称:hx-gameplay,代码行数:8,代码来源:AIStateMachine.cpp

示例15: hx_Vector3_scale

void hx_Vector3_scale(value thisObj, value scalar)
{
    Vector3 *_thisObj;
    float _scalar = ValueToFloat(scalar);
    ValueToObject(thisObj, _thisObj);
    _thisObj->scale(_scalar);
}
开发者ID:jgranick,项目名称:hx-gameplay,代码行数:7,代码来源:hx_Vector3.cpp


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