Public Member Functions

bl7::particles2::AnchoredBungee Class Reference

#include <AnchoredBungee.h>

Inheritance diagram for bl7::particles2::AnchoredBungee:
bl7::particles2::ForceGenerator

List of all members.

Public Member Functions

virtual ~AnchoredBungee (void)
 AnchoredBungee (const ml7::Vector2 &anchor, const float d, const float s0)
const ml7::Vector2get_anchor () const
float get_spring_constant () const
float get_rest_length () const
void set_anchor (const ml7::Vector2 &anchor)
void set_spring_constant (const float d)
void set_rest_length (const float s0)

Detailed Description

A force generator that applies spring forces (only if extended) to 2d particles. One instance may be used for multiple particles, if they are connected to the same anchor point in the world via the same spring.


Constructor & Destructor Documentation

virtual bl7::particles2::AnchoredBungee::~AnchoredBungee ( void   )  [inline, virtual]

Destructor.

bl7::particles2::AnchoredBungee::AnchoredBungee ( const ml7::Vector2 anchor,
const float  d,
const float  s0 
) [inline]

Explicit constructor with parameters specifying the anchor point in world coordinates on the other side of the spring, the spring constant d and the rest length of the spring s0.


Member Function Documentation

const ml7::Vector2& bl7::particles2::AnchoredBungee::get_anchor (  )  const [inline]

Returns the anchor point of the spring in world coordinates.

float bl7::particles2::AnchoredBungee::get_rest_length (  )  const [inline]

Returns the rest length of the spring.

float bl7::particles2::AnchoredBungee::get_spring_constant (  )  const [inline]

Returns the spring constant.

void bl7::particles2::AnchoredBungee::set_anchor ( const ml7::Vector2 anchor  )  [inline]

Sets the anchor point of the spring in world coordinates.

void bl7::particles2::AnchoredBungee::set_rest_length ( const float  s0  )  [inline]

Sets the rest length of the spring.

void bl7::particles2::AnchoredBungee::set_spring_constant ( const float  d  )  [inline]

Sets the spring constant.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines