ios - CITransform vs CATransforms which and when to use? -
i need draw overlay on camera, on every frame draws arrow different direction.
now understand, because of processing every frame, should using core graphics drawing, besides drawing arrow need give perspective effect depending on camera orientation.
i managed overlay png on every frame transformed using cifilter ciperspectivetransform.
but going next level "drawing" arrow , not sure better apply. should draw arrow , convert ciimage , follow known path of applying ciperspectivetransform or should dive core animation , if so... equivalent of ciperspectivetransform in core animations world.
core animation doesn't perspective default. best suited 2d animation. however, possible. transformation matrix core animation catransform3d type.
in order perspective work have manually set .m34 field of catransform3d small negative value. if google search on "catransform3d m34" should find info on how 3d perspective core animation layers.
i haven't used core image's ciperspectivetransform filter before, can't compare them.
core animation fast, optimized efficient use of graphics hardware, , (obviously) animation. core image hardware-accelerated, doesn't seem suited animation.
i'd if you're core image filter based code gives acceptable performance, use that. it's known. core animation pretty complex , documentation isn't great. takes lot of digging , experimentation hang of it, particularly perspective drawing.
Comments
Post a Comment