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


C++ GetInput函数代码示例

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


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

示例1: GetInput

void Player::FrameMove(float fElapsedTime)
{
	GetInput();

	XMMATRIX mBodyCameraRot = XMMatrixRotationRollPitchYaw(0, m_fYawAngle, 0);
	XMMATRIX mHeadCameraRot = XMMatrixRotationRollPitchYaw(m_fPitchAngle, 0, 0);

	mHeadCameraRot.r[3] = XMVectorSet(0.f, 0.6f, 0.f, 1.f);

	mWorld = mBodyCameraRot * XMMatrixTranslationFromVector(mWorld.Translation());
	m_pHead->SetRelativeWorld(mHeadCameraRot);

	UpdateAcceleration(fElapsedTime);

	ControllerNode::FrameMove(fElapsedTime);
}
开发者ID:galek,项目名称:RathEngine,代码行数:16,代码来源:Player.cpp

示例2: GetInput

ComponentResult karoke::Initialize()
{
	// get the current numChannels for input and output.
	// a host may test various combinations of these 
	// regardless of the outInfo returned by our SupportedNumChannels method
	SInt16 auNumInputs = (SInt16) GetInput(0)->GetStreamFormat().mChannelsPerFrame;
	SInt16 auNumOutputs = (SInt16) GetOutput(0)->GetStreamFormat().mChannelsPerFrame;
	
	if ((auNumInputs == NUM_INPUTS) && (auNumOutputs == NUM_OUTPUTS))
	{    
		MaintainKernels();
		return noErr;
	}
	else
		return kAudioUnitErr_FormatNotSupported;
}
开发者ID:slagyr,项目名称:8LU-DSP,代码行数:16,代码来源:karoke.cpp

示例3: GetInput

FPooledRenderTargetDesc FRCPassPostProcessSubsurfaceRecombine::ComputeOutputDesc(EPassOutputId InPassOutputId) const
{
	FPooledRenderTargetDesc Ret = GetInput(ePId_Input0)->GetOutput()->RenderTargetDesc;

	Ret.Reset();
	Ret.DebugName = TEXT("SceneColorSubsurface");

	if(bSingleViewportMode)
	{
		// we don't need an alpha channel any more as it was used for ScreenSpaceSubsurfaceScattering only
		Ret.Format = (Ret.Format == PF_FloatRGBA) ? PF_FloatRGB : PF_FloatRGBA;
	}

	// we replace the HDR SceneColor with this one
	return Ret;
}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:16,代码来源:PostProcessSubsurface.cpp

示例4: switch

EditorCell *GroupCell::GetEditable()
{
  switch (m_groupType) {
    case GC_TYPE_CODE:
    case GC_TYPE_IMAGE:
    case GC_TYPE_TEXT:
    case GC_TYPE_TITLE:
    case GC_TYPE_SECTION:
    case GC_TYPE_SUBSECTION:
    case GC_TYPE_SUBSUBSECTION:
      return GetInput();
    case GC_TYPE_PAGEBREAK:
    default:
      return NULL;
  }
}
开发者ID:BigMcLargeHuge,项目名称:wxmaxima,代码行数:16,代码来源:GroupCell.cpp

示例5: GetInput

void FRCPassPostProcessOutput::Process(FRenderingCompositePassContext& Context)
{
	const FRenderingCompositeOutputRef* Input = GetInput(ePId_Input0);

	if(!Input)
	{
		// input is not hooked up correctly
		return;
	}

	// pass through
	PassOutputs[0].PooledRenderTarget = Input->GetOutput()->PooledRenderTarget;

	check(ExternalRenderTarget);
	*ExternalRenderTarget = PassOutputs[0].PooledRenderTarget;
}
开发者ID:colwalder,项目名称:unrealengine,代码行数:16,代码来源:PostProcessOutput.cpp

示例6: main

void main()
{
    int num;
    int i;
    i=0;
    Print("Please choose how many simulation process you want to exec: ",sizeof("Please choose how many simulation process you want to exec: ")/sizeof(char),0,0);
    num=GetInput();
    if (num>8) {
        Print("The max process number is 8.\n",sizeof("The max process number is 8.\n")/sizeof(char),0,0);
    } else {
        for (;i<num; i++) {
            Exec("../test/DoctorOffice", sizeof("../test/DoctorOffice")/sizeof(char));
        }
    }
    Exit(0);  
}
开发者ID:shengzhc,项目名称:CSCi402,代码行数:16,代码来源:Simulation.c

示例7: GetInput

