本文整理汇总了C++中IParamMap类的典型用法代码示例。如果您正苦于以下问题:C++ IParamMap类的具体用法?C++ IParamMap怎么用?C++ IParamMap使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IParamMap类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EndEditParams
void TorusObject::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next )
{
SimpleObject::EndEditParams(ip,flags,next);
this->ip = NULL;
if (flags & END_EDIT_REMOVEUI ) {
if (pmapCreate) DestroyCPParamMap(pmapCreate);
if (pmapTypeIn) DestroyCPParamMap(pmapTypeIn);
DestroyCPParamMap(pmapParam);
pmapParam = NULL;
pmapTypeIn = NULL;
pmapCreate = NULL;
}
else
{
pmapTypeIn->SetUserDlgProc(nullptr);
pmapParam->SetUserDlgProc(nullptr);
pmapCreate->SetParamBlock(nullptr);
pmapTypeIn->SetParamBlock(nullptr);
pmapParam->SetParamBlock(nullptr);
}
// Save these values in class variables so the next object created will inherit them.
pblock->GetValue(PB_SIDES,ip->GetTime(),dlgSides,FOREVER);
pblock->GetValue(PB_SEGMENTS,ip->GetTime(),dlgSegments,FOREVER);
pblock->GetValue(PB_SMOOTH,ip->GetTime(),dlgSmooth,FOREVER);
pblock->GetValue(PB_RADIUS2,ip->GetTime(),dlgRadius2,FOREVER);
}
示例2: EndEditParams
void CExtObject::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next )
{
SimpleObject::EndEditParams(ip,flags,next);
this->ip = NULL;
if (flags & END_EDIT_REMOVEUI ) {
if (pmapCreate) DestroyCPParamMap(pmapCreate);
if (pmapTypeIn) DestroyCPParamMap(pmapTypeIn);
DestroyCPParamMap(pmapParam);
pmapParam = NULL;
pmapTypeIn = NULL;
pmapCreate = NULL;
}
else
{
pmapTypeIn->SetUserDlgProc(nullptr);
pmapParam->SetUserDlgProc(nullptr);
pmapCreate->SetParamBlock(nullptr);
pmapTypeIn->SetParamBlock(nullptr);
pmapParam->SetParamBlock(nullptr);
}
// Save these values in class variables so the next object created will inherit them.
pblock->GetValue(PB_TSEGS,ip->GetTime(),dlgTSegs,FOREVER);
pblock->GetValue(PB_SSEGS,ip->GetTime(),dlgSSegs,FOREVER);
pblock->GetValue(PB_BSEGS,ip->GetTime(),dlgBSegs,FOREVER);
pblock->GetValue(PB_WSEGS,ip->GetTime(),dlgWSegs,FOREVER);
pblock->GetValue(PB_HSEGS,ip->GetTime(),dlgHSegs,FOREVER);
}
示例3: BeginEditParams
void SWrapObject::BeginEditParams(
IObjParam *ip,ULONG flags,Animatable *prev)
{
this->ip = ip;
if (flags&BEGIN_EDIT_CREATE) {
creating = TRUE;
} else { creating = FALSE; }
if (pmapParam) {
// Left over
pmapParam->SetParamBlock(pblock);
} else {
hSot = ip->AddRollupPage(
hInstance,
MAKEINTRESOURCE(IDD_SW_DESC),
DefaultSOTProc,
GetString(IDS_AP_TOP),
(LPARAM)ip,APPENDROLL_CLOSED);
// Gotta make a new one.
pmapParam = CreateCPParamMap(
descParam,PARAMDESC_LENGTH,
pblock,
ip,
hInstance,
MAKEINTRESOURCE(IDD_AP_SURFWRAP),
GetString(IDS_AP_PARAMETERS),
0);
}
if (pmapParam)
pmapParam->SetUserDlgProc(new SWrapObjectDlgProc(this));
}
示例4: BeginEditParams
void PBombObject::BeginEditParams(
IObjParam *ip,ULONG flags,Animatable *prev)
{
SimpleWSMObject::BeginEditParams(ip,flags,prev);
this->ip = ip;
if (pmapParam) {
// Left over
pmapParam->SetParamBlock(pblock);
} else {
hSot = ip->AddRollupPage(
hInstance,
MAKEINTRESOURCE(IDD_SW_DESC_BOTH),
DefaultSOTProc,
GetString(IDS_RB_TOP),
(LPARAM)ip,APPENDROLL_CLOSED);
// Gotta make a new one.
pmapParam = CreateCPParamMap(
descParamBomb,BOMBPARAMDESC_LENGTH,
pblock,
ip,
hInstance,
MAKEINTRESOURCE(IDD_SW_PARTICLEBOMB),
GetString(IDS_RB_PARAMETERS),
0);
}
if (pmapParam) pmapParam->SetUserDlgProc(new PBombDlgProc(this));
}
示例5: NotifyRefChanged
RefResult MatMod::NotifyRefChanged(
const Interval& changeInt,
RefTargetHandle hTarget,
PartID& partID,
RefMessage message,
BOOL propagate)
{
switch (message) {
case REFMSG_CHANGE:
if (pmapParam && pmapParam->GetParamBlock()==pblock) {
pmapParam->Invalidate();
}
break;
case REFMSG_GET_PARAM_DIM: {
GetParamDim *gpd = (GetParamDim*)partID;
switch (gpd->index) {
case 0:
default: gpd->dim = defaultDim; break;
}
return REF_HALT;
}
case REFMSG_GET_PARAM_NAME: {
GetParamName *gpn = (GetParamName*)partID;
switch (gpn->index) {
case PB_MATID: gpn->name = GetString(IDS_RB_MATERIALID); break;
default: gpn->name = TSTR(_T("")); break;
}
return REF_HALT;
}
}
return REF_SUCCEED;
}
示例6: EndEditParams
// This is called by the system to terminate the editing of the
// parameters in the command panel.
void ChBoxObject::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next )
{
SimpleObject::EndEditParams(ip,flags,next);
this->ip = NULL;
if (flags & END_EDIT_REMOVEUI ) {
// Remove the rollup pages from the command panel.
if (pmapCreate) DestroyCPParamMap(pmapCreate);
if (pmapTypeIn) DestroyCPParamMap(pmapTypeIn);
DestroyCPParamMap(pmapParam);
pmapParam = NULL;
pmapTypeIn = NULL;
pmapCreate = NULL;
}
else
{
pmapTypeIn->SetUserDlgProc(nullptr);
pmapParam->SetUserDlgProc(nullptr);
pmapCreate->SetParamBlock(nullptr);
pmapTypeIn->SetParamBlock(nullptr);
pmapParam->SetParamBlock(nullptr);
}
// Save these values in class variables so the next object
// created will inherit them.
pblock->GetValue(PB_LSEGS,ip->GetTime(),dlgLSegs,FOREVER);
pblock->GetValue(PB_WSEGS,ip->GetTime(),dlgWSegs,FOREVER);
pblock->GetValue(PB_HSEGS,ip->GetTime(),dlgHSegs,FOREVER);
pblock->GetValue(PB_CSEGS,ip->GetTime(),dlgCSegs,FOREVER);
}
示例7: NotifyRefChanged
RefResult SpherifyMod::NotifyRefChanged(Interval changeInt,
RefTargetHandle hTarget, PartID& partID, RefMessage message) {
switch (message) {
case REFMSG_CHANGE:
if (pmap && pmap->GetParamBlock()==pblock) {
pmap->Invalidate();
}
break;
case REFMSG_GET_PARAM_DIM: {
GetParamDim *gpd = (GetParamDim*)partID;
switch (gpd->index) {
case PB_PERCENT:
gpd->dim = defaultDim;
break;
};
return REF_STOP;
}
case REFMSG_GET_PARAM_NAME: {
GetParamName *gpn = (GetParamName*)partID;
switch (gpn->index) {
case PB_PERCENT:
gpn->name = PERCENT_PARAM_NAME;
break;
};
return REF_STOP;
}
}
return REF_SUCCEED;
}
示例8: BeginEditParams
void PrismObject::BeginEditParams(IObjParam *ip,ULONG flags,Animatable *prev)
{
SimpleObject::BeginEditParams(ip,flags,prev);
this->ip = ip;
if (pmapCreate && pmapParam) {
// Left over from last Prism ceated
pmapCreate->SetParamBlock(this);
pmapTypeIn->SetParamBlock(this);
pmapParam->SetParamBlock(pblock);
} else {
// Gotta make a new one.
if (flags&BEGIN_EDIT_CREATE) {
pmapCreate = CreateCPParamMap(
descCreate,CREATEDESC_LENGTH,
this,
ip,
hInstance,
MAKEINTRESOURCE(IDD_PRISM1),
GetString(IDS_RB_CREATE_DIALOG),
0);
pmapTypeIn = CreateCPParamMap(
descTypeIn,TYPEINDESC_LENGTH,
this,
ip,
hInstance,
MAKEINTRESOURCE(IDD_PRISM2),
GetString(IDS_RB_KEYBOARDENTRY),
APPENDROLL_CLOSED);
}
pmapParam = CreateCPParamMap(
descParam,PARAMDESC_LENGTH,
pblock,
ip,
hInstance,
MAKEINTRESOURCE(IDD_PRISM3),
GetString(IDS_AP_PARAMETERS),
0);
}
if(pmapTypeIn) {
// A callback for the type in.
pmapTypeIn->SetUserDlgProc(new PrismTypeInDlgProc(this));
}
if(pmapParam) {
pmapParam->SetUserDlgProc(new PrismSideDlgProc(this));
}
}
示例9: NotifyRefChanged
RefResult OptMod::NotifyRefChanged(
Interval changeInt,
RefTargetHandle hTarget,
PartID& partID,
RefMessage message)
{
switch (message) {
case REFMSG_CHANGE: {
if (pmapParam && pmapParam->GetParamBlock()==pblock) {
pmapParam->Invalidate();
}
int man = FALSE;
if (pblock) pblock->GetValue(PB_MANUPDATE,0,man,FOREVER);
if (man) return REF_STOP;
break;
}
case REFMSG_GET_PARAM_DIM: {
GetParamDim *gpd = (GetParamDim*)partID;
switch (gpd->index) {
case PB_FACETHRESH1:
case PB_FACETHRESH2:
case PB_EDGETHRESH1:
case PB_EDGETHRESH2: gpd->dim = stdAngleDim; break;
case PB_MAXEDGE1:
case PB_MAXEDGE2: gpd->dim = stdWorldDim; break;
default: gpd->dim = defaultDim; break;
}
return REF_STOP;
}
case REFMSG_GET_PARAM_NAME: {
GetParamName *gpn = (GetParamName*)partID;
switch (gpn->index) {
case PB_FACETHRESH1: gpn->name = GetString(IDS_RB_FACETHRESHL1); break;
case PB_FACETHRESH2: gpn->name = GetString(IDS_RB_FACETHRESHL2); break;
case PB_EDGETHRESH1: gpn->name = GetString(IDS_RB_EDGETHRESHL1); break;
case PB_EDGETHRESH2: gpn->name = GetString(IDS_RB_EDGETHRESHL2); break;
case PB_BIAS1: gpn->name = GetString(IDS_RB_BIASL1); break;
case PB_BIAS2: gpn->name = GetString(IDS_RB_BIASL2); break;
case PB_MAXEDGE1: gpn->name = GetString(IDS_RB_MAXEDGE1); break;
case PB_MAXEDGE2: gpn->name = GetString(IDS_RB_MAXEDGE2); break;
default: gpn->name = TSTR(_T("")); break;
}
return REF_STOP;
}
}
return REF_SUCCEED;
}
示例10: BeginEditParams
void RectangleObject::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev)
{
SimpleSpline::BeginEditParams(ip,flags,prev);
this->ip = ip;
if (pmapCreate && pmapParam) {
// Left over from last shape ceated
pmapCreate->SetParamBlock(this);
pmapTypeIn->SetParamBlock(this);
pmapParam->SetParamBlock(pblock);
} else {
// Gotta make a new one.
if (flags&BEGIN_EDIT_CREATE) {
pmapCreate = CreateCPParamMap(
descCreate,CREATEDESC_LENGTH,
this,
ip,
hInstance,
MAKEINTRESOURCE(IDD_RECTANGLEPARAM1),
GetString(IDS_TH_CREATION_METHOD),
0);
pmapTypeIn = CreateCPParamMap(
descTypeIn,TYPEINDESC_LENGTH,
this,
ip,
hInstance,
MAKEINTRESOURCE(IDD_RECTANGLEPARAM3),
GetString(IDS_TH_KEYBOARD_ENTRY),
APPENDROLL_CLOSED);
}
pmapParam = CreateCPParamMap(
descParam,PARAMDESC_LENGTH,
pblock,
ip,
hInstance,
MAKEINTRESOURCE(IDD_RECTANGLEPARAM2),
GetString(IDS_TH_PARAMETERS),
0);
}
if(pmapTypeIn) {
// A callback for the type in.
pmapTypeIn->SetUserDlgProc(new RectangleTypeInDlgProc(this));
}
}
示例11: BeginEditParams
void WaveObject::BeginEditParams(IObjParam *ip,ULONG flags,Animatable *prev)
{
SimpleWSMObject::BeginEditParams(ip,flags,prev);
this->ip = ip;
if (pmapParam) {
// Left over from last SinWave ceated
pmapParam->SetParamBlock(pblock);
} else {
hSot = ip->AddRollupPage(
hInstance,
MAKEINTRESOURCE(IDD_SINWAVE_SOT),
DefaultSOTProc,
GetString(IDS_RB_SOT),
(LPARAM)ip,APPENDROLL_CLOSED);
// Gotta make a new one.
pmapParam = CreateCPParamMap(
descParamObj,OBJPARAMDESC_LENGH,
pblock,
ip,
hInstance,
MAKEINTRESOURCE(DialogID()),
GetString(IDS_RB_PARAMETERS),
0);
}
}
示例12: EndEditParams
void ForceObject::EndEditParams(IObjParam *ip,ULONG flags,Animatable *next)
{
SimpleWSMObject::EndEditParams(ip,flags,next);
this->ip = NULL;
if (flags & END_EDIT_REMOVEUI )
{
DestroyCPParamMap(pmapParam);
ip->DeleteRollupPage(hSot);
pmapParam = NULL;
}
else
{
pmapParam->SetUserDlgProc(nullptr);
pmapParam->SetParamBlock(nullptr);
}
}
示例13: UpdateUI
void ChBoxObject::UpdateUI()
{
if (ip == NULL)
return;
ChBoxParamDlgProc* dlg = static_cast<ChBoxParamDlgProc*>(pmapParam->GetUserDlgProc());
dlg->Update();
}
示例14: NotifyRefChanged
RefResult AFRMod::NotifyRefChanged(
Interval changeInt,RefTargetHandle hTarget,
PartID& partID, RefMessage message)
{
switch (message) {
case REFMSG_CHANGE:
if (editMod==this && pmapParam) pmapParam->Invalidate();
break;
case REFMSG_GET_PARAM_DIM: {
GetParamDim *gpd = (GetParamDim*)partID;
switch (gpd->index) {
case PB_FALLOFF: gpd->dim = stdWorldDim; break;
case PB_PINCH:
case PB_BUBBLE: gpd->dim = stdNormalizedDim; break;
}
return REF_STOP;
}
case REFMSG_GET_PARAM_NAME: {
GetParamName *gpn = (GetParamName*)partID;
switch (gpn->index) {
case PB_FALLOFF: gpn->name = GetString(IDS_AFR_FALLOFF); break;
case PB_PINCH: gpn->name = GetString(IDS_AFR_PINCH); break;
case PB_BUBBLE: gpn->name = GetString(IDS_AFR_BUBBLE); break;
}
return REF_STOP;
}
}
return REF_SUCCEED;
}
示例15: BuildMesh
void ChCylinderObject::BuildMesh(TimeValue t)
{
int segs, smooth, hsegs, capsegs,fsegs;
float radius,height,pie1, pie2,fillet;
int doPie, genUVs;
FixFillet(pblock,t,(pmapParam?pmapParam->GetHWnd():NULL),increate);
// Start the validity interval at forever and widdle it down.
ivalid = FOREVER;
pblock->GetValue(PB_FSEGS,t,fsegs,ivalid);
pblock->GetValue(PB_SIDES,t,segs,ivalid);
pblock->GetValue(PB_HSEGS,t,hsegs,ivalid);
pblock->GetValue(PB_CSEGS,t,capsegs,ivalid);
pblock->GetValue(PB_RADIUS,t,radius,ivalid);
pblock->GetValue(PB_HEIGHT,t,height,ivalid);
pblock->GetValue(PB_FILLET,t,fillet,ivalid);
pblock->GetValue(PB_SMOOTHON,t,smooth,ivalid);
pblock->GetValue(PB_SLICEFROM,t,pie1,ivalid);
pblock->GetValue(PB_SLICETO,t,pie2,ivalid);
pblock->GetValue(PB_SLICEON,t,doPie,ivalid);
pblock->GetValue(PB_GENUVS,t,genUVs,ivalid);
LimitValue(radius, MIN_RADIUS, MAX_RADIUS);
LimitValue(height, MIN_HEIGHT, MAX_HEIGHT);
LimitValue(fsegs, MIN_SEGMENTS, MAX_SEGMENTS);
LimitValue(hsegs, MIN_SEGMENTS, MAX_SEGMENTS);
LimitValue(capsegs, MIN_SEGMENTS, MAX_SEGMENTS);
LimitValue(segs, MIN_SIDES, MAX_SIDES);
LimitValue(smooth, 0, 1);
BuildChCylinderMesh(mesh,
segs, smooth, hsegs, capsegs, fsegs,doPie,
radius, fillet, height, pie1, pie2, genUVs);
}