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


C++ IView类代码示例

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


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

示例1: GetDecor

AutoPtr<IArrayMap> EnterTransitionCoordinator::MapNamedElements( //ArrayMap<String, View>
    /* [in] */ IArrayList* accepted,    //<String>
    /* [in] */ IArrayList* localNames)  //<String>
{
    AutoPtr<IArrayMap> sharedElements;
    CArrayMap::New((IArrayMap**)&sharedElements);
    AutoPtr<IViewGroup> vg;
    GetDecor((IViewGroup**)&vg);
    IView* decorView = IView::Probe(vg);
    if (decorView != NULL) {
        decorView->FindNamedViews(IMap::Probe(sharedElements));
    }
    if (accepted != NULL) {
        Int32 size;
        localNames->GetSize(&size);
        for (Int32 i = 0; i < size; i++) {
            AutoPtr<IInterface> localNameObj, acceptedObj;
            localNames->Get(i, (IInterface**)&localNameObj);
            accepted->Get(i, (IInterface**)&acceptedObj);

            if (localNameObj != NULL && !Object::Equals(localNameObj, acceptedObj)) {
                AutoPtr<IInterface> viewObj;
                sharedElements->Remove(localNameObj, (IInterface**)&viewObj);
                if (viewObj != NULL) {
                    sharedElements->Put(acceptedObj, viewObj);
                }
            }
        }
    }
    return sharedElements;
}
开发者ID:elastos,项目名称:Elastos5,代码行数:31,代码来源:EnterTransitionCoordinator.cpp

示例2: ViewInstancesReady

ECode EnterTransitionCoordinator::ViewInstancesReady(
    /* [in] */ IArrayList* accepted,    //ArrayList<String>
    /* [in] */ IArrayList* localNames,  //ArrayList<String>
    /* [in] */ IArrayList* localViews)  //ArrayList<View>
{
    Boolean remap = FALSE;
    Int32 size;
    localViews->GetSize(&size);
    Boolean attached;
    String transitionNmae;
    for (Int32 i = 0; i < size; i++) {
        AutoPtr<IInterface> obj, localNameObj;
        localViews->Get(i, (IInterface**)&obj);
        IView* view = IView::Probe(obj);
        view->GetTransitionName(&transitionNmae);
        localNames->Get(i, (IInterface**)&localNameObj);
        if (!TextUtils::Equals(transitionNmae, Object::ToString(localNameObj))
                || (view->IsAttachedToWindow(&attached), !attached)) {
            remap = TRUE;
            break;
        }
    }
    if (remap) {
        return TriggerViewsReady(MapNamedElements(accepted, localNames));
    }
    else {
        return TriggerViewsReady(MapSharedElements(accepted, localViews));
    }
}
开发者ID:elastos,项目名称:Elastos5,代码行数:29,代码来源:EnterTransitionCoordinator.cpp

示例3: ViewsReady

ECode EnterTransitionCoordinator::TriggerViewsReady(
    /* [in] */ IArrayMap* sharedElements) //ArrayMap<String, View>
{
    if (mAreViewsReady) {
        return NOERROR;
    }

    mAreViewsReady = TRUE;
    // Ensure the views have been laid out before capturing the views -- we need the epicenter.
    Boolean isEmpty;
    sharedElements->IsEmpty(&isEmpty);
    if (isEmpty) {
        ViewsReady(sharedElements);
        return NOERROR;
    }

    AutoPtr<IInterface> obj;
    sharedElements->Get(0, (IInterface**)&obj);
    IView* sharedElement = IView::Probe(obj);
    Boolean requested;
    sharedElement->IsLayoutRequested(&requested);

    if (!requested) {
        ViewsReady(sharedElements);
    }
    else {
        AutoPtr<IOnPreDrawListener> listener = new SharedElementOnPreDrawListener(
            this, sharedElements, sharedElement);
        AutoPtr<IViewTreeObserver> vto;
        sharedElement->GetViewTreeObserver((IViewTreeObserver**)&vto);
        vto->AddOnPreDrawListener(listener);
    }

    return NOERROR;
}
开发者ID:elastos,项目名称:Elastos5,代码行数:35,代码来源:EnterTransitionCoordinator.cpp

示例4: CamShake

