Beispiel #1
0
RelaxMod::RelaxMod() {
	pblock = NULL;
	ReplaceReference(0, CreateParameterBlock(descVer1, PBLOCK_LENGTH, CURRENT_VERSION));
	pblock->SetValue (PB_RELAX,		TimeValue(0), DEF_RELAX);
	pblock->SetValue (PB_ITER,		TimeValue(0), DEF_ITER);
	pblock->SetValue (PB_BOUNDARY,	TimeValue(0), DEF_BOUNDARY);
	pblock->SetValue (PB_SADDLE,	TimeValue(0), DEF_SADDLE);
	version = RELAXMOD_CURRENT_VERSION;
}
Beispiel #2
0
SimpleOSMToWSMObject::SimpleOSMToWSMObject(SimpleMod *m)
	{
	mod    = NULL;
	pblock = NULL;
	ivalid.SetEmpty();
	MakeRefByID(FOREVER,0,m);
	MakeRefByID(FOREVER, 1, 
		CreateParameterBlock(descObjVer1, PBLOCK_LENGTH, 1));
	}
Beispiel #3
0
void DonutObject::Init()
{
	ReadyInterpParameterBlock();		// Build the interpolations parameter block in SimpleSpline
	ReplaceReference(USERPBLOCK, CreateParameterBlock(descVer0, PBLOCK_LENGTH, CURRENT_VERSION));
	assert(pblock);
	
	pblock->SetValue(PB_RADIUS1,0,crtRadius1);
	pblock->SetValue(PB_RADIUS2,0,crtRadius2);
 	}
Beispiel #4
0
WaveMod::WaveMod(INode *node,WaveObject *obj)
	{	
	//MakeRefByID(FOREVER,SIMPWSMMOD_OBREF,obj);
	MakeRefByID(FOREVER,SIMPWSMMOD_NODEREF,node);	
	MakeRefByID(FOREVER, SIMPWSMMOD_PBLOCKREF, 
		CreateParameterBlock(descModVer0, MODPBLOCK_LENGTH, CURRENT_MODVERSION));
	obRef = NULL;
	pblock->SetValue(PB_FLEX, TimeValue(0), DEF_FLEX);
	}
Beispiel #5
0
EllipseObject::EllipseObject() : SimpleSpline() 
	{
	ReadyInterpParameterBlock();		// Build the interpolations parameter block in SimpleSpline
	MakeRefByID(FOREVER, USERPBLOCK, CreateParameterBlock(descVer0, PBLOCK_LENGTH, CURRENT_VERSION));
	assert(pblock);
	
	pblock->SetValue(PB_LENGTH,0,crtLength);
	pblock->SetValue(PB_WIDTH,0,crtWidth);	
 	}
Beispiel #6
0
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);
    
}
Beispiel #7
0
RectangleObject::RectangleObject() : SimpleSpline() 
	{
	ReadyInterpParameterBlock();		// Build the interpolations parameter block in SimpleSpline
	ReplaceReference(USERPBLOCK, CreateParameterBlock(descVer1, PBLOCK_LENGTH, CURRENT_VERSION));
	assert(pblock);
	
	pblock->SetValue(PB_LENGTH,0,crtLength);
	pblock->SetValue(PB_WIDTH,0,crtWidth);	
	pblock->SetValue(PB_FILLET,0,crtFillet);	
 	}
Beispiel #8
0
NormalMod::NormalMod()
   {  
   pblock = NULL;
   ReplaceReference(0, CreateParameterBlock(descNormVer0, NORMPBLOCK_LENGTH, CURRENT_NORMVERSION));  
   pblock->SetValue(PB_FLIP,0,1);
   version = NORMALMOD_CURRENT_VERSION;
#ifdef WEBVERSION // russom - 04/29/02
   pblock->SetValue(PB_FLIP,0,1);
#endif
   }
Beispiel #9
0
TriPatchObject::TriPatchObject() 
	{
	MakeRefByID(FOREVER, 0, CreateParameterBlock(descVer1, PBLOCK_LENGTH, CURRENT_VERSION));

	pblock->SetValue(PB_LENGTH,0,crtLength);
	pblock->SetValue(PB_WIDTH,0,crtWidth);
	pblock->SetValue(PB_TEXTURE,0,dlgTexture);

	ivalid.SetEmpty();
	creating = 0;	
	}
Beispiel #10
0
MirrorMod::MirrorMod() 
	{
	tmControl  = NULL; 	
	pblock     = NULL;
	MakeRefByID(
		FOREVER, PBLOCK_REF, 
		CreateParameterBlock(
			descVer1, PBLOCK_LENGTH, CURRENT_VERSION));	
	MakeRefByID(FOREVER,TM_REF,NewDefaultMatrix3Controller()); 
	splineMethod = SPLINE_NOREVERSE;
	}
