PMTweenPhysicsSystem Class Reference
| Inherits from | NSObject |
| Conforms to | PMTweenPhysicsSolving |
| Declared in | PMTweenPhysicsSystem.h PMTweenPhysicsSystem.m |
Instance Methods
friction
The friction value to be applied in physics calculations.
- (double)frictionDeclared In
PMTweenPhysicsSystem.hinitWithVelocity:friction:
Initializes a new PMTweenPhysicsSystem object, setting up the physics system with initial values for velocity and friction.
- (instancetype)initWithVelocity:(double)velocity friction:(double)frictionReturn Value
A new instance of this class.
Declared In
PMTweenPhysicsSystem.hpauseSystem
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.hsetFriction:
The friction value to be applied in physics calculations.
- (void)setFriction:(double)frictionDeclared In
PMTweenPhysicsSystem.hsetVelocity:
The velocity value to use in physics calculations.
- (void)setVelocity:(double)velocityDeclared In
PMTweenPhysicsSystem.hsolveForPosition:currentTime:
This method updates a 1D position using physics calculations.
- (double)solveForPosition:(double)position currentTime:(NSTimeInterval)elapsedTimeParameters
- position
The current position of the physics object being modeled.
- currentTime
The current timestamp.
Return Value
An updated position.
Declared In
PMTweenPhysicsSystem.h