//---------------------------------
void CScreenEffects::CamShake(Vec3 rotateShake, Vec3 shiftShake, float freq, float shakeTime, float randomness, int shakeID)
{
	if (g_pGameCVars && g_pGameCVars->g_detachCamera==0)
	{
		IViewSystem *pViewSystem = g_pGame->GetIGameFramework()->GetIViewSystem();
		if (pViewSystem)
		{
			IView *pView = pViewSystem->GetActiveView();
			if (pView)
			{
				const bool bClientActorView = pViewSystem->IsClientActorViewActive();;
				if (gEnv->pFlashUI)
				{
					gEnv->pFlashUI->SetHudElementsVisible(bClientActorView);
				}

				if (bClientActorView && shakeID == eCS_GID_Player)
				{
					CCCPOINT(Camera_DoShake);
					pView->SetViewShake(Ang3(rotateShake), shiftShake, shakeTime, freq, randomness, shakeID, false);
				}
			}
		}
	}
}
开发者ID:amrhead,项目名称:eaascode,代码行数:26,代码来源:ScreenEffects.cpp

示例5: FAIL_RETURN

ECode EnterTransitionCoordinator::constructor(
    /* [in] */ IActivity* activity,
    /* [in] */ IResultReceiver* resultReceiver,
    /* [in] */ IArrayList* sharedElementNames,
    /* [in] */ Boolean isReturning)
{
    AutoPtr<IWindow> window;
    activity->GetWindow((IWindow**)&window);

    FAIL_RETURN(ActivityTransitionCoordinator::constructor(
        window, sharedElementNames, GetListener(activity, isReturning), isReturning))
    mActivity = activity;
    SetResultReceiver(resultReceiver);
    PrepareEnter();
    AutoPtr<IBundle> resultReceiverBundle;
    CBundle::New((IBundle**)&resultReceiverBundle);
    resultReceiverBundle->PutParcelable(
        ActivityTransitionCoordinator::KEY_REMOTE_RECEIVER, this);

    mResultReceiver->Send(
        IActivityTransitionCoordinator::MSG_SET_REMOTE_RECEIVER, resultReceiverBundle);

    AutoPtr<IViewGroup> vg;
    GetDecor((IViewGroup**)&vg);
    IView* decorView = IView::Probe(vg);
    if (decorView != NULL) {
        AutoPtr<IViewTreeObserver> vto;
        decorView->GetViewTreeObserver((IViewTreeObserver**)&vto);
        AutoPtr<IOnPreDrawListener> listener = new DecorViewOnPreDrawListener(this, decorView);
        vto->AddOnPreDrawListener(listener);
    }
    return NOERROR;
}
开发者ID:elastos,项目名称:Elastos5,代码行数:33,代码来源:EnterTransitionCoordinator.cpp

示例6: if

ECode EnterTransitionCoordinator::Stop()
{
    // Restore the background to its previous state since the
    // Activity is stopping.
    if (mBackgroundAnimator != NULL) {
        IAnimator* va = IAnimator::Probe(mBackgroundAnimator);
        va->End();
        mBackgroundAnimator = NULL;
    }
    else if (mWasOpaque) {
        AutoPtr<IViewGroup> vg;
        GetDecor((IViewGroup**)&vg);
        IView* decorView = IView::Probe(vg);
        if (decorView != NULL) {
            AutoPtr<IDrawable> drawable;
            decorView->GetBackground((IDrawable**)&drawable);
            if (drawable != NULL) {
                drawable->SetAlpha(1);
            }
        }
    }
    MakeOpaque();
    mIsCanceled = TRUE;
    mResultReceiver = NULL;
    mActivity = NULL;
    MoveSharedElementsFromOverlay();
    if (mTransitioningViews != NULL) {
        ShowViews(mTransitioningViews, TRUE);
    }
    ShowViews(mSharedElements, TRUE);
    ClearState();
    return NOERROR;
}
开发者ID:elastos,项目名称:Elastos5,代码行数:33,代码来源:EnterTransitionCoordinator.cpp

示例7: getIView

