Gravity Engine  1.5
Unity Asset for Gravity
IFixedOrbit Interface Reference

Interface defining the fixed motion of an NBody object. More...

Inheritance diagram for IFixedOrbit:
FixedObject OrbitEllipse

Public Member Functions

bool IsFixed ()
 Check if body is configured at scene start to be fixed. (Allows objects to be optionally configured as not fixed, to allow e.g. Kepler eqn vs initial velocity in OrbitEllipse) More...
 
void PreEvolve (float physicalScale, float massScale)
 Called for each NBody object prior to evolution beginning. Allows a chance to setup internal state. More...
 
void Evolve (float physicsTime, float physicalScale, ref float[] r)
 Evolve the NBody. Implementating method uses physics time and scale to compute the new position, placing it in r. More...
 

Detailed Description

Interface defining the fixed motion of an NBody object.

Scripts implementing this interface must be attached to a game object that also has an NBody component.

Objects with fixed motion will have their mass used to create the global gravitational field but will not be affected by that field. There motion is defined by the Evolve() method. When called they are responsible for updating their position.

Member Function Documentation

void IFixedOrbit.Evolve ( float  physicsTime,
float  physicalScale,
ref float[]  r 
)

Evolve the NBody. Implementating method uses physics time and scale to compute the new position, placing it in r.

Parameters
physicsTimeCurrent Physics time.
physicalScalePhysical scale.
rPosition in physics space (x, y, z). OUTPUT by the method

Implemented in OrbitEllipse, and FixedObject.

bool IFixedOrbit.IsFixed ( )

Check if body is configured at scene start to be fixed. (Allows objects to be optionally configured as not fixed, to allow e.g. Kepler eqn vs initial velocity in OrbitEllipse)

Returns
true if this instance is fixed; otherwise, false.

Implemented in OrbitEllipse, and FixedObject.

void IFixedOrbit.PreEvolve ( float  physicalScale,
float  massScale 
)

Called for each NBody object prior to evolution beginning. Allows a chance to setup internal state.

Parameters
physicalScalePhysical scale.
massScaleMass scale.

Implemented in OrbitEllipse, and FixedObject.


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