Пример #1
0
void PtexViewer::frameView(bool reset)
{
    if (reset) _cam.reset();
    
    if (_displayFace>=0)
    {
        _cam.setLookAt(Vec3f(0.5, 0.5, 0));
        _cam.setDistance(1.41);
    }
    else
    {
        if (_mode3d && _envCube && reset)
        {
            _cam.setLookAt(Vec3f(0,0,0));
            _cam.setDistance(1e-4);
        }
        else
        {
            _cam.setLookAt(_bounds.getCenter());
            _cam.setDistance(_bounds.diagonal());
        }
    }
}
Пример #2
0
	void UIMethodsInit()
	{
		PosesInit();
		nameHandler = new NameHandler();
		fp = new vector< FixedPoint* >();
		//hl = new HumanLeg( point( 0.0f, 50.0f, 0.0f ), point( 0.0f, 0.0f, 0.0f ), point( 1.0f, 1.0f, 1.0f ) );
		//hlc = new HumanLegController( hl );
		pl = new Player( point( ((float)width)/2.0f, ((float)height)/2.0f, 0 ), point( 0.0f, 0.0f, 0.0f ) );
		selectedRect = new Rect( point( 0,0,0 ), point( 2000, 100, 0 ) );
		float pos[WAMS_PLAYER_DOF];
		pl->getPose( pos );
		//hlc->getPose( pos );
		keyframes.push_back( new Keyframe( pos, -1.0f ) );
		count = 0;
		cam.setLoc( 0, 0, -50 );
		cam.setLookAt( 0, 0, 50 );
		//cam2.setLoc( 0.0f, 300.0f, 0.0f );
		//cam.setLookAt( 0, 100, 0 );
	}