本文整理汇总了C++中CModelerDoc::UpdateAllViews方法的典型用法代码示例。如果您正苦于以下问题:C++ CModelerDoc::UpdateAllViews方法的具体用法?C++ CModelerDoc::UpdateAllViews怎么用?C++ CModelerDoc::UpdateAllViews使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CModelerDoc
的用法示例。
在下文中一共展示了CModelerDoc::UpdateAllViews方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BrowseAttachement
BOOL CDlgPgInfoAttachingPlacement::BrowseAttachement( CAttachedModel *pam)
{
CModelerView *pModelerView = CModelerView::GetActiveView();
if(pModelerView == NULL) return FALSE;
CModelerDoc* pDoc = pModelerView->GetDocument();
CTFileName fnOldModel = pam->am_moAttachedModel.GetName();
CTFileName fnModel = _EngineGUI.FileRequester( "Select model to attach",
FILTER_MDL FILTER_END, "Attaching models directory",
_fnmApplicationPath + fnOldModel.FileDir(),
fnOldModel.FileName()+fnOldModel.FileExt());
if( fnModel == "") return FALSE;
try
{
pam->SetModel_t( fnModel);
}
catch( char *strError)
{
(void) strError;
return FALSE;
}
pam->am_bVisible = TRUE;
pDoc->ClearAttachments();
pDoc->SetupAttachments();
pDoc->SetModifiedFlag();
pDoc->UpdateAllViews( NULL);
UpdateData(FALSE);
return TRUE;
}
示例2: OnPreviousCollisionBox
void CDlgPgCollision::OnPreviousCollisionBox()
{
CModelerView *pModelerView = CModelerView::GetActiveView();
if(pModelerView == NULL) return;
CModelerDoc* pDoc = pModelerView->GetDocument();
pDoc->m_emEditModel.ActivatePreviousCollisionBox();
UpdateData(FALSE);
// update all views
pDoc->UpdateAllViews( NULL);
}
示例3: OnPreviousAttachingPlacement
void CDlgPgInfoAttachingPlacement::OnPreviousAttachingPlacement()
{
if( m_iActivePlacement <= 0) return;
m_iActivePlacement -= 1;
UpdateData(FALSE);
CModelerDoc* pDoc = theApp.GetDocument();
ASSERT( pDoc != NULL);
if( pDoc == NULL) return;
pDoc->UpdateAllViews( NULL);
}
示例4: OnCollideAsBox
void CDlgPgCollision::OnCollideAsBox()
{
CModelerView *pModelerView = CModelerView::GetActiveView();
if(pModelerView == NULL) return;
CModelerDoc* pDoc = pModelerView->GetDocument();
pDoc->m_emEditModel.edm_md.md_bCollideAsCube = !pDoc->m_emEditModel.edm_md.md_bCollideAsCube;
UpdateData(TRUE);
UpdateData(FALSE);
pDoc->SetModifiedFlag();
pDoc->UpdateAllViews( NULL);
}
示例5: OnAllignToSize
void CDlgPgCollision::OnAllignToSize()
{
CModelerView *pModelerView = CModelerView::GetActiveView();
if(pModelerView == NULL) return;
CModelerDoc* pDoc = pModelerView->GetDocument();
FLOATaabbox3D MaxBB;
pDoc->m_emEditModel.edm_md.GetAllFramesBBox( MaxBB);
pDoc->m_emEditModel.SetCollisionBox( MaxBB.Min(), MaxBB.Max());
UpdateData(FALSE);
pDoc->SetModifiedFlag();
pDoc->UpdateAllViews( NULL);
}
示例6: OnRemoveCollisionBox
void CDlgPgCollision::OnRemoveCollisionBox()
{
CModelerView *pModelerView = CModelerView::GetActiveView();
if(pModelerView == NULL) return;
CModelerDoc* pDoc = pModelerView->GetDocument();
pDoc->m_emEditModel.DeleteCurrentCollisionBox();
UpdateData(FALSE);
// document has been changed
pDoc->SetModifiedFlag();
// update all views
pDoc->UpdateAllViews( NULL);
}
示例7: OnNextAttachingPlacement
void CDlgPgInfoAttachingPlacement::OnNextAttachingPlacement()
{
CModelerDoc* pDoc = theApp.GetDocument();
ASSERT( pDoc != NULL);
if( pDoc == NULL) return;
CModelData *pMD = &pDoc->m_emEditModel.edm_md;
if( m_iActivePlacement < pDoc->m_emEditModel.edm_aamAttachedModels.Count()-1)
{
m_iActivePlacement += 1;
UpdateData(FALSE);
pDoc->UpdateAllViews( NULL);
}
}
示例8: OnIsVisible
void CDlgPgInfoAttachingPlacement::OnIsVisible()
{
if( m_iActivePlacement == -1) return;
CModelerDoc* pDoc = theApp.GetDocument();
ASSERT( pDoc != NULL);
if( pDoc == NULL) return;
pDoc->m_emEditModel.edm_aamAttachedModels.Lock();
CAttachedModel *pamAttachedModel =
&pDoc->m_emEditModel.edm_aamAttachedModels[ m_iActivePlacement];
pamAttachedModel->am_bVisible = !pamAttachedModel->am_bVisible;
pDoc->m_emEditModel.edm_aamAttachedModels.Unlock();
pDoc->ClearAttachments();
pDoc->SetupAttachments();
pDoc->SetModifiedFlag();
pDoc->UpdateAllViews( NULL);
UpdateData(FALSE);
}
示例9: OnSelchangeAttachmentModelAnimationCombo
void CDlgPgInfoAttachingPlacement::OnSelchangeAttachmentModelAnimationCombo()
{
if( m_iActivePlacement == -1) return;
CModelerDoc* pDoc = theApp.GetDocument();
ASSERT( pDoc != NULL);
if( pDoc == NULL) return;
INDEX iCombo = m_comboAttachmentModelAnimation.GetCurSel();
if( iCombo != CB_ERR)
{
pDoc->m_emEditModel.edm_aamAttachedModels.Lock();
CAttachedModel *pamAttachedModel =
&pDoc->m_emEditModel.edm_aamAttachedModels[ m_iActivePlacement];
pamAttachedModel->am_iAnimation = iCombo;
pDoc->m_emEditModel.edm_aamAttachedModels.Unlock();
}
pDoc->ClearAttachments();
pDoc->SetupAttachments();
pDoc->SetModifiedFlag();
pDoc->UpdateAllViews( NULL);
}
示例10: OnRemoveAttachingPlacement
void CDlgPgInfoAttachingPlacement::OnRemoveAttachingPlacement()
{
ASSERT( m_iActivePlacement != -1);
CModelerDoc* pDoc = theApp.GetDocument();
ASSERT( pDoc != NULL);
if( pDoc == NULL) return;
CModelData *pMD = &pDoc->m_emEditModel.edm_md;
pMD->md_aampAttachedPosition.Lock();
pDoc->m_emEditModel.edm_aamAttachedModels.Lock();
// get currently active placement from edit model
CAttachedModel *pamAttachedModel =
&pDoc->m_emEditModel.edm_aamAttachedModels[ m_iActivePlacement];
// and from model data
CAttachedModelPosition *pampModelPosition =
&pMD->md_aampAttachedPosition[ m_iActivePlacement];
pDoc->m_emEditModel.edm_aamAttachedModels.Unlock();
pMD->md_aampAttachedPosition.Unlock();
pDoc->ClearAttachments();
pDoc->m_emEditModel.edm_aamAttachedModels.Delete( pamAttachedModel);
pMD->md_aampAttachedPosition.Delete( pampModelPosition);
pDoc->SetupAttachments();
if( pDoc->m_emEditModel.edm_aamAttachedModels.Count() == 0)
{
m_iActivePlacement = -1;
}
if( m_iActivePlacement == pDoc->m_emEditModel.edm_aamAttachedModels.Count())
{
m_iActivePlacement = pDoc->m_emEditModel.edm_aamAttachedModels.Count()-1;
}
UpdateData(FALSE);
pDoc->SetModifiedFlag();
pDoc->UpdateAllViews( NULL);
}
示例11: ToggleMipFlag
void CDlgInfoPgMip::ToggleMipFlag( ULONG ulFlag)
{
CModelerView *pModelerView = CModelerView::GetActiveMappingNormalView();
ASSERT(pModelerView != NULL);
CModelerDoc *pDoc = pModelerView->GetDocument();
ASSERT(pDoc != NULL);
ModelMipInfo *pMMIFirst = &pDoc->m_emEditModel.edm_md.md_MipInfos[ pDoc->m_iCurrentMip];
BOOL bSetting = (pMMIFirst->mmpi_ulFlags & ulFlag) == 0;
// if setting, set just for this mip model
if( bSetting)
{
pMMIFirst->mmpi_ulFlags |= ulFlag;
}
// if clearing, clear for all further mip models
else
{
for( INDEX iMip=pDoc->m_iCurrentMip; iMip<pDoc->m_emEditModel.edm_md.md_MipCt; iMip++)
{
// get requested mip model
ModelMipInfo *pMMI = &pDoc->m_emEditModel.edm_md.md_MipInfos[ iMip];
// if setting, set just for this mip model
pMMI->mmpi_ulFlags &= ~ulFlag;
}
}
// for patcehs
if( ulFlag == MM_PATCHES_VISIBLE)
{
// reaclculate patch-polygon connections
pDoc->m_emEditModel.CalculatePatchesPerPolygon();
}
pDoc->UpdateAllViews(NULL);
UpdateData( FALSE);
}
示例12: DoDataExchange
//.........这里部分代码省略.........
GetDlgItem( IDC_SHADING_T)->EnableWindow( bSelectionExists);
GetDlgItem( IDC_DIFFUSE_COLOR_T)->EnableWindow( bSelectionExists);
GetDlgItem( IDC_REFLECTION_COLOR_T2)->EnableWindow( bSelectionExists);
GetDlgItem( IDC_SPECULAR_COLOR_T2)->EnableWindow( bSelectionExists);
GetDlgItem( IDC_BUMP_COLOR_T)->EnableWindow( bSelectionExists);
Invalidate( FALSE);
m_udAllValues.MarkUpdated();
}
//{{AFX_DATA_MAP(CDlgInfoPgRendering)
DDX_Control(pDX, IDC_TRANSLUCENCY, m_comboTranslucency);
DDX_Control(pDX, IDC_SHADING, m_comboShading);
DDX_Control(pDX, IDC_SPECULAR_COLOR, m_colorSpecular);
DDX_Control(pDX, IDC_REFLECTION_COLOR, m_colorReflections);
DDX_Control(pDX, IDC_DIFUSE_COLOR, m_colorDiffuse);
DDX_Control(pDX, IDC_BUMP_COLOR, m_colorBump);
DDX_Text(pDX, IDC_MIP_MODEL, m_strMipModel);
DDX_Text(pDX, IDC_SURFACE_NAME, m_strSurfaceName);
DDX_Control(pDX, IDC_DOUBLE_SIDED, m_IsDoubleSided);
DDX_Control(pDX, IDC_INVISIBLE, m_IsInvisible);
DDX_Control(pDX, IDC_USE_DIFUSE, m_IsDiffuse);
DDX_Control(pDX, IDC_USE_REFLECTIVITY, m_IsReflections);
DDX_Control(pDX, IDC_USE_SPECULAR, m_IsSpecular);
DDX_Control(pDX, IDC_USE_BUMP, m_IsBump);
DDX_Control(pDX, IDC_DETAIL, m_IsDetail);
//}}AFX_DATA_MAP
// set flags back to surface
#define TRI_STATE_CTRL_TO_FLAGS( ctrl, flag)\
if( (ctrl.GetCheck() == 1) && !(ms.ms_ulRenderingFlags & flag) ) {\
ms.ms_ulRenderingFlags |= flag;\
} else if( (ctrl.GetCheck() == 0) && (ms.ms_ulRenderingFlags & flag) ) {\
ms.ms_ulRenderingFlags &= ~flag;\
}
// if dialog gives data
if( pDX->m_bSaveAndValidate)
{
INDEX iComboShadow = m_comboShading.GetCurSel();
INDEX iComboTranslucency = m_comboTranslucency.GetCurSel();
ModelMipInfo &mmi = pDoc->m_emEditModel.edm_md.md_MipInfos[ pDoc->m_iCurrentMip];
for( INDEX iSurface=0; iSurface<mmi.mmpi_MappingSurfaces.Count(); iSurface++)
{
MappingSurface &ms = mmi.mmpi_MappingSurfaces[ iSurface];
ULONG ulFlagsBefore = ms.ms_ulRenderingFlags;
// skip non selected surfaces
if( !(ms.ms_ulRenderingFlags&SRF_SELECTED)) continue;
TRI_STATE_CTRL_TO_FLAGS( m_IsBump, SRF_BUMP);
TRI_STATE_CTRL_TO_FLAGS( m_IsDetail, SRF_DETAIL);
TRI_STATE_CTRL_TO_FLAGS( m_IsDiffuse, SRF_DIFFUSE);
TRI_STATE_CTRL_TO_FLAGS( m_IsReflections, SRF_REFLECTIONS);
TRI_STATE_CTRL_TO_FLAGS( m_IsSpecular, SRF_SPECULAR);
TRI_STATE_CTRL_TO_FLAGS( m_IsInvisible, SRF_INVISIBLE);
TRI_STATE_CTRL_TO_FLAGS( m_IsDoubleSided, SRF_DOUBLESIDED);
ULONG ulFlagsAfter = ms.ms_ulRenderingFlags;
BOOL bBumpSet = ((ulFlagsBefore&SRF_BUMP)!=(ulFlagsAfter&SRF_BUMP))&&(ulFlagsAfter&SRF_BUMP);
BOOL bDetailSet = ((ulFlagsBefore&SRF_DETAIL)!=(ulFlagsAfter&SRF_DETAIL))&&(ulFlagsAfter&SRF_DETAIL);
// if bump set
if( bBumpSet)
{
// turn off detail
ms.ms_ulRenderingFlags &= ~SRF_DETAIL;
theApp.m_chGlobal.MarkChanged();
}
// if detail set
if( bDetailSet)
{
// turn off bump
ms.ms_ulRenderingFlags &= ~SRF_BUMP;
theApp.m_chGlobal.MarkChanged();
}
switch( iComboShadow) {
case 0: ms.ms_sstShadingType=SST_FULLBRIGHT; break;
case 1: ms.ms_sstShadingType=SST_MATTE; break;
case 2: ms.ms_sstShadingType=SST_FLAT; break;
}
switch( iComboTranslucency) {
case 0: ms.ms_sttTranslucencyType=STT_OPAQUE; break;
case 1: ms.ms_sttTranslucencyType=STT_TRANSPARENT; break;
case 2: ms.ms_sttTranslucencyType=STT_TRANSLUCENT; break;
case 3: ms.ms_sttTranslucencyType=STT_ADD; break;
case 4: ms.ms_sttTranslucencyType=STT_INVMULTIPLY; break;
}
ms.ms_colDiffuse = m_colorDiffuse.GetColor();
ms.ms_colReflections = m_colorReflections.GetColor();
ms.ms_colSpecular = m_colorSpecular.GetColor();
ms.ms_colBump = m_colorBump.GetColor();
}
// update view
pDoc->m_emEditModel.edm_md.md_bPreparedForRendering = FALSE;
pDoc->SetModifiedFlag();
pDoc->UpdateAllViews( NULL);
}
}
示例13: DoDataExchange
//.........这里部分代码省略.........
m_EqualityRadio = 2;
if( !m_bCollideAsBox)
{
GetDlgItem( IDC_STATIC_LENGHT)->EnableWindow( FALSE);
GetDlgItem( IDC_EDIT_LENGHT)->EnableWindow( FALSE);
m_fLenght = m_fHeight;
}
break;
}
default:
{
ASSERTALWAYS( "None of collision dimensions are the same and that can't be.");
}
}
// mark that the values have been updated to reflect the state of the view
m_udAllValues.MarkUpdated();
}
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDlgPgCollision)
DDX_SkyFloat(pDX, IDC_EDIT_WIDTH, m_fWidth);
DDX_SkyFloat(pDX, IDC_EDIT_HEIGHT, m_fHeight);
DDX_SkyFloat(pDX, IDC_EDIT_LENGHT, m_fLenght);
DDX_SkyFloat(pDX, IDC_EDIT_XCENTER, m_fXCenter);
DDX_SkyFloat(pDX, IDC_EDIT_YDOWN, m_fYDown);
DDX_SkyFloat(pDX, IDC_EDIT_ZCENTER, m_fZCenter);
DDX_Radio(pDX, IDC_H_EQ_W, m_EqualityRadio);
DDX_Text(pDX, IDC_COLLISION_BOX_NAME, m_strCollisionBoxName);
DDX_Text(pDX, IDC_COLLISION_BOX_INDEX, m_strCollisionBoxIndex);
DDX_Check(pDX, IDC_COLLIDE_AS_BOX, m_bCollideAsBox);
//}}AFX_DATA_MAP
// if transfering data from dialog to document
if( pDX->m_bSaveAndValidate)
{
// if we are colliding using sphere approximation
if( !pDoc->m_emEditModel.edm_md.md_bCollideAsCube)
{
INDEX iEqualityType;
switch( m_EqualityRadio)
{
case 0:
{
iEqualityType = HEIGHT_EQ_WIDTH;
CString strWidth;
GetDlgItem( IDC_EDIT_WIDTH)->GetWindowText(strWidth);
GetDlgItem( IDC_EDIT_HEIGHT)->SetWindowText(strWidth);
break;
}
case 1:
{
iEqualityType = LENGTH_EQ_WIDTH;
CString strWidth;
GetDlgItem( IDC_EDIT_WIDTH)->GetWindowText(strWidth);
GetDlgItem( IDC_EDIT_LENGHT)->SetWindowText( strWidth );
break;
}
case 2:
{
iEqualityType = LENGTH_EQ_HEIGHT;
CString strHeight;
GetDlgItem( IDC_EDIT_HEIGHT)->GetWindowText(strHeight);
GetDlgItem( IDC_EDIT_LENGHT)->SetWindowText( strHeight);
break;
}
default:
{
ASSERTALWAYS( "Illegal value found in collision dimensions equality radio.");
}
}
// set collision equality value
if( pDoc->m_emEditModel.GetCollisionBoxDimensionEquality() != iEqualityType)
{
pDoc->m_emEditModel.SetCollisionBoxDimensionEquality( iEqualityType);
}
}
// set name of curently selected collision box
pDoc->m_emEditModel.SetCollisionBoxName( CTString( m_strCollisionBoxName) );
// get collision min and max vectors
FLOAT3D vMinCollisionBox;
FLOAT3D vMaxCollisionBox;
// get sizing values
vMinCollisionBox(1) = m_fXCenter-m_fWidth/2.0f;
vMinCollisionBox(2) = m_fYDown;
vMinCollisionBox(3) = m_fZCenter-m_fLenght/2.0f;
// get origin coordinates
vMaxCollisionBox(1) = m_fXCenter+m_fWidth/2.0f;
vMaxCollisionBox(2) = m_fYDown+m_fHeight;
vMaxCollisionBox(3) = m_fZCenter+m_fLenght/2.0f;
// transfer data from dialog to document
pDoc->m_emEditModel.SetCollisionBox( vMinCollisionBox, vMaxCollisionBox);
pDoc->SetModifiedFlag();
// update all views
pDoc->UpdateAllViews( NULL);
}
}
示例14: SetPlacementReferenceVertex
void CDlgPgInfoAttachingPlacement::SetPlacementReferenceVertex(INDEX iCenter, INDEX iFront, INDEX iUp)
{
// patch for calling before page is refreshed
if(this == NULL) return;
CModelerView *pModelerView = CModelerView::GetActiveView();
if(pModelerView == NULL) return;
CModelerDoc* pDoc = pModelerView->GetDocument();
CModelData *pMD = &pDoc->m_emEditModel.edm_md;
pMD->md_aampAttachedPosition.Lock();
CAttachedModelPosition & = pMD->md_aampAttachedPosition[ m_iActivePlacement];
// --------- Set axis-defining vertices, but swap if owerlaping
// Center vertex
if( iCenter != -1)
{
if(amp.amp_iFrontVertex == iCenter)
{
amp.amp_iFrontVertex = amp.amp_iCenterVertex;
}
else if(amp.amp_iUpVertex == iCenter)
{
amp.amp_iUpVertex = amp.amp_iCenterVertex;
}
amp.amp_iCenterVertex = iCenter;
}
// Front vertex
if( iFront != -1)
{
if(amp.amp_iCenterVertex == iFront)
{
amp.amp_iCenterVertex = amp.amp_iFrontVertex;
}
else if(amp.amp_iUpVertex == iFront)
{
amp.amp_iUpVertex = amp.amp_iFrontVertex;
}
amp.amp_iFrontVertex = iFront;
}
// Up vertex
if( iUp != -1)
{
if(amp.amp_iCenterVertex == iUp)
{
amp.amp_iCenterVertex = amp.amp_iUpVertex;
}
else if(amp.amp_iFrontVertex == iUp)
{
amp.amp_iFrontVertex = amp.amp_iUpVertex;
}
amp.amp_iUpVertex = iUp;
}
pMD->md_aampAttachedPosition.Unlock();
theApp.m_chGlobal.MarkChanged();
pDoc->ClearAttachments();
pDoc->SetupAttachments();
pDoc->SetModifiedFlag();
pDoc->UpdateAllViews( NULL);
}
示例15: DoDataExchange
//.........这里部分代码省略.........
GetDlgItem( IDC_ATTACHING_PLACEMENT_Z_OFFSET )->EnableWindow( bAttachmentExists);
GetDlgItem( IDC_ATTACHING_PLACEMENT_HEADING_T )->EnableWindow( bAttachmentExists);
GetDlgItem( IDC_ATTACHING_PLACEMENT_HEADING )->EnableWindow( bAttachmentExists);
GetDlgItem( IDC_ATTACHING_PLACEMENT_PITCH_T )->EnableWindow( bAttachmentExists);
GetDlgItem( IDC_ATTACHING_PLACEMENT_PITCH )->EnableWindow( bAttachmentExists);
GetDlgItem( IDC_ATTACHING_PLACEMENT_BANKING_T )->EnableWindow( bAttachmentExists);
GetDlgItem( IDC_ATTACHING_PLACEMENT_BANKING )->EnableWindow( bAttachmentExists);
GetDlgItem( IDC_IS_VISIBLE )->EnableWindow( bAttachmentExists);
GetDlgItem( IDC_BROWSE_MODEL )->EnableWindow( bAttachmentExists);
GetDlgItem( IDC_MODEL_T )->EnableWindow( bAttachmentExists);
GetDlgItem( IDC_ATTACHING_MODEL_T )->EnableWindow( bAttachmentExists);
GetDlgItem( IDC_MODEL_ANIMATION_T )->EnableWindow( bAttachmentExists);
GetDlgItem( IDC_ATTACHMENT_MODEL_ANIMATION_COMBO)->EnableWindow( bAttachmentExists);
GetDlgItem( IDC_VERTICES_T )->EnableWindow( bAttachmentExists);
GetDlgItem( IDC_ATTACHING_VERTICES )->EnableWindow( bAttachmentExists);
if( bAttachmentExists)
{
pMD->md_aampAttachedPosition.Lock();
pDoc->m_emEditModel.edm_aamAttachedModels.Lock();
CPlacement3D plCurrent = pMD->md_aampAttachedPosition[ m_iActivePlacement].amp_plRelativePlacement;
m_fHeading = DegAngle( plCurrent.pl_OrientationAngle(1));
m_fPitch = DegAngle( plCurrent.pl_OrientationAngle(2));
m_fBanking = DegAngle( plCurrent.pl_OrientationAngle(3));
m_fXOffset = plCurrent.pl_PositionVector(1);
m_fYOffset = plCurrent.pl_PositionVector(2);
m_fZOffset = plCurrent.pl_PositionVector(3);
CAttachedModel *pam = &pDoc->m_emEditModel.edm_aamAttachedModels[ m_iActivePlacement];
m_strName = pam->am_strName;
m_strAttachingModel = pam->am_moAttachedModel.GetName();
char achrLine[ 256];
sprintf( achrLine, "center:%d, front:%d, up:%d",
pMD->md_aampAttachedPosition[ m_iActivePlacement].amp_iCenterVertex,
pMD->md_aampAttachedPosition[ m_iActivePlacement].amp_iFrontVertex,
pMD->md_aampAttachedPosition[ m_iActivePlacement].amp_iUpVertex);
m_strAttachingVertices = achrLine;
sprintf( achrLine, "%d.", m_iActivePlacement);
m_strPlacementIndex = achrLine;
m_bIsVisible =
pDoc->m_emEditModel.edm_aamAttachedModels[ m_iActivePlacement].am_bVisible != 0;
pDoc->m_emEditModel.edm_aamAttachedModels.Unlock();
pMD->md_aampAttachedPosition.Unlock();
if( IsWindow( m_comboAttachmentModelAnimation.m_hWnd))
{
m_comboAttachmentModelAnimation.EnableWindow( m_bIsVisible);
FillAttachmentModelAnimationCombo();
}
// mark that the values have been updated to reflect the state of the view
m_udAllValues.MarkUpdated();
}
}
//{{AFX_DATA_MAP(CDlgPgInfoAttachingPlacement)
DDX_Control(pDX, IDC_ATTACHMENT_MODEL_ANIMATION_COMBO, m_comboAttachmentModelAnimation);
DDX_Text(pDX, IDC_ATTACHING_PLACEMENT_BANKING, m_fBanking);
DDX_Text(pDX, IDC_ATTACHING_PLACEMENT_HEADING, m_fHeading);
DDX_Text(pDX, IDC_ATTACHING_PLACEMENT_PITCH, m_fPitch);
DDX_Text(pDX, IDC_ATTACHING_PLACEMENT_X_OFFSET, m_fXOffset);
DDX_Text(pDX, IDC_ATTACHING_PLACEMENT_Y_OFFSET, m_fYOffset);
DDX_Text(pDX, IDC_ATTACHING_PLACEMENT_Z_OFFSET, m_fZOffset);
DDX_Text(pDX, IDC_ATTACHING_PLACEMENT_NAME, m_strName);
DDX_Text(pDX, IDC_ATTACHING_MODEL_T, m_strAttachingModel);
DDX_Text(pDX, IDC_ATTACHING_VERTICES, m_strAttachingVertices);
DDX_Text(pDX, IDC_ATTACHING_PLACEMENT_INDEX_T, m_strPlacementIndex);
DDX_Check(pDX, IDC_IS_VISIBLE, m_bIsVisible);
//}}AFX_DATA_MAP
// if transfering data from dialog to document
if( pDX->m_bSaveAndValidate)
{
if( m_iActivePlacement == -1) return;
pMD->md_aampAttachedPosition.Lock();
pDoc->m_emEditModel.edm_aamAttachedModels.Lock();
CPlacement3D plCurrent;
plCurrent.pl_OrientationAngle(1) = AngleDeg( m_fHeading);
plCurrent.pl_OrientationAngle(2) = AngleDeg( m_fPitch);
plCurrent.pl_OrientationAngle(3) = AngleDeg( m_fBanking);
plCurrent.pl_PositionVector(1) = m_fXOffset;
plCurrent.pl_PositionVector(2) = m_fYOffset;
plCurrent.pl_PositionVector(3) = m_fZOffset;
pMD->md_aampAttachedPosition[ m_iActivePlacement].amp_plRelativePlacement = plCurrent;
pDoc->m_emEditModel.edm_aamAttachedModels[ m_iActivePlacement].am_strName = CStringA(m_strName);
pDoc->m_emEditModel.edm_aamAttachedModels[ m_iActivePlacement].am_bVisible = m_bIsVisible;
pDoc->m_emEditModel.edm_aamAttachedModels.Unlock();
pMD->md_aampAttachedPosition.Unlock();
pDoc->ClearAttachments();
pDoc->SetupAttachments();
pDoc->SetModifiedFlag();
pDoc->UpdateAllViews( NULL);
}
}