本文整理汇总了C++中IParamBlock::SetValue方法的典型用法代码示例。如果您正苦于以下问题:C++ IParamBlock::SetValue方法的具体用法?C++ IParamBlock::SetValue怎么用?C++ IParamBlock::SetValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IParamBlock
的用法示例。
在下文中一共展示了IParamBlock::SetValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HelperObject
FogObject::FogObject() : HelperObject()
{
pblock = NULL;
IParamBlock* pb = CreateParameterBlock(descVer0, PB_FOG_LENGTH,
CURRENT_VERSION);
pb->SetValue(PB_TYPE, 0, 0);
pb->SetValue(PB_COLOR, 0, Point3(1,1,1));
pb->SetValue(PB_VIS_RANGE, 0, 0.0f);
pb->SetValue(PB_FOG_SIZE, 1, 1.0f);
ReplaceReference( 0, pb);
assert(pblock);
}
示例2: HelperObject
TouchSensorObject::TouchSensorObject() : HelperObject()
{
IParamBlock* pb = CreateParameterBlock(descVer0, PB_TS_LENGTH,
CURRENT_VERSION);
pb->SetValue(PB_TS_SIZE, 0, 0.0f);
pb->SetValue(PB_TS_ENABLED, 0, TRUE);
pb->SetValue(PB_TS_NUMOBJS, 0, 0);
MakeRefByID(FOREVER, 0, pb);
assert(pblock);
previousMode = NULL;
triggerObject = NULL;
objects.SetCount(0);
BuildObjectList(this);
}
示例3: HelperObject
ProxSensorObject::ProxSensorObject() : HelperObject()
{
pblock = NULL;
IParamBlock* pb = CreateParameterBlock(descVer0, PB_PS_PB_LENGTH,
CURRENT_VERSION);
pb->SetValue(PB_PS_LENGTH, 0, 0.0f);
pb->SetValue(PB_PS_WIDTH, 0, 0.0f);
pb->SetValue(PB_PS_HEIGHT, 0, 0.0f);
pb->SetValue(PB_PS_ENABLED, 0, TRUE);
pb->SetValue(PB_PS_NUMOBJS, 0, 0);
ReplaceReference( 0, pb);
assert(pblock);
previousMode = NULL;
objects.SetCount(0);
BuildObjectList(this);
}
示例4: Update
void WardShader::Update(TimeValue t, Interval &valid) {
Point3 p, p2;
if( inUpdate )
return;
inUpdate = TRUE;
if (!ivalid.InInterval(t)) {
ivalid.SetInfinite();
// pblock->GetValue( PB_AMBIENT_CLR, t, p, ivalid );
// ambient = LimitColor(Color(p.x,p.y,p.z));
pblock->GetValue( PB_DIFFUSE_CLR, t, p, ivalid );
diffuse= LimitColor(Color(p.x,p.y,p.z));
pblock->GetValue( PB_AMBIENT_CLR, t, p2, ivalid );
if( lockAD && (p!=p2)){
pblock->SetValue( PB_AMBIENT_CLR, t, diffuse);
ambient = diffuse;
} else {
pblock->GetValue( PB_AMBIENT_CLR, t, p, ivalid );
ambient = Bound(Color(p.x,p.y,p.z));
}
pblock->GetValue( PB_SPECULAR_CLR, t, p2, ivalid );
if( lockDS && (p!=p2)){
pblock->SetValue( PB_SPECULAR_CLR, t, diffuse);
specular = diffuse;
} else {
pblock->GetValue( PB_SPECULAR_CLR, t, p, ivalid );
specular = Bound(Color(p.x,p.y,p.z));
}
// pblock->GetValue( PB_SPECULAR_CLR, t, p, ivalid );
// specular = LimitColor(Color(p.x,p.y,p.z));
pblock->GetValue( PB_GLOSSINESS_X, t, glossinessX, ivalid );
LIMITMINMAX(glossinessX, 0.0001f, 1.0f );
pblock->GetValue( PB_GLOSSINESS_Y, t, glossinessY, ivalid );
LIMITMINMAX(glossinessY, 0.0001f, 1.0f );
pblock->GetValue( PB_SPECULAR_LEV, t, specLevel, ivalid );
LIMITMINMAX(specLevel,0.0f,4.00f);
pblock->GetValue( PB_DIFFUSE_LEV, t, diffLevel, ivalid );
LIMITMINMAX(diffLevel,0.0f,2.0f);
curTime = t;
}
valid &= ivalid;
inUpdate = FALSE;
}
示例5: HelperObject
BillboardObject::BillboardObject() : HelperObject()
{
pblock = NULL;
IParamBlock* pb = CreateParameterBlock(descVer0, PB_BB_LENGTH,
CURRENT_VERSION);
pb->SetValue(PB_BB_SCREEN_ALIGN, 0, FALSE);
ReplaceReference( 0, pb);
assert(pblock);
}
示例6:
void M3Mat::Reset()
{
// char s[25];
DeleteReference(101);
for(int i=0;i<100;i++)
{
DeleteReference(i);
mTex[i] = NULL;
// ReplaceReference(i,NewDefaultStdMat());
// sprintf(s,GetString(IDS_MTL_CNAME),i+1);
// mTex[i]->SetName(s);
}
ReplaceReference(100,NewDefaultStdMat());
mTex[100]->SetName(GetString(IDS_MTL_BASE));
ParamBlockDescID *descVer = new ParamBlockDescID[101];
for(int x=0;x<100;x++){
ParamBlockDescID add;
add.type=TYPE_FLOAT;
add.user=NULL;
add.animatable=TRUE;
add.id=x;
descVer[x] = add;
}
ParamBlockDescID add;
add.type=TYPE_INT;
add.user=NULL;
add.animatable=FALSE;
add.id=x;
descVer[x] = add; // x == 100 we guess?
IParamBlock *pblockMat = (IParamBlock*)CreateParameterBlock(descVer,101,1);
ReplaceReference(101,pblockMat);
//ReplaceReference(102,NULL);
delete [] descVer;
pblockMat->SetValue(100,0,0); // set param [100], the mystery param
}
示例7: HelperObject
Cal3DObject::Cal3DObject()
: HelperObject()
{
scale = 1.0f;
coreHelper = NULL;
cal3d_cfg = _T("");
if (cores == NULL)
cores = new Cal3DCoreHelpers();
pblock = NULL;
IParamBlock *pb = CreateParameterBlock(descVer0, PB_CAL_LENGTH,
CURRENT_VERSION);
pb->SetValue(PB_CAL_SIZE, 0, 1.0f);
pb->SetValue(PB_CAL_ANIM, 0, 0);
pb->SetValue(PB_CAL_ACTION, 0, 1);
#if MAX_PRODUCT_VERSION_MAJOR > 8
ReplaceReference(0, pb);
#else
MakeRefByID(FOREVER, 0, pb);
#endif
assert(pblock);
previousMode = NULL;
}
示例8: HelperObject
SwitchObject::SwitchObject()
: HelperObject()
{
pblock = NULL;
IParamBlock *pb = CreateParameterBlock(descVer0, PB_S_LENGTH,
CURRENT_VERSION);
pb->SetValue(PB_S_SIZE, 0, 0.0f);
pb->SetValue(PB_S_NUMOBJS, 0, 0);
pb->SetValue(PB_S_DEFAULT, 0, -1);
pb->SetValue(PB_S_ALLOW_NONE, 0, TRUE);
#if MAX_PRODUCT_VERSION_MAJOR > 8
ReplaceReference(0, pb);
#else
MakeRefByID(FOREVER, 0, pb);
#endif
assert(pblock);
previousMode = NULL;
// triggerObject = NULL;
objects.SetCount(0);
BuildObjectList(this);
needsScript = true;
}
示例9: HelperObject
BackgroundObject::BackgroundObject() : HelperObject()
{
IParamBlock* pb = CreateParameterBlock(descVer0, PB_BG_LENGTH,
CURRENT_VERSION);
pb->SetValue(PB_SKY_NUM_COLORS, 0, 0);
pb->SetValue(PB_SKY_COLOR1 , 0, Point3(0.0f, 0.0f, 1.0f));
pb->SetValue(PB_SKY_COLOR2 , 0, Point3(1.0f, 0.0f, 0.0f));
pb->SetValue(PB_SKY_COLOR3 , 0, Point3(0.0f, 1.0f, 0.0f));
pb->SetValue(PB_SKY_COLOR2_ANGLE, 0, float(PI/4.0));
pb->SetValue(PB_SKY_COLOR3_ANGLE, 0, float(PI/2.0));
pb->SetValue(PB_GROUND_NUM_COLORS, 0, 0);
pb->SetValue(PB_GROUND_COLOR1 , 0, Point3(0.7f, 0.4f, 0.3f));
pb->SetValue(PB_GROUND_COLOR2 , 0, Point3(1.0f, 0.0f, 0.0f));
pb->SetValue(PB_GROUND_COLOR3 , 0, Point3(0.0f, 1.0f, 0.0f));
pb->SetValue(PB_GROUND_COLOR2_ANGLE, 0, float(PI/4.0));
pb->SetValue(PB_GROUND_COLOR3_ANGLE, 0, float(PI/2.0));
MakeRefByID(FOREVER, 0, pb);
assert(pblock);
}
示例10: HelperObject
NavInfoObject::NavInfoObject() : HelperObject()
{
pblock = NULL;
IParamBlock* pb = CreateParameterBlock(descVer1, PB_NA_LENGTH,
CURRENT_VERSION);
pb->SetValue(PB_TYPE, 0, 0);
pb->SetValue(PB_HEADLIGHT, 0, FALSE);
pb->SetValue(PB_VIS_LIMIT, 0, 0.0f);
pb->SetValue(PB_SPEED, 0, 1.0f);
pb->SetValue(PB_COLLISION, 0, 0.25f);
pb->SetValue(PB_TERRAIN, 0, 1.6f);
pb->SetValue(PB_STEP, 0, 0.75f);
ReplaceReference( 0, pb);
assert(pblock);
}
示例11: SetChaos
void BombObject::SetChaos(TimeValue t, float f)
{
pblock->SetValue(PB_CHAOS, t, f);
NotifyDependents(FOREVER, PART_OBJ, REFMSG_CHANGE);
}
示例12: SetAmbientClr
void SetAmbientClr(Color c, TimeValue t)
{ ambient = c; pblock->SetValue( PB_AMBIENT_CLR, t, c); }
示例13: SetGlossinessY
void SetGlossinessY(float v, TimeValue t)
{ if( v<=ALPHA_MIN) v = ALPHA_MIN; glossinessY= v; pblock->SetValue( PB_GLOSSINESS_Y, t, v); }
示例14: SetDiffuseClr
void SetDiffuseClr(Color c, TimeValue t)
{ diffuse = c; pblock->SetValue( PB_DIFFUSE_CLR, t, c); }
示例15: SetGenUVW
void ExtrudeMod::SetGenUVW(BOOL sw) {
if (sw==HasUVW()) return;
pblock->SetValue(PB_MAPPING,0, sw);
UpdateUI();
}