void CAddTriggerController::onLMouseUp	(int x, int y)
{
    IView *pView = getIView();
    ICameraSceneNode *cam = pView->getSceneMgr()->getActiveCamera();

    // get position
    core::vector3df hit;
    bool b = getPickPosition( &hit );

    if ( b )
    {
        core::vector3df camPos = cam->getAbsolutePosition();
        core::line3df camRay( camPos, hit );

        if ( camRay.getLength() < 5000 )
        {
            CTrigger *pObj =	pView->getCurrentZone()->createTrigger();

            pObj->setPosition( hit );
            pObj->setVisible( true );

            // add history
            CHistoryManager* pHistory = CHistoryManager::createGetInstance();
            pHistory->beginHistory();
            pHistory->addHistoryCreateObj( pObj );
            pHistory->endHistory();
        }
        else
            pView->alertError( L"Can not create object because is too far" );
    }
    else
        pView->alertError( L"Can not create object because is too far" );
}
开发者ID:codeman001,项目名称:gsleveleditor,代码行数:33,代码来源:CAddTriggerController.cpp

示例8: dot

// Shake the view as requested
void CPlayerView::ViewShakePostProcess(CPlayer &rPlayer, SViewParams &viewParams)
{
	if (rPlayer.m_stats.inFreefall.Value())
	{
		IView *pView = g_pGame->GetIGameFramework()->GetIViewSystem()->GetViewByEntityId(rPlayer.GetEntityId());

		if (pView)
		{
			float dot(0.1f * min(19.0f, 5.0f + max(0.0f, rPlayer.m_stats.velocity * viewParams.rotation.GetColumn1())));

			if (rPlayer.m_stats.inFreefall.Value() == 2)
			{
				dot *= 0.5f;
			}

			//float white[4] = {1,1,1,1};
			//gEnv->pRenderer->Draw2dLabel( 100, 50, 2, white, false, "dot:%f vel:%f", dot, rPlayer.m_stats.velocity.len() );
			pView->SetViewShake(Ang3(0.0005f, 0.001f, 0.0005f)*dot, Vec3(0.003f, 0.0f, 0.003f)*dot, 0.3f, 0.015f, 1.0f, 2);
		}
	}

	//testing code
	/*if (m_stats.inAir < 0.1f && m_stats.flatSpeed > GetStanceInfo(STANCE_STAND)->maxSpeed * 1.1f)
	{
	float shake(g_pGameCVars->cl_sprintShake);

	IView *pView = g_pGame->GetIGameFramework()->GetIViewSystem()->GetViewByEntityId(GetEntityId());
	if (pView)
	pView->SetViewShake(ZERO,Vec3(m_stats.flatSpeed*0.0035f,0,m_stats.flatSpeed*0.0035f) * shake,0.1f,0.05f,0.5f,1);
	}*/
}
开发者ID:Oliverreason,项目名称:bare-minimum-cryengine3,代码行数:32,代码来源:PlayerView.cpp

示例9: DEG2RAD

void CCinematicInput::UpdateAdditiveCameraInput( IScriptSystem* pScriptSystem, float frameTime )
{
	CCinematicInput::SUpdateContext updateCtx;

	pScriptSystem->GetGlobalValue("Cinematic_CameraLookUp", updateCtx.m_lookUpLimit);
	pScriptSystem->GetGlobalValue("Cinematic_CameraLookDown", updateCtx.m_lookDownLimit);
	pScriptSystem->GetGlobalValue("Cinematic_CameraLookLeft", updateCtx.m_lookLeftLimit);
	pScriptSystem->GetGlobalValue("Cinematic_CameraLookRight", updateCtx.m_lookRightLimit);
	float recenterCamera = 0.0f;
	pScriptSystem->GetGlobalValue("Cinematic_CameraDoNotCenter", recenterCamera);

	updateCtx.m_lookUpLimit = DEG2RAD(updateCtx.m_lookUpLimit);
	updateCtx.m_lookDownLimit = DEG2RAD(updateCtx.m_lookDownLimit);
	updateCtx.m_lookLeftLimit = DEG2RAD(updateCtx.m_lookLeftLimit);
	updateCtx.m_lookRightLimit = DEG2RAD(updateCtx.m_lookRightLimit);
	updateCtx.m_recenter = (recenterCamera < 0.01f);

	updateCtx.m_frameTime = frameTime;

	CActor* pClientActor = static_cast<CActor*>(g_pGame->GetIGameFramework()->GetClientActor());
	if (pClientActor)
	{
		CRY_ASSERT(pClientActor->GetActorClass() == CPlayer::GetActorClassType());
		CPlayer* pClientPlayer = static_cast<CPlayer*>(pClientActor);

		IPlayerInput* pIPlayerInput = pClientPlayer->GetPlayerInput();
		if(pIPlayerInput && pIPlayerInput->GetType() == IPlayerInput::PLAYER_INPUT)
		{
			CPlayerInput * pPlayerInput = static_cast<CPlayerInput*>(pIPlayerInput);

			Ang3 frameAccumulatedAngles(0.0f, 0.0f, 0.0f);

#if CINEMATIC_INPUT_PC_MOUSE
			const bool isAimingWithMouse = pPlayerInput->IsAimingWithMouse();

			RefreshInputMethod(isAimingWithMouse);

			if (isAimingWithMouse)
			{
				frameAccumulatedAngles = UpdateAdditiveCameraInputWithMouse(updateCtx, pPlayerInput->GetRawMouseInput());
			}
			else
			{
				frameAccumulatedAngles = UpdateAdditiveCameraInputWithController(updateCtx, pPlayerInput->GetRawControllerInput());
			}
#else
			frameAccumulatedAngles = UpdateAdditiveCameraInputWithController(updateCtx, pPlayerInput->GetRawControllerInput());
#endif

			IView* pActiveView = g_pGame->GetIGameFramework()->GetIViewSystem()->GetActiveView();
			if (pActiveView)
			{
				pActiveView->SetFrameAdditiveCameraAngles(frameAccumulatedAngles);
			}
		}
	}
}
开发者ID:danielasun,项目名称:dbho-GameSDK,代码行数:57,代码来源:CinematicInput.cpp

