Public Member Functions

bl7::particles2::Buoyancy Class Reference

#include <Buoyancy.h>

Inheritance diagram for bl7::particles2::Buoyancy:
bl7::particles2::ForceGenerator

List of all members.

Public Member Functions

virtual ~Buoyancy (void)
 Buoyancy (const float volume, const float max_depth, const float density=1000.0f, const ml7::Vector2 &surface=ml7::Vector2(0.0f, 1.0f), const ml7::Vector2 &origin=ml7::Vector2(0.0f, 0.0f))
float get_volume () const
float get_max_depth () const
float get_density () const
const ml7::Vector2get_surface () const
const ml7::Vector2get_origin () const
void set_volume (const float volume)
void set_max_depth (const float max_depth)
void set_density (const float density)
void set_surface (const ml7::Vector2 &surface)
void set_origin (const ml7::Vector2 &origin)

Detailed Description

A force generator that applies buoyancy forces to 2d particles. One instance may be used for multiple particles, if they all are about to have the same volume.


Constructor & Destructor Documentation

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

Destructor.

bl7::particles2::Buoyancy::Buoyancy ( const float  volume,
const float  max_depth,
const float  density = 1000.0f,
const ml7::Vector2 surface = ml7::Vector2(0.0f, 1.0f),
const ml7::Vector2 origin = ml7::Vector2(0.0f, 0.0f) 
) [inline]

Explicit constructor with parameters specifying the volume of sunken objects (particles), the depth from which the maximum buoyancy force is reached, the density of the liquid, the surface normal (and height above 0 as the vector's magnitude) and the origin, the surface relates to.


Member Function Documentation

float bl7::particles2::Buoyancy::get_density (  )  const [inline]

Returns the density of the liquid.

float bl7::particles2::Buoyancy::get_max_depth (  )  const [inline]

Returns the submersion depth from which the maximum buoyancy is reached.

const ml7::Vector2& bl7::particles2::Buoyancy::get_origin (  )  const [inline]

Returns the origin to which the surface normal and level relate.

const ml7::Vector2& bl7::particles2::Buoyancy::get_surface (  )  const [inline]

Returns the surface normal (and height/level above 0) of the liquid.

float bl7::particles2::Buoyancy::get_volume (  )  const [inline]

Returns the volume of objects (particles).

void bl7::particles2::Buoyancy::set_density ( const float  density  )  [inline]

Sets the density of the liquid.

void bl7::particles2::Buoyancy::set_max_depth ( const float  max_depth  )  [inline]

Sets the submersion depth from which the maximum buoyancy is reached.

void bl7::particles2::Buoyancy::set_origin ( const ml7::Vector2 origin  )  [inline]

Sets the origin to which the surface normal and level relate.

void bl7::particles2::Buoyancy::set_surface ( const ml7::Vector2 surface  )  [inline]

Sets the surface normal (and height/level above 0) of the liquid.

void bl7::particles2::Buoyancy::set_volume ( const float  volume  )  [inline]

Sets the colume of objects (particles).


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