Beispiel #1
0
EditorCamControllerInst::EditorCamControllerInst(const EditorCamControllerData& occd, Entity* pent )
	: ComponentInst( & occd, pent )
	, mCD( occd )
{
	const lev2::CCamera* pcam = mCD.GetCamera();
	CameraDrawable* pcamd = new CameraDrawable(pent,& pcam->GetCameraData()); // deleted when entity deleted
	//pent->AddDrawable(AddPooledLiteral("Debug"),pcamd);
	pcamd->SetOwner(pent);
	
//	CameraDrawable* pcamd = new CameraDrawable(pent,&mCameraData); // deleted when entity deleted
//	pent->AddDrawable(pcamd);
//	pcamd->SetOwner(pent);
	
}
Beispiel #2
0
ObserverCamControllerInst::ObserverCamControllerInst(const ObserverCamControllerData& occd, Entity* pent )
	: ComponentInst( & occd, pent )
	, mCD( occd )
	, mpTarget(0)
	, mpEye(0)
{
	CameraDrawable* pcamd = new CameraDrawable(pent,&mCameraData); // deleted when entity deleted
	//pent->AddDrawable(AddPooledLiteral("Default"),pcamd);
	pcamd->SetOwner(pent);
	
	mCameraData.Persp( 0.1f, 1.0f, 45.0f );
	mCameraData.Lookat( CVector3(0.0f,0.0f,0.0f), CVector3(0.0f,0.0f,1.0f), CVector3(0.0f,1.0f,0.0f) );

	printf( "OCCI<%p> camdat<%p> l2cam<%p>\n", this, & mCameraData, mCameraData.GetLev2Camera() );
}