示例10: getIView

void CAddObjectController::cancelController()
{
	IView *pView = getIView();
	wchar_t *currentTemplate = pView->getCurrentObjectTemplate();
	
	CGameObject *p = CObjTemplateFactory::getGameObject( currentTemplate );
	if ( p )
		p->setVisible( false );
}
开发者ID:codeman001,项目名称:gsleveleditor,代码行数:9,代码来源:CAddObjectController.cpp

示例11: getIView

// selectObject
// detect list objs at rect
void CDocument::selectObject( int x, int y, int w, int h, bool isControlHold )
{
	IView *pView = getIView();
	ISceneManager *smgr = pView->getSceneMgr();	
	
	ICameraSceneNode *camera = smgr->getActiveCamera();

	// if no camera
	if (  camera == NULL )
		return;

	const SViewFrustum* viewFrustum = camera->getViewFrustum();
	ISceneCollisionManager *collMan = smgr->getSceneCollisionManager();

	int screenX = -1, screenY = -1;
		
	ArrayZoneIter iZone = m_zones.begin(), iEnd = m_zones.end();
	while ( iZone != iEnd )
	{
		ArrayGameObject* listObj = (*iZone)->getChilds();
		ArrayGameObjectIter iObj = listObj->begin(), objEnd = listObj->end();
		ISceneNode *pNode = NULL;

		while ( iObj != objEnd )
		{
			CGameObject *pGameObj = (CGameObject*)(*iObj);
			
			pNode = pGameObj->getSceneNode();
			
			if ( pNode != NULL && pGameObj->isVisible() )
			{
				core::vector3df center = pGameObj->getPosition();

				// check object is in frustum
				if ( viewFrustum->getBoundingBox().isPointInside( center ) )
				{					
					if ( pView->getScreenCoordinatesFrom3DPosition( center, &screenX, &screenY ) )
					{
						if ( x <= screenX && screenX <= x + w && y <= screenY && screenY <= y + h )
						{
							
							if ( isControlHold == false || pGameObj->getObjectState() == CGameObject::Normal )
								m_selectObjects.push_back( pGameObj );							

						}	// inselect
					}	// getScreenCoordinatesFrom3DPosition			
				} // frustum
			}

			iObj++;
		}

		iZone++;
	}

}
开发者ID:codeman001,项目名称:gsleveleditor,代码行数:58,代码来源:CDocument.cpp

示例12: CamShake

//---------------------------------
void CScreenEffects::CamShake(Vec3 shiftShake, Vec3 rotateShake, float freq, float shakeTime, float randomness, int shakeID)
{
	if (m_ownerActor->IsClient())
	{
		IView *view = gEnv->pGame->GetIGameFramework()->GetIViewSystem()->GetActiveView();
		if (view)
		{
			view->SetViewShake(Ang3(shiftShake), rotateShake, shakeTime, shakeTime, randomness, shakeID, false);
		}
	}
}
开发者ID:MrHankey,项目名称:destructionderby,代码行数:12,代码来源:ScreenEffects.cpp

