當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。