• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ Int32函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Inherited

StageDataBase::StageDataBase(void) :
    Inherited(),
    _sfPartitionRangeBegin    (Int32(-1)),
    _sfPartitionRangeEnd      (Int32(-1)),
    _sfGroupMode              (Int32(0))
{
}
开发者ID:baibaiwei,项目名称:OpenSGDevMaster,代码行数:7,代码来源:OSGStageDataBase.cpp


示例2: returnValue

Vec2f CSMNativeWindow::translateToScreenCoordinatesAbs(Real32 rX,
                                                       Real32 rY)
{
    Vec2f returnValue(0, 0);

    X11Window qChild = 0;

    Int32    qW     = 0;
    Int32    qH     = 0;

    XTranslateCoordinates( _pDisplay, 
                           _pXWindow->getWindow(), 
                           _pRootWindow, 
                          
                            Int32(rX), 
                            Int32(rY), 
                          
                          & qW, 
                          & qH, 
                          
                          & qChild);

    returnValue.setValues(qW, qH);

    return returnValue;
}
开发者ID:jondo2010,项目名称:OpenSG,代码行数:26,代码来源:OSGCSMNativeWindow.cpp


示例3: Int32

hsIntRect *hsRect::Truncate(hsIntRect* r) const
{
	r->fLeft		= Int32(fLeft);
	r->fTop		= Int32(fTop);
	r->fRight		= Int32(fRight);
	r->fBottom	= Int32(fBottom);
	return r;
}
开发者ID:fatman2021,项目名称:myforthprocessor,代码行数:8,代码来源:hsRectangle.cpp


示例4: rand

		void MinusLife::onApply(Player& player, World& world, Int32 duration) const
		{
			Int32 hit = (Int32(D6_MAX_LIFE) / 7) + rand() % (Int32(D6_MAX_LIFE) / 2);
			if (player.hit(Float32(hit)))
			{
				player.playSound(PlayerSounds::Type::WasKilled);
			}
			world.getMessageQueue().add(player, Format("Life -{0}") << hit);
		}
开发者ID:martin-macak,项目名称:duel6r,代码行数:9,代码来源:MinusLife.cpp


示例5: Inherited

PostShaderStageDataBase::PostShaderStageDataBase(void) :
    Inherited(),
    _mfShaderMaterials        (),
    _sfWidth                  (Int32(0)),
    _sfHeight                 (Int32(0)),
    _mfRenderTargets          (),
    _sfCamera                 (NULL)
{
}
开发者ID:marcusl,项目名称:OpenSG,代码行数:9,代码来源:OSGPostShaderStageDataBase.cpp


示例6: Inherited

TextureImageChunkBase::TextureImageChunkBase(void) :
    Inherited(),
    _sfTexture                (NULL),
    _sfLevel                  (Int32(0)),
    _sfLayer                  (Int32(-1)),
    _sfAccess                 (GLenum(GL_READ_ONLY)),
    _sfFormat                 (GLenum(GL_NONE))
{
}
开发者ID:vossg,项目名称:OpenSGDevMaster,代码行数:9,代码来源:OSGTextureImageChunkBase.cpp


示例7: Inherited

FogStageDataBase::FogStageDataBase(void) :
    Inherited(),
    _sfFogMaterial            (NULL),
    _sfWidth                  (Int32(0)),
    _sfHeight                 (Int32(0)),
    _sfRenderTarget           (NULL),
    _sfCamera                 (NULL)
{
}
开发者ID:Himbeertoni,项目名称:OpenSGDevMaster,代码行数:9,代码来源:OSGFogStageDataBase.cpp


示例8: VAL_SERIES

*/	REBINT PD_String(REBPVS *pvs)
/*
***********************************************************************/
{
	REBVAL *data = pvs->value;
	REBVAL *val = pvs->setval;
	REBINT n = 0;
	REBCNT i;
	REBINT c;
	REBSER *ser = VAL_SERIES(data);

	if (IS_INTEGER(pvs->select)) {
		n = Int32(pvs->select) + VAL_INDEX(data) - 1;
	}
	else return PE_BAD_SELECT;

	if (val == 0) {
		if (n < 0 || (REBCNT)n >= SERIES_TAIL(ser)) return PE_NONE;
		if (IS_BINARY(data)) {
			SET_INTEGER(pvs->store, *BIN_SKIP(ser, n));
		} else {
			SET_CHAR(pvs->store, GET_ANY_CHAR(ser, n));
		}
		return PE_USE;
	}

	if (n < 0 || (REBCNT)n >= SERIES_TAIL(ser)) return PE_BAD_RANGE;

	if (IS_CHAR(val)) {
		c = VAL_CHAR(val);
		if (c > MAX_CHAR) return PE_BAD_SET;
	}
	else if (IS_INTEGER(val)) {
		c = Int32(val);
		if (c > MAX_CHAR || c < 0) return PE_BAD_SET;
		if (IS_BINARY(data)) { // special case for binary
			if (c > 0xff) Trap_Range(val);
			BIN_HEAD(ser)[n] = (REBYTE)c;
			return PE_OK;
		}
	}
	else if (ANY_BINSTR(val)) {
		i = VAL_INDEX(val);
		if (i >= VAL_TAIL(val)) return PE_BAD_SET;
		c = GET_ANY_CHAR(VAL_SERIES(val), i);
	}
	else
		return PE_BAD_SELECT;

	TRAP_PROTECT(ser);

	if (BYTE_SIZE(ser) && c > 0xff) Widen_String(ser);
	SET_ANY_CHAR(ser, n, c);

	return PE_OK;
}
开发者ID:RamchandraApte,项目名称:rebol,代码行数:56,代码来源:t-string.c