示例13: dot

// Shake the view as requested
void CPlayerView::ViewShakePostProcess(CPlayer &rPlayer,SViewParams &viewParams)
{
	if (rPlayer.m_stats.inFreefall.Value())
	{
		IView *pView = g_pGame->GetIGameFramework()->GetIViewSystem()->GetViewByEntityId(rPlayer.GetEntityId());
		if (pView)
		{
			float dot(0.1f * min(19.0f,5.0f + max(0.0f,rPlayer.m_stats.velocity*viewParams.rotation.GetColumn1())));
			if (rPlayer.m_stats.inFreefall.Value()==2)
				dot *= 0.5f;

			//float white[4] = {1,1,1,1};
			//gEnv->pRenderer->Draw2dLabel( 100, 50, 2, white, false, "dot:%f vel:%f", dot, rPlayer.m_stats.velocity.len() );
			
			pView->SetViewShake(Ang3(0.0005f,0.001f,0.0005f)*dot,Vec3(0.003f,0.0f,0.003f)*dot,0.3f,0.015f,1.0f,2);
		}
	}

#if 0
	if (m_io.viewShake.amount>0.001f)
	{
		viewParams.shakeDuration = m_io.viewShake.duration;
		viewParams.shakeFrequency = m_io.viewShake.frequency;
		viewParams.shakeAmount = m_io.viewShake.angle;
		viewParams.shakeID = 1;

		memset(&m_io.viewShake,0,sizeof(SViewShake));
	}
	/*else if (IsZeroG() && m_stats.flatSpeed > 10.0f)
	{
	viewParams.shakeDuration = 0.1f;
	viewParams.shakeFrequency = 0.1f;
	viewParams.shakeAmount = Ang3(m_stats.flatSpeed*0.001f,0,0);
	}*/
	else if (m_in.stats_inAir < 0.1f && m_in.stats_flatSpeed > m_in.stand_MaxSpeed * 1.1f)
	{
		viewParams.shakeDuration = 0.1f ;/// (shake*shake);
		viewParams.shakeFrequency = 0.1f ;/// (shake*shake);
		viewParams.shakeAmount = Ang3(m_in.stats_flatSpeed*0.0015f,m_in.stats_flatSpeed*0.00035f,m_in.stats_flatSpeed*0.00035f) * m_in.shake;
		viewParams.shakeID = 0;
	}
#endif
	//testing code
	/*if (m_stats.inAir < 0.1f && m_stats.flatSpeed > GetStanceInfo(STANCE_STAND)->maxSpeed * 1.1f)
	{
	float shake(g_pGameCVars->cl_sprintShake);

	IView *pView = g_pGame->GetIGameFramework()->GetIViewSystem()->GetViewByEntityId(GetEntityId());
	if (pView)
	pView->SetViewShake(ZERO,Vec3(m_stats.flatSpeed*0.0035f,0,m_stats.flatSpeed*0.0035f) * shake,0.1f,0.05f,0.5f,1);
	}*/
}
开发者ID:mrwonko,项目名称:CrysisVR,代码行数:53,代码来源:PlayerView.cpp

示例14: DEG2RAD

void CCinematicInput::UpdateAdditiveCameraInput(IScriptSystem *pScriptSystem, float frameTime)
{
	float lookUpLimit = 0.0f, lookDownLimit = 0.0f;
	float lookLeftLimit = 0.0f, lookRightLimit = 0.0f;

	pScriptSystem->GetGlobalValue("Cinematic_CameraLookUp", lookUpLimit);
	pScriptSystem->GetGlobalValue("Cinematic_CameraLookDown", lookDownLimit);
	pScriptSystem->GetGlobalValue("Cinematic_CameraLookLeft", lookLeftLimit);
	pScriptSystem->GetGlobalValue("Cinematic_CameraLookRight", lookRightLimit);

	lookUpLimit = DEG2RAD(lookUpLimit);
	lookDownLimit = DEG2RAD(lookDownLimit);
	lookLeftLimit = DEG2RAD(lookLeftLimit);
	lookRightLimit = DEG2RAD(lookRightLimit);

	CActor *pClientActor = static_cast<CActor *>(g_pGame->GetIGameFramework()->GetClientActor());

	if(pClientActor)
	{
		CRY_ASSERT(pClientActor->GetActorClass() == CPlayer::GetActorClassType());
		CPlayer *pClientPlayer = static_cast<CPlayer *>(pClientActor);

		IPlayerInput *pIPlayerInput = pClientPlayer->GetPlayerInput();

		if(pIPlayerInput && pIPlayerInput->GetType() == IPlayerInput::PLAYER_INPUT)
		{
			CPlayerInput *pPlayerInput = static_cast<CPlayerInput *>(pIPlayerInput);

			Ang3 rawMouseInput = pPlayerInput->GetRawMouseInput() * 0.25f;
			rawMouseInput.z = - rawMouseInput.z;
			rawMouseInput.x *= (g_pGameCVars->cl_invertMouse == 0) ? 1.0f : -1.0f;

			Ang3 rawControllerInput = pPlayerInput->GetRawControllerInput() + rawMouseInput;
			//Yaw angle (Z axis)
			rawControllerInput.z = -clamp((float)__fsel(rawControllerInput.z, rawControllerInput.z * lookRightLimit, rawControllerInput.z * lookLeftLimit), -lookLeftLimit, lookRightLimit);
			//Pitch angle (X axis)
			rawControllerInput.x *= (g_pGameCVars->cl_invertController == 0) ? 1.0f : -1.0f;
			rawControllerInput.x = clamp((float)__fsel(rawControllerInput.x, rawControllerInput.x * lookUpLimit, rawControllerInput.x * lookDownLimit), -lookDownLimit, lookUpLimit);
			//No roll allowed
			rawControllerInput.y = 0.0f;

			Interpolate(m_currentRawInputAngles, rawControllerInput, 2.5f, frameTime);

			IView *pActiveView = g_pGame->GetIGameFramework()->GetIViewSystem()->GetActiveView();

			if(pActiveView)
			{
				pActiveView->SetFrameAdditiveCameraAngles(m_currentRawInputAngles);
			}
		}
	}
}
开发者ID:super-nova,项目名称:NovaRepo,代码行数:52,代码来源:CinematicInput.cpp

示例15: Shake

	//----------------------------------------------------------------------
	void Shake( SActivationInfo* pActInfo, bool bUpdateOnly )
	{
		IView* pView = GetView( pActInfo );
		if (!pView)
			return;

		int currentFrameId = gEnv->pRenderer->GetFrameID();

		if (!bUpdateOnly && (m_lastShakeFrameID == currentFrameId))
			return;

		SInputParams inputParams;
		ReadCurrentInputParams( pActInfo, inputParams );

		IView::SShakeParams params;

		params.bGroundOnly     = inputParams.groundOnly;
		params.isSmooth        = inputParams.isSmooth;
		params.shakeAngle      = inputParams.angle;
		params.shakeShift      = inputParams.shift;
		params.sustainDuration = inputParams.sustainDuration;
		params.bPermanent      = (params.sustainDuration == -1);
		float freq = inputParams.frequency;
		if (iszero(freq) == false)
			freq = 1.0f / freq;
		params.frequency       = freq;
		params.randomness      = inputParams.randomness;
		params.bFlipVec        = true;        // GetPortBool(pActInfo, EIP_Flip);
		params.bUpdateOnly     = bUpdateOnly; // it's an update if and only if Frequency has been changed
		params.fadeInDuration  = inputParams.fadeInDuration;
		params.fadeOutDuration = inputParams.fadeOutDuration;
		params.shakeID         = FLOWGRAPH_SHAKE_ID;

		float    distance    = inputParams.distance;
		IEntity* pEntityNode = pActInfo->pEntity;
		if (pEntityNode)
		{
			distance = pView->GetCurrentParams()->position.GetDistance( pEntityNode->GetWorldPos());
		}

		const float rangeMin = inputParams.rangeMin;
		const float rangeMax = inputParams.rangeMax;
		float       amount   = min(1.f, max(0.f, (rangeMax - distance) / (rangeMax - rangeMin)));

		params.shakeAngle *= amount;
		params.shakeShift *= amount;

		pView->SetViewShakeEx( params );

		m_lastShakeFrameID = currentFrameId;
	}
开发者ID:joewan,项目名称:pycmake,代码行数:52,代码来源:FlowCameraNodes.cpp


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