Duck
Duck

Reputation: 36003

Can dummy objects be simulated on iphone?

I come from 3D animation and one of the basic things all 3D software have is the ability to create dummy objects. Dummy objects can be used to groups objects that can be rotated, moved or scaled together around a specific anchor point. This is the idea of what I am asking.

Obviously we can have fake dummies by using a view and put other views as subviews, but this has problems as the view receives clicks and sometimes you don't want it to do so. You cannot change the anchorpoint of a view too.

So, the dummies as I ask have, at least, these properties:

  1. adjustable anchor point
  2. it is not clickable
  3. it is totally invisible (cannot be rendered).
  4. any scale, rotation and translation of a dummy are propagated to the grouped objects considering the dummy's anchor point.
  5. it is totally animatable.

Can this be simulated on iPhone? Is there any object that can be created to simulate this? thanks.

Upvotes: 0

Views: 98

Answers (3)

David Dunham
David Dunham

Reputation: 8339

CALayers have anchorPoints… And they're animatable. I think that's what you're looking for — they're a lot like sprites.

Upvotes: 0

jessecurry
jessecurry

Reputation: 22116

Working in OpenGL you can create classes that do just this, basically you end up with nested transforms.

Any of the 3D engines I've seen also support this out of the box.

Upvotes: 1

Ole Begemann
Ole Begemann

Reputation: 135578

Have a look at CATransformLayer.

Upvotes: 1

Related Questions