Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sugguestion only #11

Open
GoogleCodeExporter opened this issue Jul 2, 2015 · 2 comments
Open

sugguestion only #11

GoogleCodeExporter opened this issue Jul 2, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

It's a good project.
Thank you all firstly.

I have modified some codes ( as flowing shown) in PLViewBase to make more 
players to sync operations.
Do you think it's a cool (at least useful) function?

-(void)drawViewInternally
{

        NSMutableDictionary * nInfo = [[NSMutableDictionary alloc]init];
        PanoConfig * config = [[PanoConfig alloc]init];
        config.ownerViewId = viewId;
        config.startPoint = startPoint;
        config.endPoint = endPoint;
        [nInfo setObject:config forKey:OBJECT_KEY_PANO_CONFIG];
        [config release];

        [[NSNotificationCenter defaultCenter] postNotificationName:NOTIFICATION_PANO_CONFIG_CHANGED object:nil userInfo:nInfo];




}

#pragma mark -
#pragma mark panoConfigChanged methods

-(void)panoConfigChanged:(NSNotification *)n{
    NSNotification * notification = [n retain];
    NSDictionary * nInfo =[notification userInfo];
    if(nInfo != nil){

        if(scene && !isValidForFov && !isSensorialRotationRunning)
        {
            PanoConfig * panoConfig = (PanoConfig *)[nInfo objectForKey:OBJECT_KEY_PANO_CONFIG];

            if(panoConfig != nil && (isSyncOperationEnabled || viewId == panoConfig.ownerViewId)){
                NSLog(@"viewId==%d ownerId==%d",viewId,panoConfig.ownerViewId);
                PLCamera *camera = scene.currentCamera;
                [camera rotateWithStartPoint:panoConfig.startPoint endPoint:panoConfig.endPoint];
                if(delegate && [delegate respondsToSelector:@selector(view:didRotateCamera:rotation:)])
                    [delegate view:self didRotateCamera:camera rotation:[camera getAbsoluteRotation]];  
                if(renderer)
                    [renderer render];
            }


        }


    }
}

Original issue reported on code.google.com by [email protected] on 9 Jul 2012 at 6:44

@GoogleCodeExporter
Copy link
Author

I have found a strange thing.
when the touch began,
  [self stopAnimationInternally];
  [self startAnimation];
are called.

but when touch end, the stopAnimation isn't called...

so the drawView function is always running after touch end.

Why don't stop animation when touch end ???

Original comment by [email protected] on 9 Jul 2012 at 7:41

@GoogleCodeExporter
Copy link
Author

Yes you have reason about stopAnimation, I am using stopOnlyAnimation and I 
will fix this.


Original comment by [email protected] on 18 Jul 2012 at 1:00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant