本文整理汇总了C++中ReplaceReference函数的典型用法代码示例。如果您正苦于以下问题:C++ ReplaceReference函数的具体用法?C++ ReplaceReference怎么用?C++ ReplaceReference使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ReplaceReference函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReplaceReference
void ClustMod::Move(
TimeValue t, Matrix3& partm, Matrix3& tmAxis,
Point3& val, BOOL localOrigin)
{
#ifdef DESIGN_VER
t=0;
#endif
if (tmControl==NULL) {
ReplaceReference(0,NewDefaultMatrix3Controller());
NotifyDependents(FOREVER,0,REFMSG_CONTROLREF_CHANGE);
}
if (ip && ip->GetSubObjectLevel()==1) {
SetXFormPacket pckt(val,partm,tmAxis);
tmControl->SetValue(t,&pckt,TRUE,CTRL_RELATIVE);
} else {
if (posControl==NULL) {
ReplaceReference(1,NewDefaultPositionController());
NotifyDependents(FOREVER,0,REFMSG_CONTROLREF_CHANGE);
}
Matrix3 ptm = partm;
Interval valid;
if (tmControl)
tmControl->GetValue(t,&ptm,valid,CTRL_RELATIVE);
posControl->SetValue(t,-VectorTransform(tmAxis*Inverse(ptm),val),TRUE,CTRL_RELATIVE);
SetXFormPacket pckt(val,partm,tmAxis);
tmControl->SetValue(t,&pckt,TRUE,CTRL_RELATIVE);
}
}
示例2: ReplaceReference
BombMod::BombMod(INode *node,BombObject *obj)
{
obRef = NULL;
nodeRef = NULL;
ReplaceReference(OB_REF,obj);
ReplaceReference(NODE_REF,node);
}
示例3: ReplaceReference
void CellTex::Init()
{
if (xyzGen) xyzGen->Reset();
else ReplaceReference(1, GetNewDefaultXYZGen());
if (texout) texout->Reset();
else ReplaceReference(2, GetNewDefaultTextureOutput());
RegisterDistanceDefault(_T("Cellular Params"), _T("Size"), 5.0f, IN_TO_M(5.0f));
float size = GetDistanceDefault(_T("Cellular Params"), _T("Size"));
pblock->SetValue(cellular_size,0,size);
/*
pblock->SetValue(PB_CELLCOL,0,Point3(1,1,1));
pblock->SetValue(PB_DIVCOL1,0,Point3(.5f,.5f,.5f));
pblock->SetValue(PB_DIVCOL2,0,Point3(0,0,0));
pblock->SetValue(PB_SIZE,0,5.0f);
pblock->SetValue(PB_SPREAD,0,0.5f);
pblock->SetValue(PB_LOW,0,0.0f);
pblock->SetValue(PB_MID,0,0.5f);
pblock->SetValue(PB_HIGH,0,1.0f);
pblock->SetValue(PB_FRACT,0,0);
pblock->SetValue(PB_ITER,0,3.0f);
pblock->SetValue(PB_USECELLMAP,0,1);
pblock->SetValue(PB_USEDIV1MAP,0,1);
pblock->SetValue(PB_USEDIV2MAP,0,1);
pblock->SetValue(PB_SMOOTH,0,0.1f);
pblock->SetValue(PB_ADAPT,0,1);
if (paramDlg)
paramDlg->pmap->SetParamBlock(pblock);
*/
fract = 0;
ivalid.SetEmpty();
}
示例4: ReplaceReference
void Noise::Init() {
if (xyzGen) xyzGen->Reset();
else ReplaceReference( XYZGEN_REF, GetNewDefaultXYZGen());
if (texout) texout->Reset();
else ReplaceReference( TEXOUT_REF, GetNewDefaultTextureOutput());
ivalid.SetEmpty();
cacheValid.SetEmpty();
macroRecorder->Disable(); // disable macrorecorder during reset
SetColor(0, Color(0.0f,0.0f,0.0f), TimeValue(0));
SetColor(1, Color(1.0f,1.0f,1.0f), TimeValue(0));
noiseType = NOISE_REGULAR;
#ifndef RENDER_VER
RegisterDistanceDefault(_T("Noise Params"), _T("Size"), DEFAULT_NOISE_SIZE, IN_TO_M(DEFAULT_NOISE_SIZE));
float size = GetDistanceDefault(_T("Noise Params"), _T("Size"));
SetSize(size, TimeValue(0));
#else
SetSize(DEFAULT_NOISE_SIZE, TimeValue(0));
#endif
SetPhase(.0f,TimeValue(0));
SetLevels(3.0f,TimeValue(0));
pblock->SetValue(noise_hithresh,0,1.0f);
macroRecorder->Enable();
for (int i=0; i<NSUBTEX; i++)
mapOn[i] = 1;
}
示例5: ReplaceReference
SimpleOSMToWSMObject::SimpleOSMToWSMObject(SimpleMod *m)
{
mod = NULL;
pblock = NULL;
ivalid.SetEmpty();
ReplaceReference(0, m);
ReplaceReference(1, CreateParameterBlock(descObjVer1, PBLOCK_LENGTH, 1));
}
示例6: ReplaceReference
FExtrudeMod::FExtrudeMod()
{
base = NULL;
pblock = NULL;
ReplaceReference(PBLOCK_REF, CreateParameterBlock(descVer0, PBLOCK_LENGTH, CURRENT_VERSION));
ReplaceReference(POINT_REF,NewDefaultPoint3Controller());
pblock->SetValue(PB_SCALE,0,100.0f);
}
示例7: ReplaceReference
void Gradient::Init()
{
if (uvGen) uvGen->Reset();
else ReplaceReference( UVGEN_REF, GetNewDefaultUVGen());
if (texout) texout->Reset();
else ReplaceReference( TEXOUT_REF, GetNewDefaultTextureOutput());
ivalid.SetEmpty();
}
示例8: DeleteReference
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
}
示例9: ReplaceReference
SampleKFCtrl::SampleKFCtrl()
{
// Create default X & Y controllers. These classes are
// implementations of the Control class that generate float values.
mpXCtrl = NULL;
mpYCtrl = NULL;
ReplaceReference(kXCtrlRef, NewDefaultFloatController());
ReplaceReference(kYCtrlRef, NewDefaultFloatController());
}
示例10: ReplaceReference
CExtObject::CExtObject(BOOL loading)
{
ReplaceReference(0, CreateParameterBlock(CExtdescVer0, PBLOCK_LENGTH, CURRENT_VERSION));
pblock->SetValue(PB_TSEGS,0,dlgTSegs);
pblock->SetValue(PB_SSEGS,0,dlgSSegs);
pblock->SetValue(PB_BSEGS,0,dlgBSegs);
pblock->SetValue(PB_WSEGS,0,dlgWSegs);
pblock->SetValue(PB_HSEGS,0,dlgHSegs);
pblock->SetValue(PB_TOPLENGTH,0,crtTopLength);
pblock->SetValue(PB_SIDELENGTH,0,crtSideLength);
pblock->SetValue(PB_BOTLENGTH,0,crtBotLength);
pblock->SetValue(PB_TOPWIDTH,0,crtTopWidth);
pblock->SetValue(PB_SIDEWIDTH,0,crtSideWidth);
pblock->SetValue(PB_BOTWIDTH,0,crtBotWidth);
pblock->SetValue(PB_HEIGHT,0,crtHeight);
pblock->SetValue(PB_GENUVS,0,TRUE);
increate=FALSE;createmeth=0;
#ifdef PHYSICAL_SCALE_UVS
if (!loading && !GetPhysicalScaleUVsDisabled())
SetUsePhysicalScaleUVs(true);
#endif
}
示例11: ReplaceReference
BOOL AFRMod::AssignController(Animatable *control,int subAnim)
{
ReplaceReference(subAnim,(Control*)control);
NotifyDependents(FOREVER,PART_GEOM,REFMSG_CHANGE);
NotifyDependents(FOREVER,0,REFMSG_SUBANIM_STRUCTURE_CHANGED);
return TRUE;
}
示例12: ReplaceReference
void Output::Init() {
ivalid.SetEmpty();
if (texout) texout->Reset();
else ReplaceReference( 1, GetNewDefaultTextureOutput());
texout->SetRollupOpen(1);
mapOn[0] = 1;
}
示例13: ReplaceReference
FExtrudeMod::FExtrudeMod() {
mp_base = NULL;
mp_pblock = NULL;
ReplaceReference (kFEX_POINT_REF, NewDefaultPoint3Controller());
fextrudeDesc.MakeAutoParamBlocks(this);
}
示例14: ReplaceReference
void OrientConstRotation::Copy(Control *from)
{
if(GetLocked()==false)
{
Quat fvalRot;
if (from->ClassID()==ClassID()) {
OrientConstRotation *ctrl = (OrientConstRotation*)from;
// a copy will construct its own pblock to keep the pblock-to-owner 1-to-1.
ReplaceReference(ORIENT_ROT_PBLOCK_REF, CloneRefHierarchy(ctrl->pblock));
curRot = ctrl->curRot;
baseRotQuatLocal = ctrl->baseRotQuatLocal;
baseRotQuatWorld = ctrl->baseRotQuatWorld;
flags = ctrl->flags;
mLocked = ctrl->mLocked;
} else {
if(from&&GetLockedTrackInterface(from))
mLocked = GetLockedTrackInterface(from)->GetLocked();
from->GetValue(GetCOREInterface()->GetTime(), &fvalRot, Interval(0, 0)); // to know the object orientation before the
firstTimeFlag = 1;
baseRotQuatLocal = fvalRot;
baseRotQuatLocal.Normalize(); // current controller was active
}
ivalid.SetEmpty();
NotifyDependents(FOREVER,PART_ALL,REFMSG_CHANGE);
}
}
示例15: ReplaceReference
// This method is called to reset the texmap back to its default values.
void Planet::Init() {
// Reset the XYZGen or allocate a new one
if (xyzGen)
xyzGen->Reset();
else
ReplaceReference(0, GetNewDefaultXYZGen());
// ReplaceReference(1, CreateParameterBlock(pbdesc,
// PB_LENGTH, PLANET_PB_VERSION));
// if (paramDlg)
// paramDlg->pmap->SetParamBlock(pblock);
// Set the inital parameters
// {10,20,80},{10,30,80},{10,40,90},{10,100,12},
// {100,80,12},{80,20,8},{100,80,50},{100,100,100}
SetColor(0, Color(0.04f, 0.08f, 0.31f), TimeValue(0));
SetColor(1, Color(0.04f, 0.12f, 0.31f), TimeValue(0));
SetColor(2, Color(0.04f, 0.16f, 0.31f), TimeValue(0));
SetColor(3, Color(0.04f, 0.39f, 0.05f), TimeValue(0));
SetColor(4, Color(0.39f, 0.31f, 0.05f), TimeValue(0));
SetColor(5, Color(0.31f, 0.08f, 0.03f), TimeValue(0));
SetColor(6, Color(0.39f, 0.31f, 0.20f), TimeValue(0));
SetColor(7, Color(0.39f, 0.39f, 0.39f), TimeValue(0));
SetSize(40.0f, TimeValue(0));
SetIsland(0.5f, TimeValue(0));
SetPercent(60.0f, TimeValue(0));
SetSeed(12345, TimeValue(0));
blend = 1;
// Set the validity interval of the texture to empty
texValidity.SetEmpty();
}