本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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));
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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));
}
示例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);
}
示例15: hx_Vector3_scale
void hx_Vector3_scale(value thisObj, value scalar)
{
Vector3 *_thisObj;
float _scalar = ValueToFloat(scalar);
ValueToObject(thisObj, _thisObj);
_thisObj->scale(_scalar);
}