From cae5c592caea91ed2290d5d54b5e04bbdc412d57 Mon Sep 17 00:00:00 2001 From: asha Date: Sat, 2 Jul 2016 20:28:50 +0800 Subject: [PATCH] lint fix and move to 1.0.0 --- MD360Player4iOS.podspec | 4 ++-- MD360Player4iOS/PlayerViewController.m | 6 +++--- MD360Player4iOS/VideoPlayerViewController.m | 2 +- MDVRLibrary/MDVRLibrary.xcodeproj/project.pbxproj | 2 +- MDVRLibrary/MDVRLibrary/MD360Renderer.h | 1 - MDVRLibrary/MDVRLibrary/MD360Renderer.m | 2 +- MDVRLibrary/MDVRLibrary/MDDome3D.m | 12 ++++++------ MDVRLibrary/MDVRLibrary/MDModeStrategy.m | 2 ++ MDVRLibrary/MDVRLibrary/MDProjectionStrategy.m | 10 +++++----- 9 files changed, 21 insertions(+), 20 deletions(-) diff --git a/MD360Player4iOS.podspec b/MD360Player4iOS.podspec index fed95ac..3c74753 100644 --- a/MD360Player4iOS.podspec +++ b/MD360Player4iOS.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "MD360Player4iOS" - s.version = "0.3.1" + s.version = "1.0.0" s.summary = "It is a lite library to render 360 degree panorama video for iOS." # This description is used to generate tags and improve search results. @@ -78,7 +78,7 @@ Pod::Spec.new do |s| # Supports git, hg, bzr, svn and HTTP. # - s.source = { :git => "https://github.com/ashqal/MD360Player4iOS.git", :tag => "0.3.1" } + s.source = { :git => "https://github.com/ashqal/MD360Player4iOS.git", :tag => "1.0.0" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # diff --git a/MD360Player4iOS/PlayerViewController.m b/MD360Player4iOS/PlayerViewController.m index f180d8e..cc6afb9 100644 --- a/MD360Player4iOS/PlayerViewController.m +++ b/MD360Player4iOS/PlayerViewController.m @@ -112,9 +112,9 @@ - (void) initParams:(NSURL*)url{ @"DOME180_UPPER",[NSNumber numberWithInt:MDModeProjectionDome180Upper], @"DOME230_UPPER",[NSNumber numberWithInt:MDModeProjectionDome230Upper], @"STEREO",[NSNumber numberWithInt:MDModeProjectionStereoSphere], - @"PLANE_FIT",[NSNumber numberWithInt:MDModeProjectionPlaneFit], - @"PLANE_CROP",[NSNumber numberWithInt:MDModeProjectionPlaneCrop], - @"PLANE_FULL",[NSNumber numberWithInt:MDModeProjectionPlaneFull], + //@"PLANE_FIT",[NSNumber numberWithInt:MDModeProjectionPlaneFit], + //@"PLANE_CROP",[NSNumber numberWithInt:MDModeProjectionPlaneCrop], + //@"PLANE_FULL",[NSNumber numberWithInt:MDModeProjectionPlaneFull], nil]; __block MDVRLibrary *blockVRLib = self.vrLibrary; diff --git a/MD360Player4iOS/VideoPlayerViewController.m b/MD360Player4iOS/VideoPlayerViewController.m index 17801eb..c7ead8f 100644 --- a/MD360Player4iOS/VideoPlayerViewController.m +++ b/MD360Player4iOS/VideoPlayerViewController.m @@ -62,7 +62,7 @@ - (void) initPlayer{ [config setContainer:self view:self.view]; // optional - [config projectionMode:MDModeProjectionDome180]; + [config projectionMode:MDModeProjectionStereoSphere]; [config displayMode:MDModeDisplayNormal]; [config interactiveMode:MDModeInteractiveTouch]; [config pinchEnabled:true]; diff --git a/MDVRLibrary/MDVRLibrary.xcodeproj/project.pbxproj b/MDVRLibrary/MDVRLibrary.xcodeproj/project.pbxproj index 2f4c53a..5ad9349 100644 --- a/MDVRLibrary/MDVRLibrary.xcodeproj/project.pbxproj +++ b/MDVRLibrary/MDVRLibrary.xcodeproj/project.pbxproj @@ -148,10 +148,10 @@ 5E1EE71E1CBEA5ED004E0B79 /* MDAbsObject3D.m */, 5E59F6371D242A6B002DADC9 /* MDSphere3D.m */, 5E59F6391D242AFC002DADC9 /* MDStereoSphere3D.m */, + 5E6151C21D277574008DAD4E /* MDDome3D.m */, 5E6151BF1D2768DD008DAD4E /* MDObject3DHelper.h */, 5E1EE7431CBEA832004E0B79 /* vrlibraw.bundle */, 5E6151C01D2768DD008DAD4E /* MDObject3DHelper.m */, - 5E6151C21D277574008DAD4E /* MDDome3D.m */, ); name = object3D; sourceTree = ""; diff --git a/MDVRLibrary/MDVRLibrary/MD360Renderer.h b/MDVRLibrary/MDVRLibrary/MD360Renderer.h index ebc4c76..5794cc5 100644 --- a/MDVRLibrary/MDVRLibrary/MD360Renderer.h +++ b/MDVRLibrary/MDVRLibrary/MD360Renderer.h @@ -17,7 +17,6 @@ @class MD360Renderer; @interface MD360RendererBuilder : NSObject - (void) setTexture:(MD360Texture*) texture; -- (void) setObject3D:(MDAbsObject3D*) object3D; - (void) setDisplayStrategyManager:(MDDisplayStrategyManager*) displayStrategyManager; - (void) setProjectionStrategyManager:(MDProjectionStrategyManager*) projectionStrategyManager; - (MD360Renderer*) build; diff --git a/MDVRLibrary/MDVRLibrary/MD360Renderer.m b/MDVRLibrary/MDVRLibrary/MD360Renderer.m index ccac607..e6ca9f8 100644 --- a/MDVRLibrary/MDVRLibrary/MD360Renderer.m +++ b/MDVRLibrary/MDVRLibrary/MD360Renderer.m @@ -155,7 +155,7 @@ @interface MD360RendererBuilder() @property (nonatomic,readonly) NSArray* directors; @property (nonatomic,readonly) MD360Texture* texture; @property (nonatomic,weak) MDDisplayStrategyManager* displayStrategyManager; -@property (nonatomic,weak) MDDisplayStrategyManager* projectionStrategyManager; +@property (nonatomic,weak) MDProjectionStrategyManager* projectionStrategyManager; @end @implementation MD360RendererBuilder diff --git a/MDVRLibrary/MDVRLibrary/MDDome3D.m b/MDVRLibrary/MDVRLibrary/MDDome3D.m index 46525ab..1eba4a4 100644 --- a/MDVRLibrary/MDVRLibrary/MDDome3D.m +++ b/MDVRLibrary/MDVRLibrary/MDDome3D.m @@ -9,8 +9,8 @@ #import "MDAbsObject3D.h" @interface MDDome3D(){ - float degree; - BOOL isUpper; + float mDegree; + BOOL mIsUpper; float prevRatio; float* pScaledTexCoordinateBuffer; float* mScaledTexCoordinateBuffer; @@ -27,8 +27,8 @@ - (instancetype)initWithSizeContext:(MDSizeContext*) sizeContext degree:(float) self = [super init]; if (self) { self.sizeContext = sizeContext; - self->degree = degree; - self->isUpper = isUpper; + self->mDegree = degree; + self->mIsUpper = isUpper; self->prevRatio = 1.0f; } return self; @@ -81,7 +81,7 @@ - (void) executeLoad { int generateDome (float radius, int numSlices, MDDome3D* object3D) { int i; int j; - float percent = object3D->degree / 360.0f; + float percent = object3D->mDegree / 360.0f; int numParallels = numSlices >> 1; int numVertices = ( numParallels + 1 ) * ( numSlices + 1 ); int numParallelActual = numParallels * percent; @@ -92,7 +92,7 @@ int generateDome (float radius, int numSlices, MDDome3D* object3D) { float* texCoords = malloc ( sizeof(float) * 2 * numVertices ); short* indices = malloc ( sizeof(short) * numIndices ); - int upper = object3D->isUpper ? 1 : -1; + int upper = object3D->mIsUpper ? 1 : -1; for ( i = 0; i < numParallelActual + 1; i++ ) { for ( j = 0; j < numSlices + 1; j++ ) { diff --git a/MDVRLibrary/MDVRLibrary/MDModeStrategy.m b/MDVRLibrary/MDVRLibrary/MDModeStrategy.m index 75bdf30..21632f0 100644 --- a/MDVRLibrary/MDVRLibrary/MDModeStrategy.m +++ b/MDVRLibrary/MDVRLibrary/MDModeStrategy.m @@ -61,8 +61,10 @@ - (void) switchMode{ [self switchMode:[nextMode intValue]]; } + #pragma mark abstract - (id) createStrategy:(int)mode{ return nil; } +- (NSArray*) createModes{ return nil; } @end diff --git a/MDVRLibrary/MDVRLibrary/MDProjectionStrategy.m b/MDVRLibrary/MDVRLibrary/MDProjectionStrategy.m index 2c9893c..ca19219 100644 --- a/MDVRLibrary/MDVRLibrary/MDProjectionStrategy.m +++ b/MDVRLibrary/MDVRLibrary/MDProjectionStrategy.m @@ -91,8 +91,8 @@ - (MD360Director*) createDirector:(int) index{ #pragma mark DomeProjection @interface DomeProjection : AbsProjectionMode{ - float degree; - BOOL isUpper; + float mDegree; + BOOL mIsUpper; } @property (nonatomic,strong) MDAbsObject3D* object3D; @property (nonatomic,weak) MDSizeContext* sizeContext; @@ -104,14 +104,14 @@ - (instancetype)initWithSizeContext:(MDSizeContext*) sizeContext degree:(float)d self = [super init]; if (self) { self.sizeContext = sizeContext; - self->degree = degree; - self->isUpper = isUpper; + self->mDegree = degree; + self->mIsUpper = isUpper; } return self; } - (void) on{ - self.object3D = [[MDDome3D alloc]initWithSizeContext:self.sizeContext degree:self->degree isUpper:self->isUpper]; + self.object3D = [[MDDome3D alloc]initWithSizeContext:self.sizeContext degree:self->mDegree isUpper:self->mIsUpper]; [MDObject3DHelper loadObj:self.object3D]; }