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


C++ ValueToFloat函数代码示例

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


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

示例1: hx_Vector3_Construct_FltX3

// DECL: Vector3(float x, float y, float z);
value hx_Vector3_Construct_FltX3(value x, value y, value z)
{
    float _x = ValueToFloat(x);
    float _y = ValueToFloat(y);
    float _z = ValueToFloat(z);
    return ObjectToValue(new Vector3(_x, _y, _z));
}
开发者ID:jgranick,项目名称:hx-gameplay,代码行数:8,代码来源:hx_Vector3.cpp

示例2: hx_Vector4_Construct_FltX4

// DECL: Vector4(float x, float y, float z, float w);
value hx_Vector4_Construct_FltX4(value x, value y, value z, value w)
{
    float _x = ValueToFloat(x);
    float _y = ValueToFloat(y);
    float _z = ValueToFloat(z);
    float _w = ValueToFloat(w);
    return ObjectToValue(new Vector4(_x, _y, _z, _w));
}
开发者ID:josephzizys,项目名称:hx-gameplay,代码行数:9,代码来源:hx_Vector4.cpp

示例3: hx_Quaternion_Construct_FltX4

// DECL: Quaternion(float x, float y, float z, float w);
value hx_Quaternion_Construct_FltX4(value x, value y, value z, value w)
{
    float _x = ValueToFloat(x);
    float _y = ValueToFloat(y);
    float _z = ValueToFloat(z);
    float _w = ValueToFloat(w);
    return ObjectToValue(new Quaternion(_x, _y, _z, _w));
}
开发者ID:jgranick,项目名称:hx-gameplay,代码行数:9,代码来源:hx_Quaternion.cpp

示例4: hx_RadioButton_setImageSize

// DECL: void setImageSize(float width, float height);
void hx_RadioButton_setImageSize(value thisObj, value width, value height)
{
    RadioButton *_thisObj;
    float _width = ValueToFloat(width);
    float _height = ValueToFloat(height);
    ValueToObject(thisObj, _thisObj);
    _thisObj->setImageSize(_width, _height);
}
开发者ID:jgranick,项目名称:hx-gameplay,代码行数:9,代码来源:hx_RadioButton.cpp

示例5: hx_Scene_setAmbientColor

// DECL: void setAmbientColor(float red, float green, float blue);
void hx_Scene_setAmbientColor(value thisObj, value red, value green, value blue)
{
    Scene *_thisObj;
    float _red = ValueToFloat(red);
    float _green = ValueToFloat(green);
    float _blue = ValueToFloat(blue);
    ValueToObject(thisObj, _thisObj);
    _thisObj->setAmbientColor(_red, _green, _blue);
}
开发者ID:Amadren,项目名称:hx-gameplay,代码行数:10,代码来源:Scene.cpp

示例6: hx_AudioListener_setPosition_FltX3

// DECL: void setPosition(float x, float y, float z);
void hx_AudioListener_setPosition_FltX3(value thisObj, value x, value y, value z)
{
    AudioListener *_thisObj;
    float _x = ValueToFloat(x);
    float _y = ValueToFloat(y);
    float _z = ValueToFloat(z);
    ValueToObject(thisObj, _thisObj);
    _thisObj->setPosition(_x, _y, _z);
}
开发者ID:jgranick,项目名称:hx-gameplay,代码行数:10,代码来源:hx_AudioListener.cpp

示例7: hx_Transform_setScale_FltX3

// DECL: void setScale(float sx, float sy, float sz);
void hx_Transform_setScale_FltX3(value thisObj, value sx, value sy, value sz)
{
    Transform *_thisObj;
    float _sx = ValueToFloat(sx);
    float _sy = ValueToFloat(sy);
    float _sz = ValueToFloat(sz);
    ValueToObject(thisObj, _thisObj);
    _thisObj->setScale(_sx, _sy, _sz);
}
开发者ID:jgranick,项目名称:hx-gameplay,代码行数:10,代码来源:hx_Transform.cpp

示例8: hx_Ray_setOrigin_FltX3

// DECL: void setOrigin(float x, float y, float z);
void hx_Ray_setOrigin_FltX3(value thisObj, value x, value y, value z)
{
    Ray *_thisObj;
    float _x = ValueToFloat(x);
    float _y = ValueToFloat(y);
    float _z = ValueToFloat(z);
    ValueToObject(thisObj, _thisObj);
    _thisObj->setOrigin(_x, _y, _z);
}
开发者ID:Amadren,项目名称:hx-gameplay,代码行数:10,代码来源:Ray.cpp