示例9: Inherited

ShadowMapEngineBase::ShadowMapEngineBase(void) :
    Inherited(),
    _sfShadowTexChunk         (NULL),
    _sfWidth                  (Int32(512)),
    _sfHeight                 (Int32(512)),
    _sfOffsetBias             (Real32(4.f)),
    _sfOffsetFactor           (Real32(10.f)),
    _sfShadowTravMask         (UInt32(TypeTraits<UInt32>::BitsSet))
{
}
开发者ID:marcusl,项目名称:OpenSG,代码行数:10,代码来源:OSGShadowMapEngineBase.cpp


示例10: Inherited

DisplayFilterGroupBase::DisplayFilterGroupBase(void) :
    Inherited(),
    _sfCalibrationPatternFilter(NULL),
    _sfResolutionFilter       (NULL),
    _sfColorFilter            (NULL),
    _sfDistortionFilter       (NULL),
    _sfDrawerId               (Int32(-1)),
    _sfDrawableId             (Int32(-1))
{
}
开发者ID:Himbeertoni,项目名称:OpenSGDevMaster,代码行数:10,代码来源:OSGDisplayFilterGroupBase.cpp


示例11: Inherited

MultiDisplayWindowBase::MultiDisplayWindowBase(void) :
    Inherited(),
    _sfHServers               (),
    _sfVServers               (),
    _sfManageClientViewports  (bool(true)),
    _sfXOverlap               (Int32(0)),
    _sfYOverlap               (Int32(0)),
    _sfMaxDepth               (Int32(999))
{
}
开发者ID:DaveHarrison,项目名称:OpenSGDevMaster,代码行数:10,代码来源:OSGMultiDisplayWindowBase.cpp


示例12: Int32

Int32 FBOViewport::getPixelBottom(void) const
{
    if(getBottom() > 1)
        return Int32(getBottom());
    
    if(getFrameBufferObject() == NULL)
        return Int32(getBottom());

    return Int32(getFrameBufferObject()->getHeight() * getBottom());
}
开发者ID:DaveHarrison,项目名称:OpenSGDevMaster,代码行数:10,代码来源:OSGFBOViewport.cpp


示例13: verifySignature

//////////////////////////////////////////////////////////////////////////////
// STATIC
void
verifySignature(std::streambuf & istrm, UInt8 validSig)
{
	UInt8 val;
	read(istrm, val);
	if (val != validSig)
	{
		BLOCXX_THROW(BadSignatureException,
			Format("Received invalid signature. Got: %1 Expected: %2", Int32(val),
				Int32(validSig)).c_str());
	}
}
开发者ID:camsoupa,项目名称:redneckracer,代码行数:14,代码来源:BinarySerialization.cpp


示例14: Inherited

StencilChunkBase::StencilChunkBase(void) :
    Inherited(),
    _sfStencilFunc            (GLenum(GL_NONE)),
    _sfStencilValue           (Int32(0)),
    _sfStencilMask            (UInt32(0x1)),
    _sfStencilOpFail          (GLenum(GL_KEEP)),
    _sfStencilOpZFail         (GLenum(GL_KEEP)),
    _sfStencilOpZPass         (GLenum(GL_KEEP)),
    _sfClearBuffer            (Int32(0)),
    _sfBitMask                (UInt32(0xFFFFFFFF))
{
}
开发者ID:Himbeertoni,项目名称:OpenSGDevMaster,代码行数:12,代码来源:OSGStencilChunkBase.cpp


示例15: getQuadtreeDepth

Int32 getQuadtreeDepth(Int32 iSamplesX, Int32 iSamplesY, Int32 iTileSize)
{
#ifdef WIN32
    return Int32(log(Real32(getQuadtreeLeafNodeCount(iSamplesX, 
                                                     iSamplesY, 
                                                     iTileSize)))/log(2.f) +
                 1.f);
#else
    return Int32(log2(Real32(getQuadtreeLeafNodeCount(iSamplesX, 
                                                      iSamplesY, 
                                                      iTileSize))) + 1.f);
#endif
}
开发者ID:chengzg,项目名称:OSGAddOnsGV,代码行数:13,代码来源:OSGBbqNode.cpp


示例16: Int32

