PMTweenPhysicsSolving Protocol Reference
| Conforms to | NSObject |
| Declared in | PMTweenPhysicsSystem.h |
Overview
The PMTweenPhysicsSolving protocol declares methods that must be adopted by a class in order to be used by PMTweenPhysicsUnit to update values using a physics system.
Tasks
-
velocityproperty required method -
frictionproperty required method -
– solveForPosition:currentTime:required method -
– resetSystemrequired method -
– reverseDirectionrequired method -
– pauseSystemrequired method -
– resumeSystemrequired method
Properties
Instance Methods
pauseSystem
This method should pause the physics system, preventing any new calculations.
- (void)pauseSystemDeclared In
PMTweenPhysicsSystem.hresetSystem
This method should reset the physics system to its initial velocity and clear the timestamp used to calculate the current step.
- (void)resetSystemDeclared In
PMTweenPhysicsSystem.hresumeSystem
This method should resume the physics system.
- (void)resumeSystemDeclared In
PMTweenPhysicsSystem.hreverseDirection
This method should reverse the direction of the velocity.
- (void)reverseDirectionDeclared In
PMTweenPhysicsSystem.hsolveForPosition:currentTime:
This method updates a 1D position using physics calculations.
- (double)solveForPosition:(double)position currentTime:(NSTimeInterval)currentTimeParameters
- position
The current position of the physics object being modeled.
- currentTime
The current timestamp.
Return Value
An updated position.
Declared In
PMTweenPhysicsSystem.h