示例9: hx_Vector3_set_FltX3

// DECL: void set(float x, float y, float z);
void hx_Vector3_set_FltX3(value thisObj, value x, value y, value z)
{
    Vector3 *_thisObj;
    float _x = ValueToFloat(x);
    float _y = ValueToFloat(y);
    float _z = ValueToFloat(z);
    ValueToObject(thisObj, _thisObj);
    _thisObj->set(_x, _y, _z);
}
开发者ID:jgranick,项目名称:hx-gameplay,代码行数:10,代码来源:hx_Vector3.cpp

示例10: hx_Frustum_intersects_FltX3

// DECL: bool intersects(float x, float y, float z) const;
value hx_Frustum_intersects_FltX3(value thisObj, value x, value y, value z)
{
    Frustum *_thisObj;
    float _x = ValueToFloat(x);
    float _y = ValueToFloat(y);
    float _z = ValueToFloat(z);
    ValueToObject(thisObj, _thisObj);
    return alloc_bool(_thisObj->intersects(_x, _y, _z));
}
开发者ID:jgranick,项目名称:hx-gameplay,代码行数:10,代码来源:hx_Frustum.cpp

示例11: hx_Vector3_smooth

// DECL: void smooth(const Vector3& target, float elapsedTime, float responseTime);
void hx_Vector3_smooth(value thisObj, value target, value elapsedTime, value responseTime)
{
    Vector3 *_thisObj, *_target;
    float _elapsedTime = ValueToFloat(elapsedTime);
    float _responseTime = ValueToFloat(responseTime);
    ValueToObject(thisObj, _thisObj);
    ValueToObject(target, _target);
    _thisObj->smooth(*_target, _elapsedTime, _responseTime);
}
开发者ID:jgranick,项目名称:hx-gameplay,代码行数:10,代码来源:hx_Vector3.cpp

示例12: hx_AudioSource_setVelocity_FltX3

// DECL: void setVelocity(float x, float y, float z);
void hx_AudioSource_setVelocity_FltX3(value thisObj, value x, value y, value z)
{
    AudioSource *_thisObj;
    float _x = ValueToFloat(x);
    float _y = ValueToFloat(y);
    float _z = ValueToFloat(z);
    ValueToObject(thisObj, _thisObj);
    _thisObj->setVelocity(_x, _y, _z);
}
开发者ID:Amadren,项目名称:hx-gameplay,代码行数:10,代码来源:AudioSource.cpp

示例13: hx_Transform_translate_FltX3

// DECL: void translate(float tx, float ty, float tz);
void hx_Transform_translate_FltX3(value thisObj, value tx, value ty, value tz)
{
    Transform *_thisObj;
    float _tx = ValueToFloat(tx);
    float _ty = ValueToFloat(ty);
    float _tz = ValueToFloat(tz);
    ValueToObject(thisObj, _thisObj);
    _thisObj->translate(_tx, _ty, _tz);
}
开发者ID:jgranick,项目名称:hx-gameplay,代码行数:10,代码来源:hx_Transform.cpp

示例14: hx_Transform_translateSmooth

// DECL: void translateSmooth(const Vector3& target, float elapsedTime, float responseTime);
void hx_Transform_translateSmooth(value thisObj, value target, value elapsedTime, value responseTime)
{
    Transform *_thisObj;
    Vector3 *_target;
    float _elapsedTime = ValueToFloat(elapsedTime);
    float _responseTime = ValueToFloat(responseTime);
    ValueToObject(thisObj, _thisObj);
    ValueToObject(target, _target);
    _thisObj->translateSmooth(*_target, _elapsedTime, _responseTime);
}
开发者ID:jgranick,项目名称:hx-gameplay,代码行数:11,代码来源:hx_Transform.cpp

示例15: hx_Transform_setRotation_FltX4

// DECL: void setRotation(float qx, float qy, float qz, float qw);
void hx_Transform_setRotation_FltX4(value thisObj, value qx, value qy, value qz, value qw)
{
    Transform *_thisObj;
    float _qx = ValueToFloat(qx);
    float _qy = ValueToFloat(qy);
    float _qz = ValueToFloat(qz);
    float _qw = ValueToFloat(qw);
    ValueToObject(thisObj, _thisObj);
    _thisObj->setRotation(_qx, _qy, _qz, _qw);
}
开发者ID:jgranick,项目名称:hx-gameplay,代码行数:11,代码来源:hx_Transform.cpp


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