void DrawEnv::calcViewportDimension(Real32 rLeft,
                                    Real32 rBottom,
                                    Real32 rRight,
                                    Real32 rTop,
                                    
                                    UInt16 iTargetWidth,
                                    UInt16 iTargetHeight)
{
    if(rLeft > 1.f)
        _iPixelLeft = Int32(rLeft);
    else
        _iPixelLeft = Int32(iTargetWidth * rLeft);

    if(rRight > 1.f)
        _iPixelRight = Int32(rRight);
    else
        _iPixelRight = Int32(iTargetWidth * rRight) - 1;


    if(rBottom > 1.f)
        _iPixelBottom = Int32(rBottom);
    else
        _iPixelBottom = Int32(iTargetHeight * rBottom);

    if(rTop > 1.f)
        _iPixelTop = Int32(rTop);
    else
        _iPixelTop = Int32(iTargetHeight * rTop) - 1;


    _bFull = ( (_iPixelLeft   == 0                ) &&
               (_iPixelRight  == iTargetWidth  - 1) &&
               (_iPixelBottom == 0                ) &&
               (_iPixelTop    == iTargetHeight - 1)  );
}
开发者ID:Himbeertoni,项目名称:OpenSGDevMaster,代码行数:35,代码来源:OSGDrawEnv.cpp


示例17: Int32

Int32 StagedViewport::getPixelBottom(void) const
{
    if(!getFrameBufferObject())
    {   // => behave like normal viewport
        return Viewport::calcPixelBottom();
    }
    else
    {   // => behave like FBOViewport
        if(getBottom() > 1)
            return Int32(getBottom());

        return Int32(getFrameBufferObject()->getHeight() * getBottom());
    }
}
开发者ID:vossg,项目名称:VCoRE,代码行数:14,代码来源:OSGStagedViewport.cpp


示例18: getImage

void GrabForeground::draw(DrawEnv *, Viewport *port)
{
    if(getActive() == false)
        return;
    
    Image *i = getImage();
    
    if(i == NULL)       // No image, no grab.
        return;

    Int32 w = osgMax(2, port->getPixelWidth ());
    Int32 h = osgMax(2, port->getPixelHeight());

    // If image is smaller than 2x2, resize it to vp size
    // the 2x2 is because you can't create 0x0 images
    // If autoResize then update img size if vp changed

    if( (i->getWidth() <= 1 || i->getHeight() <= 1) ||
         (getAutoResize() && (w != i->getWidth() || h != i->getHeight())) )
    {
        i->set(i->getPixelFormat(),
               w, 
               h);
    }
    
    bool storeChanged = false;    

    if ( !getAutoResize() )
    {
        w = osgMin(Int32(i->getWidth ()), port->getPixelWidth());
        h = osgMin(Int32(i->getHeight()), port->getPixelHeight());
        
        if(Int32(i->getWidth()) != port->getPixelWidth())
        {
            glPixelStorei(GL_PACK_ROW_LENGTH, i->getWidth());
            storeChanged = true;
        }
    }
    
    glReadPixels(port->getPixelLeft(), 
                 port->getPixelBottom(), 
                 w, 
                 h, 
                 i->getPixelFormat(),
                 i->getDataType(), 
                 i->editData());

    if(storeChanged)
        glPixelStorei(GL_PACK_ROW_LENGTH, 0);
}
开发者ID:DaveHarrison,项目名称:OpenSGDevMaster,代码行数:50,代码来源:OSGGrabForeground.cpp


示例19: WPN_ShotWallCollision

	static Hit WPN_ShotWallCollision(Shot& shot, const Level& level)
	{
		const Rectangle box = shot.getCollisionRect();
		Int32 up = Int32(box.right.y);
		Int32 down = Int32(box.left.y);
		Int32 left = Int32(box.left.x);
		Int32 right = Int32(box.right.x);

		bool hitsWall = level.isWall(left, up, true) ||
			level.isWall(left, down, true) ||
			level.isWall(right, up, true) ||
			level.isWall(right, down, true);

		return { hitsWall, nullptr };
	}
开发者ID:marcellus-trixus,项目名称:duel6r,代码行数:15,代码来源:Weapon.cpp


示例20: _sfAutoDisableLinearThreshold

PhysicsWorldBase::PhysicsWorldBase(void) :
    _sfErp                    (Real32(0.2)), 
    _sfGravity                (), 
    _sfCfm                    (), 
    _sfAutoDisableFlag        (), 
    _sfAutoDisableLinearThreshold(Real32(0.01)), 
    _sfAutoDisableAngularThreshold(Real32(0.01)), 
    _sfAutoDisableSteps       (Int32(10)), 
    _sfAutoDisableTime        (Real32(0)), 
    _sfWorldQuickStepNumIterations(Int32(20)), 
    _sfWorldContactMaxCorrectingVel(), 
    _sfWorldContactSurfaceLayer(Real32(0)), 
    Inherited() 
{
}
开发者ID:mlimper,项目名称:OpenSG1x,代码行数:15,代码来源:OSGPhysicsWorldBase.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ Int32_val函数代码示例发布时间:2022-05-30
下一篇:
C++ Int3函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap