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

C++ GetImplementation函数代码示例

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

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



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

示例1: internal

void DynamicsBodyConfig::SetShape( DynamicsShape shape )
{
  Internal::DynamicsShapePtr internal( &(GetImplementation(shape)) );

  GetImplementation(*this).SetShape( internal );
}
开发者ID:Tarnyko,项目名称:dali-core,代码行数:6,代码来源:dynamics-body-config.cpp


示例2: GetImplementation

PanGestureDetector::DetectedSignalV2& PanGestureDetector::DetectedSignal()
{
  return GetImplementation(*this).DetectedSignal();
}
开发者ID:Tarnyko,项目名称:dali-core,代码行数:4,代码来源:pan-gesture-detector.cpp


示例3: GetImplementation

SoundPlayer::SoundPlayFinishedSignalV2& SoundPlayer::SoundPlayFinishedSignal()
{
  return GetImplementation(*this).SoundPlayFinishedSignal();
}
开发者ID:Tarnyko,项目名称:dali-adaptor,代码行数:4,代码来源:sound-player.cpp


示例4: DALI_ASSERT_DEBUG

bool PanGestureProcessor::CheckGestureDetector( GestureDetector* detector, Actor* actor )
{
    DALI_ASSERT_DEBUG( mCurrentPanEvent );

    bool retVal( false );
    PanGestureDetector* panDetector( static_cast< PanGestureDetector* >( detector ) );

    if ( ( mCurrentPanEvent->numberOfTouches >= panDetector->GetMinimumTouchesRequired() ) &&
            ( mCurrentPanEvent->numberOfTouches <= panDetector->GetMaximumTouchesRequired() ) )
    {
        // Check if the detector requires directional panning.
        if ( panDetector->RequiresDirectionalPan() && mCurrentRenderTask )
        {
            // It does, calculate the angle of the pan in local actor coordinates and ensures it fits
            // the detector's criteria.
            RenderTask& renderTaskImpl( GetImplementation( mCurrentRenderTask ) );

            Vector2 startPosition, currentPosition;
            actor->ScreenToLocal( renderTaskImpl, startPosition.x,   startPosition.y,   mPossiblePanPosition.x,              mPossiblePanPosition.y );
            actor->ScreenToLocal( renderTaskImpl, currentPosition.x, currentPosition.y, mCurrentPanEvent->currentPosition.x, mCurrentPanEvent->currentPosition.y );
            Vector2 displacement( currentPosition - startPosition );

            Radian angle( atan( displacement.y / displacement.x ) );

            /////////////////////////////
            //            |            //
            //            |            //
            //   Q3 (-,-) | Q4 (+,-)   //
            //            |            //
            //    ----------------- +x //
            //            |            //
            //   Q2 (-,+) | Q1 (+,+)   //
            //            |            //
            //            |            //
            //           +y            //
            /////////////////////////////
            // Quadrant 1: As is
            // Quadrant 2: 180 degrees + angle
            // Quadrant 3: angle - 180 degrees
            // Quadrant 4: As is
            /////////////////////////////

            if ( displacement.x < 0.0f )
            {
                if ( displacement.y >= 0.0f )
                {
                    // Quadrant 2
                    angle.radian += Math::PI;
                }
                else
                {
                    // Quadrant 3
                    angle.radian -= Math::PI;
                }
            }

            if ( panDetector->CheckAngleAllowed( angle ) )
            {
                retVal = true;
            }
        }
        else
        {
            // Directional panning not required so we can use this actor and gesture detector.
            retVal = true;
        }
    }
    return retVal;
}
开发者ID:noyangunday,项目名称:dali,代码行数:69,代码来源:pan-gesture-processor.cpp


示例5: GetImplementation

void DynamicsBodyConfig::SetFriction(const float friction)
{
  GetImplementation(*this).SetFriction( friction );
}
开发者ID:Tarnyko,项目名称:dali-core,代码行数:4,代码来源:dynamics-body-config.cpp


示例6: GetImplementation

TargetPhraseCollection const*
PhraseDictionaryTreeAdaptor::GetTargetPhraseCollection(Phrase const &src) const
{
  return GetImplementation().GetTargetPhraseCollection(src);
}
开发者ID:hitokazm,项目名称:mosesdecoder,代码行数:5,代码来源:PhraseDictionaryTreeAdaptor.cpp


