Gravity Engine  1.5
Unity Asset for Gravity
FixedObject Class Reference

Fixed object. More...

Inheritance diagram for FixedObject:
IFixedOrbit

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

Fixed object.

Object does not move (but it's gravity will affect others).

Good choice for e.g. central star in a system

Member Function Documentation

void FixedObject.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

Implements IFixedOrbit.

bool FixedObject.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.

Implements IFixedOrbit.

void FixedObject.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.

Implements IFixedOrbit.


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