Beispiel #11
0
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

	}
Beispiel #12
0
BombObject::BombObject()
	{
	pblock = NULL;
	ReplaceReference(0,CreateParameterBlock(descV2,10,BOMB_VERSION));	
	pblock->SetValue(PB_STRENGTH, TimeValue(0), 1.0f);
	pblock->SetValue(PB_GRAVITY, TimeValue(0), 1.0f);
	pblock->SetValue(PB_DETONATION, TimeValue(0), 800); 
	pblock->SetValue(PB_MINFRAG, TimeValue(0), 1); 
	pblock->SetValue(PB_MAXFRAG, TimeValue(0), 1); 
	pblock->SetValue(PB_FALLOFF, TimeValue(0), 100.0f); 
	BuildMesh(TimeValue(0),mesh);
	mesh.EnableEdgeList(1);
	}
Beispiel #13
0
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);
    
}
Beispiel #14
0
OptMod::OptMod()
	{	
	MakeRefByID(FOREVER, 0, 
		CreateParameterBlock(descVer2, PBLOCK_LENGTH, CURRENT_VERSION));	
	pblock->SetValue(PB_FACETHRESH1,0,DegToRad(4.0f));
	pblock->SetValue(PB_EDGETHRESH1,0,DegToRad(1.0f));
	pblock->SetValue(PB_BIAS1,0,0.1f);
	pblock->SetValue(PB_FACETHRESH2,0,DegToRad(4.0f));
	pblock->SetValue(PB_EDGETHRESH2,0,DegToRad(1.0f));
	pblock->SetValue(PB_BIAS2,0,0.1f);
	pblock->SetValue(PB_MANUPDATE,0,0);
	forceUpdate = FALSE;
	}
Beispiel #15
0
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);
}
Beispiel #16
0
HelixObject::HelixObject() : SimpleShape() 
	{
	ReadyGeneralParameters();		// Build the general parameter block in SimpleShape
	MakeRefByID(FOREVER, USERPBLOCK, CreateParameterBlock(descVer0, PBLOCK_LENGTH, CURRENT_VERSION));
	assert(pblock);
	
	pblock->SetValue(PB_RADIUS1,0,crtRadius1);
	pblock->SetValue(PB_RADIUS2,0,crtRadius2);
	pblock->SetValue(PB_HEIGHT,0,crtHeight);
	pblock->SetValue(PB_TURNS,0,dlgTurns);
	pblock->SetValue(PB_BIAS,0,dlgBias);
	pblock->SetValue(PB_DIRECTION,0,dlgDirection);

	interpValid.SetEmpty();
 	}
Beispiel #17
0
AFRMod::AFRMod() 
	{
	MakeRefByID(
		FOREVER, PBLOCK_REF, 
		CreateParameterBlock(
			descVer0, PBLOCK_LENGTH, CURRENT_VERSION));
	
	p1 = p2 = NULL;
	MakeRefByID(FOREVER,POINT1_REF,NewDefaultPoint3Controller()); 
	MakeRefByID(FOREVER,POINT2_REF,NewDefaultPoint3Controller());
	sel[0] = sel[1] = 0;
	pblock->SetValue(PB_FALLOFF,0,20.0f);
	Point3 pt(0,0,25);
	p2->SetValue(0,&pt);
	}
Beispiel #18
0
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);
}
Beispiel #19
0
PrismObject::PrismObject() 
	{
	ReplaceReference(0, CreateParameterBlock(PrismdescVer0, PBLOCK_LENGTH, CURRENT_VERSION));
	
	pblock->SetValue(PB_S1SEGS,0,dlgSide1Segs);
	pblock->SetValue(PB_S2SEGS,0,dlgSide2Segs);
	pblock->SetValue(PB_S3SEGS,0,dlgSide3Segs);
	pblock->SetValue(PB_HSEGS,0,dlgHSegs);

	pblock->SetValue(PB_SIDE1,0,crtSide1);
	pblock->SetValue(PB_SIDE2,0,crtSide2);
	pblock->SetValue(PB_SIDE3,0,crtSide3);
	pblock->SetValue(PB_HEIGHT,0,crtHeight);
	pblock->SetValue(PB_GENUVS,0, TRUE);				
	isdone=FALSE;
	}
