Struct chip::Ball[][src]

pub struct Ball(_);

A ball simulation.

Example

let mut ball = Ball::new();
ball.set_pos(Point3::new(0.0, 0.0, 100.0));
ball.set_vel(Vector3::new(300.0, 400.0, 500.0));

ball.step(1.0 / 120.0);
println!("{:?}", ball.pos());

Methods

impl Ball
[src]

Creates a Ball.

Gets the ball's position.

Sets the ball's position.

Gets the ball's velocity.

Sets the ball's velocity.

Gets the ball's angular velocity.

Sets the ball's angular velocity.

Gets the time elapsed in the simulation.

Sets the time elapsed in the simulation.

Simulates the next dt seconds, and updates the ball's physics values.

Auto Trait Implementations

impl Send for Ball

impl Sync for Ball