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


C++ duk_require_number函数代码示例

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


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

示例1: Terrain_GetTerrainHeightRange_float_float

static duk_ret_t Terrain_GetTerrainHeightRange_float_float(duk_context* ctx)
{
    Terrain* thisObj = GetThisWeakObject<Terrain>(ctx);
    float minHeight = (float)duk_require_number(ctx, 0);
    float maxHeight = (float)duk_require_number(ctx, 1);
    thisObj->GetTerrainHeightRange(minHeight, maxHeight);
    return 0;
}
开发者ID:realXtend,项目名称:tundra-urho3d,代码行数:8,代码来源:TerrainBindings.cpp

示例2: Line_ProjectToAxis_float3_float_float

static duk_ret_t Line_ProjectToAxis_float3_float_float(duk_context* ctx)
{
    Line* thisObj = GetThisValueObject<Line>(ctx, Line_ID);
    float3& direction = *GetCheckedValueObject<float3>(ctx, 0, float3_ID);
    float outMin = (float)duk_require_number(ctx, 1);
    float outMax = (float)duk_require_number(ctx, 2);
    thisObj->ProjectToAxis(direction, outMin, outMax);
    return 0;
}
开发者ID:realXtend,项目名称:tundra-urho3d,代码行数:9,代码来源:LineBindings.cpp

示例3: Terrain_PatchExists_uint_uint

static duk_ret_t Terrain_PatchExists_uint_uint(duk_context* ctx)
{
    Terrain* thisObj = GetThisWeakObject<Terrain>(ctx);
    uint patchX = (uint)duk_require_number(ctx, 0);
    uint patchY = (uint)duk_require_number(ctx, 1);
    bool ret = thisObj->PatchExists(patchX, patchY);
    duk_push_boolean(ctx, ret);
    return 1;
}
开发者ID:realXtend,项目名称:tundra-urho3d,代码行数:9,代码来源:TerrainBindings.cpp

示例4: Terrain_GetPoint_uint_uint

static duk_ret_t Terrain_GetPoint_uint_uint(duk_context* ctx)
{
    Terrain* thisObj = GetThisWeakObject<Terrain>(ctx);
    uint x = (uint)duk_require_number(ctx, 0);
    uint y = (uint)duk_require_number(ctx, 1);
    float ret = thisObj->GetPoint(x, y);
    duk_push_number(ctx, ret);
    return 1;
}
开发者ID:realXtend,项目名称:tundra-urho3d,代码行数:9,代码来源:TerrainBindings.cpp

示例5: Terrain_SetPointHeight_uint_uint_float

static duk_ret_t Terrain_SetPointHeight_uint_uint_float(duk_context* ctx)
{
    Terrain* thisObj = GetThisWeakObject<Terrain>(ctx);
    uint x = (uint)duk_require_number(ctx, 0);
    uint y = (uint)duk_require_number(ctx, 1);
    float height = (float)duk_require_number(ctx, 2);
    thisObj->SetPointHeight(x, y, height);
    return 0;
}
开发者ID:realXtend,项目名称:tundra-urho3d,代码行数:9,代码来源:TerrainBindings.cpp

示例6: Terrain_MakePatchFlat_uint_uint_float

static duk_ret_t Terrain_MakePatchFlat_uint_uint_float(duk_context* ctx)
{
    Terrain* thisObj = GetThisWeakObject<Terrain>(ctx);
    uint patchX = (uint)duk_require_number(ctx, 0);
    uint patchY = (uint)duk_require_number(ctx, 1);
    float heightValue = (float)duk_require_number(ctx, 2);
    thisObj->MakePatchFlat(patchX, patchY, heightValue);
    return 0;
}
开发者ID:realXtend,项目名称:tundra-urho3d,代码行数:9,代码来源:TerrainBindings.cpp

示例7: Line_ToLineSegment_float_float

static duk_ret_t Line_ToLineSegment_float_float(duk_context* ctx)
{
    Line* thisObj = GetThisValueObject<Line>(ctx, Line_ID);
    float dStart = (float)duk_require_number(ctx, 0);
    float dEnd = (float)duk_require_number(ctx, 1);
    LineSegment ret = thisObj->ToLineSegment(dStart, dEnd);
    PushValueObjectCopy<LineSegment>(ctx, ret, LineSegment_ID, LineSegment_Finalizer);
    return 1;
}
开发者ID:realXtend,项目名称:tundra-urho3d,代码行数:9,代码来源:LineBindings.cpp

示例8: Line_Distance_LineSegment_float_float

static duk_ret_t Line_Distance_LineSegment_float_float(duk_context* ctx)
{
    Line* thisObj = GetThisValueObject<Line>(ctx, Line_ID);
    LineSegment& other = *GetCheckedValueObject<LineSegment>(ctx, 0, LineSegment_ID);
    float d = (float)duk_require_number(ctx, 1);
    float d2 = (float)duk_require_number(ctx, 2);
    float ret = thisObj->Distance(other, d, d2);
    duk_push_number(ctx, ret);
    return 1;
}
开发者ID:realXtend,项目名称:tundra-urho3d,代码行数:10,代码来源:LineBindings.cpp

示例9: Line_ClosestPoint_LineSegment_float_float

