Beispiel #1
0
bool EditorCamControllerInst::DoStart(SceneInst *psi, const CMatrix4 &world)
{
	const lev2::CCamera* pcam = mCD.GetCamera();
	if( GetEntity() )
	{
		const ent::EntData& ED = GetEntity()->GetEntData();
		PoolString name = ED.GetName();
		std::string Name = CreateFormattedString( "%s", name.c_str() );
 		psi->SetCameraData( AddPooledString(Name.c_str()), & pcam->GetCameraData() );
	}
	//printf( "STARTING EditorCamControllerInst\n" );
	return true;
}
Beispiel #2
0
bool ObserverCamControllerInst::DoStart(SceneInst *psi, const CMatrix4 &world)
{	
	if( GetEntity() )
	{
		const ent::EntData& ED = GetEntity()->GetEntData();
		PoolString name = ED.GetName();
		std::string Name = CreateFormattedString( "%s", name.c_str() );
 		psi->SetCameraData( AddPooledString(Name.c_str()), & mCameraData );
		
		
	}
	return true;
}
Beispiel #3
0
bool CompositingComponentInst::DoNotify(const ork::event::Event *event)
{
	if( const dataflow::morph_event* pme = rtti::autocast(event) )
	{
		mMorphable.HandleMorphEvent( pme );
	}
	else if( const ork::ent::PerfControlEvent* pce = rtti::autocast(event) )
	{
		const char* keyname = pce->mTarget.c_str();
		printf( "CompositingComponentInst<%p> PerfControlEvent<%p> key<%s>\n", this, pce, keyname );
		PoolString v = AddPooledString(pce->mValue.c_str());

		if( 0 == strcmp(keyname,"ActiveScene") )
		{	mCompositingData.GetActiveScene() = v;
			printf( "Apply Value<%s> to CompositingComponentInst<%p>.ActiveScene\n", v.c_str(), this );
		}
		else if( 0 == strcmp(keyname,"ActiveItem") )
		{	mCompositingData.GetActiveItem() = v;
			printf( "Apply Value<%s> to CompositingComponentInst<%p>.ActiveItem\n", v.c_str(), this );
		}
		
		return true;

	}
	else if( const ork::ent::PerfSnapShotEvent* psse = rtti::autocast(event) )
	{
		const PoolString& ActiveScene = mCompositingData.GetActiveScene();
		const PoolString& ActiveItem = mCompositingData.GetActiveItem();
		
		psse->PushNode( "ActiveScene" );
		{	
			ent::PerfSnapShotEvent::str_type NodeName = psse->GenNodeName();
			PerfProgramTarget* target = new PerfProgramTarget( NodeName.c_str(), ActiveScene.c_str() );
			psse->GetProgram()->AddTarget( NodeName.c_str(), target );
		}
		psse->PopNode();
		
		psse->PushNode( "ActiveItem" );
		{	
			ent::PerfSnapShotEvent::str_type NodeName = psse->GenNodeName();
			PerfProgramTarget* target = new PerfProgramTarget( NodeName.c_str(), ActiveItem.c_str() );
			psse->GetProgram()->AddTarget( NodeName.c_str(), target );
		}
		psse->PopNode();
		
	
	}
	return false;
}