HDK_Sample::SIM_ForceOrbit Class Reference

#include <SIM_ForceOrbit.h>

Inheritance diagram for HDK_Sample::SIM_ForceOrbit:

SIM_Force SIM_OptionsUser SIM_Data

List of all members.

Public Member Functions

 GETSET_DATA_FUNCS_V3 (SIM_NAME_POINTPOSITION, PointPosition)
 Controls the position of the point we are orbiting.
 GETSET_DATA_FUNCS_F (SIM_NAME_POINTMASS, PointMass)
 Controls the mass of the point we are orbiting.

Protected Member Functions

 SIM_ForceOrbit (const SIM_DataFactory *factory)
virtual ~SIM_ForceOrbit ()
virtual SIM_GuidecreateGuideObjectSubclass () const
virtual void buildGuideGeometrySubclass (const SIM_RootData &root, const SIM_Options &options, const GU_DetailHandle &gdh, UT_DMatrix4 *xform, const SIM_Time &t) const
 We override this method to create the attractor geometry.
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 getForceOnCircleSubclass (const SIM_Object &object, const UT_Vector3 &position, const UT_Vector3 &normal, const fpreal radius, 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


Detailed Description

This is an implementation of the SIM_Force interface. This implementation returns a force value that is proportional to the square of the distance from a point in space (as if there were an infinitely small massive body at that location).
Examples:

SIM/SIM_ForceOrbit.C.

Definition at line 53 of file SIM_ForceOrbit.h.


Constructor & Destructor Documentation

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

Declare a protected constructor to ensure the data factory is used to create new instances of SIM_ForceOrbit.

Examples:
SIM/SIM_ForceOrbit.h.

Definition at line 44 of file SIM_ForceOrbit.C.

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

Examples:
SIM/SIM_ForceOrbit.h.

Definition at line 50 of file SIM_ForceOrbit.C.


Member Function Documentation

void SIM_ForceOrbit::buildGuideGeometrySubclass ( const SIM_RootData root,
const SIM_Options options,
const GU_DetailHandle gdh,
UT_DMatrix4 xform,
const SIM_Time t 
) const [protected, virtual]

We override this method to create the attractor geometry.

Reimplemented from SIM_Data.

Examples:
SIM/SIM_ForceOrbit.C, and SIM/SIM_ForceOrbit.h.

Definition at line 100 of file SIM_ForceOrbit.C.

SIM_Guide * SIM_ForceOrbit::createGuideObjectSubclass (  )  const [protected, virtual]

Override this to return a SIM_GuideShared as the guide geometry looks the same for all objects.

Reimplemented from SIM_Data.

Examples:
SIM/SIM_ForceOrbit.C, and SIM/SIM_ForceOrbit.h.

Definition at line 94 of file SIM_ForceOrbit.C.

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

Calculates the force on a surface. The force depends only on the mass, so this function simply calls getForceSubclass(), ignoring the circle parameters.

Reimplemented from SIM_Force.

Examples:
SIM/SIM_ForceOrbit.C, and SIM/SIM_ForceOrbit.h.

Definition at line 188 of file SIM_ForceOrbit.C.

void SIM_ForceOrbit::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]

Calculates the force on a volume. The force depends only on the mass, so this function simply calls getForceSubclass(), ignoring the sphere parameters.

Reimplemented from SIM_Force.

Examples:
SIM/SIM_ForceOrbit.C, and SIM/SIM_ForceOrbit.h.

Definition at line 202 of file SIM_ForceOrbit.C.

void SIM_ForceOrbit::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]

Calculates the force on a point. The force depends only on the mass of the point.

Reimplemented from SIM_Force.

Examples:
SIM/SIM_ForceOrbit.C, and SIM/SIM_ForceOrbit.h.

Definition at line 160 of file SIM_ForceOrbit.C.

HDK_Sample::SIM_ForceOrbit::GETSET_DATA_FUNCS_F ( SIM_NAME_POINTMASS  ,
PointMass   
)

Controls the mass of the point we are orbiting.

Examples:
SIM/SIM_ForceOrbit.h.

HDK_Sample::SIM_ForceOrbit::GETSET_DATA_FUNCS_V3 ( SIM_NAME_POINTPOSITION  ,
PointPosition   
)

Controls the position of the point we are orbiting.

Examples:
SIM/SIM_ForceOrbit.h.


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

Generated on Mon Jan 28 00:30:25 2013 for HDK by  doxygen 1.5.9