static duk_ret_t Line_ClosestPoint_LineSegment_float_float(duk_context* ctx)
{
    Line* thisObj = GetThisValueObject<Line>(ctx, Line_ID);
    LineSegment& other = *GetCheckedValueObject<LineSegment>(ctx, 0, LineSegment_ID);
    float d = (float)duk_require_number(ctx, 1);
    float d2 = (float)duk_require_number(ctx, 2);
    float3 ret = thisObj->ClosestPoint(other, d, d2);
    PushValueObjectCopy<float3>(ctx, ret, float3_ID, float3_Finalizer);
    return 1;
}
开发者ID:realXtend,项目名称:tundra-urho3d,代码行数:10,代码来源:LineBindings.cpp

示例10: Terrain_LoadFromImageFile_String_float_float

static duk_ret_t Terrain_LoadFromImageFile_String_float_float(duk_context* ctx)
{
    Terrain* thisObj = GetThisWeakObject<Terrain>(ctx);
    String filename = duk_require_string(ctx, 0);
    float offset = (float)duk_require_number(ctx, 1);
    float scale = (float)duk_require_number(ctx, 2);
    bool ret = thisObj->LoadFromImageFile(filename, offset, scale);
    duk_push_boolean(ctx, ret);
    return 1;
}
开发者ID:realXtend,项目名称:tundra-urho3d,代码行数:10,代码来源:TerrainBindings.cpp

示例11: Line_Intersects_OBB_float_float

static duk_ret_t Line_Intersects_OBB_float_float(duk_context* ctx)
{
    Line* thisObj = GetThisValueObject<Line>(ctx, Line_ID);
    OBB& obb = *GetCheckedValueObject<OBB>(ctx, 0, OBB_ID);
    float dNear = (float)duk_require_number(ctx, 1);
    float dFar = (float)duk_require_number(ctx, 2);
    bool ret = thisObj->Intersects(obb, dNear, dFar);
    duk_push_boolean(ctx, ret);
    return 1;
}
开发者ID:realXtend,项目名称:tundra-urho3d,代码行数:10,代码来源:LineBindings.cpp

示例12: Line_ClosestPointLineLine_Static_float3_float3_float3_float3_float_float

static duk_ret_t Line_ClosestPointLineLine_Static_float3_float3_float3_float3_float_float(duk_context* ctx)
{
    float3& start0 = *GetCheckedValueObject<float3>(ctx, 0, float3_ID);
    float3& dir0 = *GetCheckedValueObject<float3>(ctx, 1, float3_ID);
    float3& start1 = *GetCheckedValueObject<float3>(ctx, 2, float3_ID);
    float3& dir1 = *GetCheckedValueObject<float3>(ctx, 3, float3_ID);
    float d = (float)duk_require_number(ctx, 4);
    float d2 = (float)duk_require_number(ctx, 5);
    Line::ClosestPointLineLine(start0, dir0, start1, dir1, d, d2);
    return 0;
}
开发者ID:realXtend,项目名称:tundra-urho3d,代码行数:11,代码来源:LineBindings.cpp

示例13: Terrain_Resize_uint_uint_uint_uint

static duk_ret_t Terrain_Resize_uint_uint_uint_uint(duk_context* ctx)
{
    int numArgs = duk_get_top(ctx);
    Terrain* thisObj = GetThisWeakObject<Terrain>(ctx);
    uint newWidth = (uint)duk_require_number(ctx, 0);
    uint newHeight = (uint)duk_require_number(ctx, 1);
    uint oldPatchStartX = numArgs > 2 ? (uint)duk_require_number(ctx, 2) : 0;
    uint oldPatchStartY = numArgs > 3 ? (uint)duk_require_number(ctx, 3) : 0;
    thisObj->Resize(newWidth, newHeight, oldPatchStartX, oldPatchStartY);
    return 0;
}
开发者ID:realXtend,项目名称:tundra-urho3d,代码行数:11,代码来源:TerrainBindings.cpp

示例14: SignalWrapper_RigidBody_NewPhysicsCollision_Emit

static duk_ret_t SignalWrapper_RigidBody_NewPhysicsCollision_Emit(duk_context* ctx)
{
    SignalWrapper_RigidBody_NewPhysicsCollision* wrapper = GetThisValueObject<SignalWrapper_RigidBody_NewPhysicsCollision>(ctx, SignalWrapper_RigidBody_NewPhysicsCollision_ID);
    if (!wrapper->owner_) return 0;
    Entity* param0 = GetWeakObject<Entity>(ctx, 0);
    float3& param1 = *GetCheckedValueObject<float3>(ctx, 1, float3_ID);
    float3& param2 = *GetCheckedValueObject<float3>(ctx, 2, float3_ID);
    float param3 = (float)duk_require_number(ctx, 3);
    float param4 = (float)duk_require_number(ctx, 4);
    wrapper->signal_->Emit(param0, param1, param2, param3, param4);
    return 0;
}
开发者ID:realXtend,项目名称:tundra-urho3d,代码行数:12,代码来源:RigidBodyBindings.cpp

示例15: js_getentint

int js_getentint(duk_context* c) {
	int index = duk_require_number(c,-1);
	int offset = duk_require_number(c,-2);
	ENTITY* ent = game->getEntity(index);
	if(ent) {
		int value;
		ent->get(offset, &value, sizeof(value));
		duk_push_int(c,value);
	} else {
		duk_push_int(c,0);
	}
	return 1;
}
开发者ID:AnasBunny,项目名称:CoDExtended,代码行数:13,代码来源:js.cpp


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