dgCollisionScene::dgCollisionScene(dgWorld* const world, dgDeserialize deserialization, void* const userData) : dgCollision(world, deserialization, userData), m_lock(0), m_list( world->GetAllocator()), m_fitnessList(world->GetAllocator()) { dgInt32 data[4]; m_world = world; m_rtti |= dgCollisionScene_RTTI; deserialization(userData, &data, sizeof(data)); for (dgInt32 i = 0; i < data[0]; i++) { dgMatrix matrix; void* data; deserialization(userData, &matrix, sizeof(dgMatrix)); deserialization(userData, &data, sizeof(void*)); dgCollision* const collision = m_world->CreateFromSerialization( deserialization, userData); dgList<dgProxy*>::dgListNode* const proxyNode = (dgList<dgProxy*>::dgListNode*) AddProxy(collision, matrix); dgProxy* const proxy = proxyNode->GetInfo(); proxy->m_userData = data; collision->Release(); } ImproveTotalFitness(); }
void AAudioVolume::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) { Super::PostEditChangeProperty(PropertyChangedEvent); Settings.Volume = FMath::Clamp<float>( Settings.Volume, 0.0f, 1.0f ); AmbientZoneSettings.InteriorTime = FMath::Max<float>( 0.01f, AmbientZoneSettings.InteriorTime ); AmbientZoneSettings.InteriorLPFTime = FMath::Max<float>( 0.01f, AmbientZoneSettings.InteriorLPFTime ); AmbientZoneSettings.ExteriorTime = FMath::Max<float>( 0.01f, AmbientZoneSettings.ExteriorTime ); AmbientZoneSettings.ExteriorLPFTime = FMath::Max<float>( 0.01f, AmbientZoneSettings.ExteriorLPFTime ); if (PropertyChangedEvent.Property && PropertyChangedEvent.Property->GetFName() == GET_MEMBER_NAME_CHECKED(AAudioVolume, Priority)) { GetWorld()->AudioVolumes.Sort([](const AAudioVolume& A, const AAudioVolume& B) { return (A.GetPriority() > B.GetPriority()); }); } if (PropertyChangedEvent.Property && PropertyChangedEvent.Property->GetFName() == GET_MEMBER_NAME_CHECKED(AAudioVolume, bEnabled)) { if (bEnabled) { AddProxy(); } else { RemoveProxy(); } } else if (bEnabled) { UpdateProxy(); } }
void AAudioVolume::OnRep_bEnabled() { if (bEnabled) { AddProxy(); } else { RemoveProxy(); } }
void AAudioVolume::PostRegisterAllComponents() { // Route update to super first. Super::PostRegisterAllComponents(); GetRootComponent()->TransformUpdated.AddUObject(this, &AAudioVolume::TransformUpdated); AddProxy(); UWorld* World = GetWorld(); World->AudioVolumes.Add(this); World->AudioVolumes.Sort([](const AAudioVolume& A, const AAudioVolume& B) { return (A.GetPriority() > B.GetPriority()); }); }
void AAudioVolume::SetEnabled(const bool bNewEnabled) { if (bNewEnabled != bEnabled) { bEnabled = bNewEnabled; if (bEnabled) { AddProxy(); } else { RemoveProxy(); } } }
bool VDUIDialogPlugins::OnLoaded() { AddProxy(&mList, IDC_LIST); mList.SetFullRowSelectEnabled(true); mList.InsertColumn(0, L"Module", 0); mList.InsertColumn(1, L"Type", 0); mList.InsertColumn(2, L"Name", 0); vdfastvector<FilterDefinitionInstance *> filters; VDEnumerateFilters(filters); while(!filters.empty()) { FilterDefinitionInstance *fdi = filters.back(); if (fdi->HasStaticAbout() || fdi->HasStaticConfigure()) { vdrefptr<FilterItem> fi(new FilterItem); fi->mpFDI = fdi; mList.InsertVirtualItem(-1, fi); } filters.pop_back(); } std::vector<VDPluginDescription *> descs; VDEnumeratePluginDescriptions(descs, kVDXPluginType_Input); VDEnumeratePluginDescriptions(descs, kVDXPluginType_Audio); while(!descs.empty()) { VDPluginDescription *desc = descs.back(); if (desc->mbHasStaticAbout || desc->mbHasStaticConfigure) { vdrefptr<PluginItem> pi(new PluginItem); pi->mpDesc = descs.back(); mList.InsertVirtualItem(-1, pi); } descs.pop_back(); } mList.AutoSizeColumns(); SetFocusToControl(IDC_LIST); return true; }
bool VDDialogEditAccelerators::OnLoaded() { VDSetDialogDefaultIcons(mhdlg); GetWindowRect(mhdlg, &mrInitial); mpHotKeyControl = VDGetUIHotKeyExControl((VDGUIHandle)GetControl(IDC_HOTKEY)); if (mpHotKeyControl) mpHotKeyControl->OnChange() += mDelegateHotKeyChanged(this, &VDDialogEditAccelerators::OnHotKeyChanged); mResizer.Init(mhdlg); mResizer.Add(IDOK, VDDialogResizerW32::kBR); mResizer.Add(IDCANCEL, VDDialogResizerW32::kBR); mResizer.Add(IDC_ADD, VDDialogResizerW32::kBR); mResizer.Add(IDC_REMOVE, VDDialogResizerW32::kBR); mResizer.Add(IDC_RESET, VDDialogResizerW32::kBL); mResizer.Add(IDC_HOTKEY, VDDialogResizerW32::kBC); mResizer.Add(IDC_STATIC_QUICKSEARCH, VDDialogResizerW32::kBL); mResizer.Add(IDC_STATIC_SHORTCUT, VDDialogResizerW32::kBL); mResizer.Add(IDC_STATIC_AVAILABLECOMMANDS, VDDialogResizerW32::kAnchorX2_C); mResizer.Add(IDC_STATIC_BOUNDCOMMANDS, VDDialogResizerW32::kAnchorX1_C | VDDialogResizerW32::kAnchorX2_R); mResizer.Add(IDC_AVAILCOMMANDS, VDDialogResizerW32::kAnchorX2_C | VDDialogResizerW32::kAnchorY2_B); mResizer.Add(IDC_BOUNDCOMMANDS, VDDialogResizerW32::kAnchorX1_C | VDDialogResizerW32::kAnchorX2_R | VDDialogResizerW32::kAnchorY2_B ); mResizer.Add(IDC_FILTER, VDDialogResizerW32::kAnchorY1_B | VDDialogResizerW32::kAnchorX2_C | VDDialogResizerW32::kAnchorY2_B); mResizer.Add(IDC_HOTKEY, VDDialogResizerW32::kBC); AddProxy(&mListViewBoundCommands, IDC_BOUNDCOMMANDS); mListViewBoundCommands.SetFullRowSelectEnabled(true); mListViewBoundCommands.InsertColumn(0, L"Command", 50); mListViewBoundCommands.InsertColumn(1, L"Shortcut", 50); mListViewBoundCommands.AutoSizeColumns(); RefilterCommands("*"); VDDialogFrameW32::OnLoaded(); SetFocusToControl(IDC_FILTER); return true; }