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

Properties

friction

The friction value to be applied in physics calculations.

@property (nonatomic, assign) double friction

Declared In

PMTweenPhysicsSystem.h

velocity

The velocity value to use in physics calculations.

@property (nonatomic, assign) double velocity

Declared In

PMTweenPhysicsSystem.h

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