Beispiel #20
0
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);
    
}
Beispiel #21
0
void WardShader::Reset()
{
	ReplaceReference( 0, CreateParameterBlock( WardShaderPB, WARD_SHADER_NPARAMS, WARD_SHADER_PB_VERSION ) );	
	ivalid.SetEmpty();
	SetAmbientClr(Color(0.1f,0.1f,0.1f),0);
	SetDiffuseClr(Color(0.5f,0.5f,0.5f),0);
	SetSpecularClr(Color(0.9f,0.9f,0.9f),0);
	SetGlossiness(.25f,0);   // change from .4, 5-21-97
	SetGlossinessY(.25f,0);   
	SetSpecularLevel(0.05f,0);   
	SetDiffuseLevel(0.8f,0);   

	SetLockADTex( TRUE );
	SetLockAD( FALSE );
	SetLockDS( FALSE );
	SetNormalizeOn( TRUE );
}
bhkRigidBodyIfcHelper::bhkRigidBodyIfcHelper()
{
   rbpblock = CreateParameterBlock(gRigidBlockParamDesc, descRigidBodyDescIDLength, 1);
   rbpblock->SetValue(PB_RB_MATERIAL, 0, NP_DEFAULT_HVK_MATERIAL);
   rbpblock->SetValue(PB_RB_LAYER,0,NP_DEFAULT_HVK_LAYER);
   rbpblock->SetValue(PB_RB_MASS,0,NP_DEFAULT_HVK_MASS);
   rbpblock->SetValue(PB_RB_FRICTION,0,NP_DEFAULT_HVK_FRICTION);
   rbpblock->SetValue(PB_RB_RESTITUTION,0,NP_DEFAULT_HVK_RESTITUTION);
   rbpblock->SetValue(PB_RB_LINEAR_DAMPING,0,NP_DEFAULT_HVK_LINEAR_DAMPING);
   rbpblock->SetValue(PB_RB_ANGULAR_DAMPING,0,NP_DEFAULT_HVK_ANGULAR_DAMPING);
   rbpblock->SetValue(PB_RB_MAX_LINEAR_VELOCITY,0,NP_DEFAULT_HVK_MAX_LINEAR_VELOCITY);
   rbpblock->SetValue(PB_RB_MAX_ANGULAR_VELOCITY,0,NP_DEFAULT_HVK_MAX_ANGULAR_VELOCITY);
   rbpblock->SetValue(PB_RB_PENETRATION_DEPTH,0,NP_DEFAULT_HVK_PENETRATION_DEPTH);
   rbpblock->SetValue(PB_RB_MOTION_SYSTEM,0,NP_DEFAULT_HVK_MOTION_SYSTEM);
   rbpblock->SetValue(PB_RB_QUALITY_TYPE,0,NP_DEFAULT_HVK_QUALITY_TYPE);
   rbpblock->SetValue(PB_RB_ENABLE_TRANS,0,TRUE);

}
Beispiel #23
0
PyramidObject::PyramidObject(BOOL loading) 
	{
	ReplaceReference(0, CreateParameterBlock(PyramiddescVer0, PBLOCK_LENGTH, CURRENT_VERSION));
	
	pblock->SetValue(PB_WSEGS,0,dlgWSegs);
	pblock->SetValue(PB_DSEGS,0,dlgDSegs);	
	pblock->SetValue(PB_HSEGS,0,dlgHSegs);	

	pblock->SetValue(PB_WIDTH,0,crtWidth);
	pblock->SetValue(PB_DEPTH,0,crtDepth);
	pblock->SetValue(PB_HEIGHT,0,crtHeight);

	pblock->SetValue(PB_GENUVS,0,TRUE);
#ifdef PHYSICAL_SCALE_UVS
	if (!loading && !GetPhysicalScaleUVsDisabled())
		SetUsePhysicalScaleUVs(true);
#endif
	}