SVDF::SVDF(const Operation& operation,
           std::vector<RunTimeOperandInfo>& operands) {
    input_ = GetInput(operation, operands, kInputTensor);
    weights_feature_ = GetInput(operation, operands, kWeightsFeatureTensor);
    weights_time_ = GetInput(operation, operands, kWeightsTimeTensor);
    bias_ = GetInput(operation, operands, kBiasTensor);
    state_in_ = GetInput(operation, operands, kStateInTensor);

    params_.rank_ = getScalarData<int>(*GetInput(operation, operands, kRankParam));
    params_.activation_ = static_cast<TfLiteFusedActivation>(getScalarData<int>(
        *GetInput(operation, operands, kActivationParam)));

    state_out_ = GetOutput(operation, operands, kStateOutTensor);
    output_ = GetOutput(operation, operands, kOutputTensor);
}
开发者ID:MIPS,项目名称:frameworks-ml,代码行数:15,代码来源:SVDF.cpp

示例8: Preparation

avtDataObject_p
avtActualDataMinMaxQuery::ApplyFilters(avtDataObject_p inData)
{
    Preparation(inData);

    bool zonesPreserved  = GetInput()->GetInfo().GetValidity().GetZonesPreserved();
    zonesPreserved = (bool)UnifyMinimumValue((int)zonesPreserved);

    if (!timeVarying && zonesPreserved)
    {
        avtContract_p contract =
            inData->GetOriginatingSource()->GetGeneralContract();

        avtDataset_p ds;
        CopyTo(ds, inData);
        avtSourceFromAVTDataset termsrc(ds);
        avtDataObject_p obj = termsrc.GetOutput();
        condense->SetInput(obj);
        avtDataObject_p retObj = condense->GetOutput();
        retObj->Update(contract);
        return retObj;
    }
    else
    {
        avtDataRequest_p oldSpec = inData->GetOriginatingSource()->
            GetGeneralContract()->GetDataRequest();

        avtDataRequest_p newDS = new
            avtDataRequest(oldSpec, querySILR);
        newDS->SetTimestep(queryAtts.GetTimeStep());
        newDS->SetVariable(queryAtts.GetVariables()[0].c_str());

        if (!zonesPreserved)
            newDS->TurnZoneNumbersOn();

        avtContract_p contract =
            new avtContract(newDS, queryAtts.GetPipeIndex());

        avtDataObject_p temp;
        CopyTo(temp, inData);
        condense->SetInput(temp);
        avtDataObject_p retObj = condense->GetOutput();
        retObj->Update(contract);
        return retObj;
    }
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:46,代码来源:avtActualDataMinMaxQuery.C

示例9: GetOutput

void
avtMissingDataFilter::PostExecute(void)
{
    // Call the base class's PostExecute. Set the spatial dimension to zero to 
    // bypass a check in avtDataObjectToDatasetFilter::PostExecute that causes 
    // all unstructured meshes with tdim<sdim to become polydata. We don't want
    // that so work around it by setting tdim==sdim. Then we do the PostExecute
    // and restore the old value.
    avtDataAttributes &outAtts = GetOutput()->GetInfo().GetAttributes();
    int sdim = outAtts.GetSpatialDimension();
    int tdim = outAtts.GetTopologicalDimension();
    if(tdim < sdim && sdim >= 2)
        outAtts.SetTopologicalDimension(sdim);
    avtDataTreeIterator::PostExecute();
    if(tdim < sdim && sdim >= 2)
        outAtts.SetTopologicalDimension(tdim);

    if(removeMode)
    {
        // If anyone removed data, redo the original extents.
        int dataWasRemoved = (int) this->removedData;
        if (canDoCollectiveCommunication)
            dataWasRemoved = UnifyMaximumValue(dataWasRemoved);
        if(dataWasRemoved > 0)
        {
            avtDataAttributes &atts = GetInput()->GetInfo().GetAttributes();
            avtDataset_p ds = GetTypedOutput();

            int nVars = atts.GetNumberOfVariables();
            double de[2];
            for (int i = 0 ; i < nVars ; i++)
            {
                const char *vname = atts.GetVariableName(i).c_str();
                if (! contract->ShouldCalculateVariableExtents(vname))
                    continue;
    
                bool foundDE = avtDatasetExaminer::GetDataExtents(ds, de, vname);
                if (foundDE)
                {
                    outAtts.GetOriginalDataExtents(vname)->Merge(de);
                    outAtts.GetThisProcsOriginalDataExtents(vname)->Merge(de);
                }
            }
        }
    }
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:46,代码来源:avtMissingDataFilter.C

示例10: ProcessChildren

void OscNode::Process(unsigned int bufsize)
{
	if (bufsize>(unsigned int)m_Output.GetLength())
	{
		m_Output.Allocate(bufsize);
	}
	ProcessChildren(bufsize);

	if (ChildExists(0) && !GetChild(0)->IsTerminal())
	{
		m_WaveTable.ProcessFM(bufsize, m_Output, GetInput(0));
	}
	else
	{
		m_WaveTable.Process(bufsize, m_Output);
	}
}
开发者ID:mlozanov,项目名称:fluxus,代码行数:17,代码来源:ModuleNodes.cpp

示例11: GetInput

//GetInput
bool Profiles::GetInput (enInput nInput, bool *pbState, bool bMouseMovement)
{
    *pbState = false;
    for (unsigned int i = 0; i != m_lProfiles.size (); i++)
    {
        if (!GetInput (nInput, pbState, i, bMouseMovement))
        {
            return false;
        }
        if (*pbState)
        {
            break;
        }
    }

    return true;
}//GetInput
开发者ID:3dik,项目名称:MPong,代码行数:18,代码来源:Profiles.cpp

示例12: GetInput

void
avtRevolvedVolume::PreExecute(void)
{
    avtSingleInputExpressionFilter::PreExecute();

    avtDataAttributes &atts = GetInput()->GetInfo().GetAttributes();
    if (atts.GetSpatialDimension() != 2)
    {
        EXCEPTION2(InvalidDimensionsException, "Revolved volume",
                                               "2-dimensional");
    }
    haveIssuedWarning = false;
    if (atts.GetMeshCoordType() == AVT_ZR)
        revolveAboutX = false;
    else 
        revolveAboutX = true;
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt26RC_Trunk,代码行数:17,代码来源:avtRevolvedVolume.C

示例13: GetInput

void
avtSphereSliceFilter::UpdateDataObjectInfo(void)
{
    avtDataAttributes &inAtts      = GetInput()->GetInfo().GetAttributes();
    avtDataAttributes &outAtts     = GetOutput()->GetInfo().GetAttributes();
    avtDataValidity   &outValidity = GetOutput()->GetInfo().GetValidity();

    outAtts.SetTopologicalDimension(inAtts.GetTopologicalDimension()-1);
    outValidity.InvalidateZones();
    outValidity.ZonesSplit();

    char params[200];
    SNPRINTF(params, 200, "origin=%lg,%lg,%lg radius=%lg",
        atts.GetOrigin()[0], atts.GetOrigin()[1], atts.GetOrigin()[2],
        atts.GetRadius());
    GetOutput()->GetInfo().GetAttributes().AddFilterMetaData("SphereSlice", params);
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:17,代码来源:avtSphereSliceFilter.C

示例14: GetInput

FPooledRenderTargetDesc FRCPassPostProcessNoiseBlur::ComputeOutputDesc(EPassOutputId InPassOutputId) const
{
	FPooledRenderTargetDesc Ret = GetInput(ePId_Input0)->GetOutput()->RenderTargetDesc;

	Ret.Reset();

	if(OverrideFormat != PF_Unknown)
	{
		Ret.Format = OverrideFormat;
	}

	Ret.TargetableFlags &= ~TexCreate_UAV;
	Ret.TargetableFlags |= TexCreate_RenderTargetable;
	Ret.DebugName = TEXT("NoiseBlur");

	return Ret;
}
开发者ID:colwalder,项目名称:unrealengine,代码行数:17,代码来源:PostProcessNoiseBlur.cpp

示例15: GetInput

void DebugCameraController2D::Update(float timeStep)
{
    // Do not move if the UI has a focused element
    if (GetUI()->GetFocusElement())
        return;

    // Do not move if interacting with UI controls
    if (GetSystemUI()->IsAnyItemActive())
        return;

    Input* input = GetInput();

    // Movement speed as world units per second
    float moveSpeed_ = speed_;
    if (input->GetKeyDown(KEY_SHIFT))
    {
        moveSpeed_ *= 2;

        if (input->GetKeyPress(KEY_KP_PLUS))
            speed_ += 1.f;
        else if (input->GetKeyPress(KEY_KP_MINUS))
            speed_ -= 1.f;
    }

    if (input->GetMouseButtonDown(MOUSEB_RIGHT))
    {
        IntVector2 delta = input->GetMouseMove();

        if (input->IsMouseVisible() && delta != IntVector2::ZERO)
            input->SetMouseVisible(false);
        GetNode()->Translate2D(Vector2{(float)delta.x_ * -1.f, (float)delta.y_} * moveSpeed_ * timeStep);
    }
    else if (!input->IsMouseVisible())
        input->SetMouseVisible(true);

    // Read WASD keys and move the camera scene node to the corresponding direction if they are pressed
    if (input->GetKeyDown(KEY_W))
        GetNode()->Translate(Vector3::UP * moveSpeed_ * timeStep);
    if (input->GetKeyDown(KEY_S))
        GetNode()->Translate(Vector3::DOWN * moveSpeed_ * timeStep);
    if (input->GetKeyDown(KEY_A))
        GetNode()->Translate(Vector3::LEFT * moveSpeed_ * timeStep);
    if (input->GetKeyDown(KEY_D))
        GetNode()->Translate(Vector3::RIGHT * moveSpeed_ * timeStep);
}
开发者ID:rokups,项目名称:Urho3D,代码行数:45,代码来源:DebugCameraController.cpp


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