Class UniformGravity#

Inheritance Relationships#

Base Type#

Class Documentation#

class UniformGravity : public Karana::Models::GravityInterface#

A GravityInterface implementation for uniform gravity.

Public Functions

UniformGravity(std::string_view name)#

UniformGravity constructor. The constructor is not meant to be called directly. Please use the create(…) method instead to create an instance.

Parameters:

name – The name of the GravityInterface.

virtual void computeGravity(const km::Ktime t, const OutputUpdateType &output_update_type) override#

This is a no-op. It does not modify the value of g.

Parameters:
  • t – The time this acceleration was calculated at.

  • output_update_type – The type of update that updated the gravity.

std::string dumpString(std::string_view prefix = "", const Base::DumpOptions *options = nullptr) const override#

Return a formatted string containing information about this object.

Parameters:
  • prefix – String prefix to use for formatting.

  • options – Dump options (if null, defaults will be used).

Returns:

A string representation of the object.

Public Static Functions

static kc::ks_ptr<UniformGravity> create(std::string_view name)#

Constructor.

Parameters:

name – The name of the UniformGravity interface.

Returns:

A pointer to the newly created instance of UniformGravity.