Beispiel #24
0
PBombObject::PBombObject()
{
	int FToTick=(int)((float)TIME_TICKSPERSEC/(float)GetFrameRate());
	MakeRefByID(FOREVER, 0, 
		CreateParameterBlock(descVer1, PBLOCK_LENGTH, CURRENT_VERSION));
	assert(pblock);	
	ff = NULL;
	mf = NULL;

	pblock->SetValue(PB_SYMMETRY,0,0);
	pblock->SetValue(PB_CHAOS,0,0.10f);
	pblock->SetValue(PB_STARTTIME,0,FToTick*30);
	pblock->SetValue(PB_LASTSFOR,0,FToTick);
	pblock->SetValue(PB_DELTA_V,0,1.0f);
	pblock->SetValue(PB_DECAY,0,1000.0f);
	pblock->SetValue(PB_DECAYTYPE,0,1);
	srand(12345);
}
Beispiel #25
0
SWrapObject::SWrapObject()
{ TimeValue tpf=GetTicksPerFrame();
	MakeRefByID(FOREVER, 0, 
		CreateParameterBlock(SWrapdescVer0, PBLOCK_LENGTH, CURRENT_VERSION));
	assert(pblock);	

	cmValid.SetEmpty();
	srand(12345);
	custname=TSTR(_T(" "));
	custnode=NULL;
	cmesh=NULL;
	tm.IdentityMatrix();
	vnorms.ZeroCount();
	fnorms.ZeroCount();
	pblock->SetValue(PB_KIDEFAULT,0,0.0f);
	pblock->SetValue(PB_USESELVERTS,0,0);
	pblock->SetValue(PB_STANDOFF,0,1.0f);
}
Beispiel #26
0
TorusObject::TorusObject(BOOL loading)
	{
	SetAFlag(A_PLUGIN1);
	ReplaceReference(0, CreateParameterBlock(descVer3, PBLOCK_LENGTH, CURRENT_VERSION));
	assert(pblock);

	pblock->SetValue(PB_SMOOTH,0,dlgSmooth);
	pblock->SetValue(PB_SEGMENTS,0,dlgSegments);
	pblock->SetValue(PB_SIDES,0,dlgSides);	
	pblock->SetValue(PB_RADIUS,0,crtRadius1);
	pblock->SetValue(PB_RADIUS2,0,crtRadius2);	
	pblock->SetValue(PB_GENUVS,0,TRUE);

#ifdef PHYSICAL_SCALE_UVS
	if (!loading && !GetPhysicalScaleUVsDisabled())
		SetUsePhysicalScaleUVs(true);
#endif
	}
Beispiel #27
0
TapeHelpObject::TapeHelpObject() : HelperObject()
{
    ParamBlockDesc desc[] = {
        { TYPE_FLOAT, NULL, TRUE }
    };

    // RB: Need to make a reference to the parameter block!
    pblock = NULL;
    ReplaceReference( 0, CreateParameterBlock( desc, 1 ));

    enable = 0;
    editting = 0;
    lastDist = 0.0f;
    SetLength( TimeValue(0), dlgLength );
    specLenState = dlgSpecLen;
    BuildMesh();
    dirPt.x = dirPt.y = dirPt.z = 0.0f;
}
Beispiel #28
0
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);
}
Beispiel #29
0
bool EllipseObject::SpecifySaveReferences(ReferenceSaveManager& referenceSaveManager)
{
	// if saving to previous version that used pb1 instead of pb2...
	DWORD saveVersion = GetSavingVersion();
	if (saveVersion != 0 && saveVersion <= MAX_RELEASE_R14)
	{
		// create the pb1 instance
		IParamBlock* paramBlock1 = CreateParameterBlock(descVer0, NUM_PARAM_V0, 0);
		DbgAssert(paramBlock1 != NULL);
		if (paramBlock1)
		{
			// copy data from the pb2 to the pb1
			int numParamsCopied = CopyParamBlock2ToParamBlock( myParamBlock, paramBlock1, descVer0, NUM_PARAM_V0);
			
			// register the reference slot replacement
			referenceSaveManager.ReplaceReferenceSlot(USERPBLOCK, paramBlock1);
		}
	}
	return SimpleSpline::SpecifySaveReferences(referenceSaveManager);
}
Beispiel #30
0
ChCylinderObject::ChCylinderObject() 
	{
	MakeRefByID(FOREVER, 0, CreateParameterBlock(chcyldescVer0, PBLOCK_LENGTH, CURRENT_VERSION));
	
	pblock->SetValue(PB_RADIUS,0,crtRadius);
	pblock->SetValue(PB_HEIGHT,0,crtHeight);
	pblock->SetValue(PB_FILLET,0,crtFillet);
	pblock->SetValue(PB_HSEGS,0,dlgHSegs);
	pblock->SetValue(PB_FSEGS,0,dlgFSegs);
	pblock->SetValue(PB_SIDES,0,dlgSides);
	pblock->SetValue(PB_CSEGS,0,dlgCSegs);
	pblock->SetValue(PB_SMOOTHON,0,dlgSmooth);
	pblock->SetValue(PB_SLICEON,0,dlgSlice);
	pblock->SetValue(PB_SLICEFROM,0,crtSliceFrom);
	pblock->SetValue(PB_SLICETO,0,crtSliceTo);

	pblock->SetValue(PB_GENUVS,0,TRUE);

	increate=FALSE;
	}