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
-
velocity
property required method -
friction
property required method -
– solveForPosition:currentTime:
required method -
– resetSystem
required method -
– reverseDirection
required method -
– pauseSystem
required method -
– resumeSystem
required method
Properties
Instance Methods
pauseSystem
This method should pause the physics system, preventing any new calculations.
- (void)pauseSystem
Declared In
PMTweenPhysicsSystem.h
resetSystem
This method should reset the physics system to its initial velocity and clear the timestamp used to calculate the current step.
- (void)resetSystem
Declared In
PMTweenPhysicsSystem.h
resumeSystem
This method should resume the physics system.
- (void)resumeSystem
Declared In
PMTweenPhysicsSystem.h
reverseDirection
This method should reverse the direction of the velocity.
- (void)reverseDirection
Declared In
PMTweenPhysicsSystem.h
solveForPosition:currentTime:
This method updates a 1D position using physics calculations.
- (double)solveForPosition:(double)position currentTime:(NSTimeInterval)currentTime
Parameters
- position
The current position of the physics object being modeled.
- currentTime
The current timestamp.
Return Value
An updated position.
Declared In
PMTweenPhysicsSystem.h