示例7: switch

void PanGestureProcessor::Process( const Integration::PanGestureEvent& panEvent )
{
    switch( panEvent.state )
    {
    case Gesture::Possible:
    {
        mCurrentPanEmitters.clear();
        ResetActor();

        HitTestAlgorithm::Results hitTestResults;
        if( HitTest( mStage, panEvent.currentPosition, hitTestResults ) )
        {
            SetActor( &GetImplementation( hitTestResults.actor ) );
            mPossiblePanPosition = panEvent.currentPosition;
        }

        break;
    }

    case Gesture::Started:
    {
        if ( GetCurrentGesturedActor() )
        {
            // The pan gesture should only be sent to the gesture detector which first received it so that
            // it can be told when the gesture ends as well.

            HitTestAlgorithm::Results hitTestResults;
            HitTest( mStage, mPossiblePanPosition, hitTestResults ); // Hit test original possible position...

            if ( hitTestResults.actor && ( GetCurrentGesturedActor() == &GetImplementation( hitTestResults.actor ) ) )
            {
                // Record the current render-task for Screen->Actor coordinate conversions
                mCurrentRenderTask = hitTestResults.renderTask;

                // Set mCurrentPanEvent to use inside overridden methods called in ProcessAndEmit()
                mCurrentPanEvent = &panEvent;
                ProcessAndEmit( hitTestResults );
                mCurrentPanEvent = NULL;
            }
            else
            {
                ResetActor();
                mCurrentPanEmitters.clear();
            }
        }
        break;
    }

    case Gesture::Continuing:
    case Gesture::Finished:
    case Gesture::Cancelled:
    {
        // Only send subsequent pan gesture signals if we processed the pan gesture when it started.
        // Check if actor is still touchable.

        Actor* currentGesturedActor = GetCurrentGesturedActor();
        if ( currentGesturedActor )
        {
            if ( currentGesturedActor->IsHittable() && !mCurrentPanEmitters.empty() && mCurrentRenderTask )
            {
                GestureDetectorContainer outsideTouchesRangeEmitters;

                // Removes emitters that no longer have the actor attached
                // Also remove emitters whose touches are outside the range of the current pan event and add them to outsideTouchesRangeEmitters
                GestureDetectorContainer::iterator endIter = std::remove_if( mCurrentPanEmitters.begin(), mCurrentPanEmitters.end(),
                        IsNotAttachedAndOutsideTouchesRangeFunctor(currentGesturedActor, panEvent.numberOfTouches, outsideTouchesRangeEmitters) );
                mCurrentPanEmitters.erase( endIter, mCurrentPanEmitters.end() );

                Vector2 actorCoords;

                if ( !outsideTouchesRangeEmitters.empty() || !mCurrentPanEmitters.empty() )
                {
                    currentGesturedActor->ScreenToLocal( GetImplementation( mCurrentRenderTask ), actorCoords.x, actorCoords.y, panEvent.currentPosition.x, panEvent.currentPosition.y );

                    // EmitPanSignal checks whether we have a valid actor and whether the container we are passing in has emitters before it emits the pan.
                    EmitPanSignal( currentGesturedActor, outsideTouchesRangeEmitters, panEvent, actorCoords, Gesture::Finished, mCurrentRenderTask);
                    EmitPanSignal( currentGesturedActor, mCurrentPanEmitters, panEvent, actorCoords, panEvent.state, mCurrentRenderTask);
                }

                if ( mCurrentPanEmitters.empty() )
                {
                    // If we have no emitters attached then clear pan actor as well.
                    ResetActor();
                }

                // Clear current gesture detectors if pan gesture has ended or been cancelled.
                if ( ( panEvent.state == Gesture::Finished ) || ( panEvent.state == Gesture::Cancelled ) )
                {
                    mCurrentPanEmitters.clear();
                    ResetActor();
                }
            }
            else
            {
                mCurrentPanEmitters.clear();
                ResetActor();
            }
        }
        break;
    }
//.........这里部分代码省略.........
开发者ID:noyangunday,项目名称:dali,代码行数:101,代码来源:pan-gesture-processor.cpp


示例8: GetImplementation

void PhraseDictionaryTreeAdaptor::CleanUpAfterSentenceProcessing(InputType const& source)
{
  PDTAimp &obj = GetImplementation();
  obj.CleanUp();
}
开发者ID:akartbayev,项目名称:mosesdecoder,代码行数:5,代码来源:PhraseDictionaryTreeAdaptor.cpp


示例9: pan

void PanGestureProcessor::EmitPanSignal( Actor* actor,
        const GestureDetectorContainer& gestureDetectors,
        const Integration::PanGestureEvent& panEvent,
        Vector2 localCurrent,
        Gesture::State state,
        Dali::RenderTask renderTask )
{
    if ( actor && !gestureDetectors.empty() )
    {
        PanGesture pan(state);
        pan.time = panEvent.time;

        pan.numberOfTouches = panEvent.numberOfTouches;
        pan.screenPosition = panEvent.currentPosition;
        pan.position = localCurrent;

        RenderTask& renderTaskImpl( GetImplementation( renderTask ) );

        Vector2 localPrevious;
        actor->ScreenToLocal( renderTaskImpl, localPrevious.x, localPrevious.y, panEvent.previousPosition.x, panEvent.previousPosition.y );

        pan.displacement = localCurrent - localPrevious;
        Vector2 previousPos( panEvent.previousPosition );
        if ( state == Gesture::Started )
        {
            previousPos = mPossiblePanPosition;
        }

        pan.screenDisplacement = panEvent.currentPosition - previousPos;

        // Avoid dividing by 0
        if ( panEvent.timeDelta > 0 )
        {
            pan.velocity.x = pan.displacement.x / panEvent.timeDelta;
            pan.velocity.y = pan.displacement.y / panEvent.timeDelta;

            pan.screenVelocity.x = pan.screenDisplacement.x / panEvent.timeDelta;
            pan.screenVelocity.y = pan.screenDisplacement.y / panEvent.timeDelta;
        }

        // When the gesture ends, we may incorrectly get a ZERO velocity (as we have lifted our finger without any movement)
        // so we should use the last recorded velocity instead in this scenario.
        if ( ( state == Gesture::Finished ) && ( pan.screenVelocity == Vector2::ZERO ) &&
                ( panEvent.timeDelta < MAXIMUM_TIME_WITH_VALID_LAST_VELOCITY ) )
        {
            pan.velocity = mLastVelocity;
            pan.screenVelocity = mLastScreenVelocity;
        }
        else
        {
            // Store the current velocity for future iterations.
            mLastVelocity = pan.velocity;
            mLastScreenVelocity = pan.screenVelocity;
        }

        if ( mSceneObject )
        {
            // We update the scene object directly rather than sending a message.
            // Sending a message could cause unnecessary delays, the scene object ensure thread safe behaviour.
            mSceneObject->AddGesture( pan );
        }

        Dali::Actor actorHandle( actor );
        const GestureDetectorContainer::const_iterator endIter = gestureDetectors.end();
        for ( GestureDetectorContainer::const_iterator iter = gestureDetectors.begin(); iter != endIter; ++iter )
        {
            static_cast< PanGestureDetector* >( *iter )->EmitPanGestureSignal( actorHandle, pan );
        }
    }
}
开发者ID:noyangunday,项目名称:dali,代码行数:70,代码来源:pan-gesture-processor.cpp


示例10: GetImplementation

ObjectRegistry::ObjectDestroyedSignalV2& ObjectRegistry::ObjectDestroyedSignal()
{
  return GetImplementation(*this).ObjectDestroyedSignal();
}
开发者ID:Tarnyko,项目名称:dali-core,代码行数:4,代码来源:object-registry.cpp


示例11: GetImplementation

bool BaseHandle::DoConnectSignal( ConnectionTrackerInterface* connectionTracker, const std::string& signalName, FunctorDelegate* functor )
{
  return GetImplementation(*this).DoConnectSignal( connectionTracker, signalName, functor );
}
开发者ID:mettalla,项目名称:dali,代码行数:4,代码来源:base-handle.cpp


示例12: GetImplementation

const PropertyCondition::ArgumentContainer& PropertyCondition::GetArguments() const
{
  return GetImplementation(*this).arguments;
}
开发者ID:Tarnyko,项目名称:dali-core,代码行数:4,代码来源:property-conditions.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GetIndent函数代码示例发布时间:2022-05-30
下一篇:
C++ GetImageProperty函数代码示例发布时间: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