SIM_ForceBuoyancy Class Reference

#include <SIM_ForceBuoyancy.h>

Inheritance diagram for SIM_ForceBuoyancy:

SIM_Force SIM_OptionsUser SIM_Data

List of all members.

Public Member Functions

 GETSET_DATA_FUNCS_V3 (SIM_NAME_FORCE, Force)
 Control the force attribute.
 GETSET_DATA_FUNCS_I (SIM_NAME_SAMPLEMODE, SampleMode)
 Whether to sample by point, circle, or sphere.

Protected Member Functions

 SIM_ForceBuoyancy (const SIM_DataFactory *factory)
virtual ~SIM_ForceBuoyancy ()
virtual void getForceSubclass (const SIM_Object &object, const UT_Vector3 &position, const UT_Vector3 &velocity, const UT_Vector3 &angvel, const fpreal mass, UT_Vector3 &force, UT_Vector3 &torque) const
virtual void getForceOnSphereSubclass (const SIM_Object &object, const UT_Vector3 &position, const fpreal radius, const UT_Vector3 &velocity, const UT_Vector3 &angvel, const fpreal mass, UT_Vector3 &force, UT_Vector3 &torque) const
virtual SIM_ForceSample getOptimalForceSamplingSubclass () const


Detailed Description

This is an implementation of the SIM_Force interface. This implementation applies a force in a given direction from an attached scalar field, treating it as a liquid applying an out-going force wherever it is less than 0.

Definition at line 25 of file SIM_ForceBuoyancy.h.


Constructor & Destructor Documentation

SIM_ForceBuoyancy::SIM_ForceBuoyancy ( const SIM_DataFactory factory  )  [explicit, protected]

virtual SIM_ForceBuoyancy::~SIM_ForceBuoyancy (  )  [protected, virtual]


Member Function Documentation

virtual void SIM_ForceBuoyancy::getForceOnSphereSubclass ( const SIM_Object object,
const UT_Vector3 position,
const fpreal  radius,
const UT_Vector3 velocity,
const UT_Vector3 angvel,
const fpreal  mass,
UT_Vector3 force,
UT_Vector3 torque 
) const [protected, virtual]

Returns the force and torque applied by this force to a sphere. The outputs may be modified according to the information passed in about the object to which the force is being applied. The default implementation calls getForce() and assumes that the result is a force per unit volume. The force and torque are then scaled by the volume of the sphere.

Reimplemented from SIM_Force.

virtual void SIM_ForceBuoyancy::getForceSubclass ( const SIM_Object object,
const UT_Vector3 position,
const UT_Vector3 velocity,
const UT_Vector3 angvel,
const fpreal  mass,
UT_Vector3 force,
UT_Vector3 torque 
) const [protected, virtual]

Returns the buoyance force at a point - not very accurate as buoyancy is ideally defined over a volume. We end up definining it as a unit volume and just enable/disable the force according to the surface values.

Reimplemented from SIM_Force.

virtual SIM_ForceSample SIM_ForceBuoyancy::getOptimalForceSamplingSubclass (  )  const [protected, virtual]

Allows solvers to query what the optimal sampling type for this force would be. Solvers do not have to respect this. This should be user overrideable so users can trade efficiency for accuracy.

Reimplemented from SIM_Force.

SIM_ForceBuoyancy::GETSET_DATA_FUNCS_I ( SIM_NAME_SAMPLEMODE  ,
SampleMode   
)

Whether to sample by point, circle, or sphere.

SIM_ForceBuoyancy::GETSET_DATA_FUNCS_V3 ( SIM_NAME_FORCE  ,
Force   
)

Control the force attribute.


The documentation for this class was generated from the following file:

Generated on Fri May 25 00:10:40 2012 for HDK by  doxygen 1.5.9