Amit-Thakkar / panoramagl

Automatically exported from code.google.com/p/panoramagl
0 stars 0 forks source link

sugguestion only #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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 youngpla...@yahoo.com.cn on 9 Jul 2012 at 6:44

GoogleCodeExporter commented 9 years ago
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 youngpla...@yahoo.com.cn on 9 Jul 2012 at 7:41

GoogleCodeExporter commented 9 years ago
Yes you have reason about stopAnimation, I am using stopOnlyAnimation and I 
will fix this.

Original comment by javbae...@gmail.com on 18 Jul 2012 at 1:00