Antkeeper  0.0.1
Functions
world Namespace Reference

World creation and manipulation functions. More...

Functions

void cosmogenesis (::game &ctx)
 Creates the cosmos. More...
 
void create_observer (::game &ctx)
 Creates the observer. More...
 
void set_location (::game &ctx, double elevation, double latitude, double longitude)
 Sets the location of the observer. More...
 
void set_time (::game &ctx, double t)
 Sets the current time. More...
 
void set_time (::game &ctx, int year, int month, int day, int hour, int minute, double second)
 Sets the current time. More...
 
void set_time_scale (::game &ctx, double scale)
 Sets rate at which time passes. More...
 
void enter_ecoregion (::game &ctx, const ecoregion &ecoregion)
 Enters a ecoregion. More...
 
void switch_scene (::game &ctx)
 

Detailed Description

World creation and manipulation functions.

Function Documentation

◆ cosmogenesis()

void world::cosmogenesis ( ::game ctx)

Creates the cosmos.

Definition at line 86 of file world.cpp.

◆ create_observer()

void world::create_observer ( ::game ctx)

Creates the observer.

Definition at line 98 of file world.cpp.

◆ enter_ecoregion()

void world::enter_ecoregion ( ::game ctx,
const ecoregion ecoregion 
)

Enters a ecoregion.

Parameters
ctxGame context.
ecoregionEcoregion to enter.

Definition at line 429 of file world.cpp.

◆ set_location()

void world::set_location ( ::game ctx,
double  elevation,
double  latitude,
double  longitude 
)

Sets the location of the observer.

Parameters
ctxGame context.
elevationElevation, in meters.
latitudeLatitude, in radians.
longitudeLongitude, in radians.

Definition at line 134 of file world.cpp.

◆ set_time() [1/2]

void world::set_time ( ::game ctx,
double  t 
)

Sets the current time.

Parameters
ctxGame context.
tUT1 time, in days.

Definition at line 157 of file world.cpp.

◆ set_time() [2/2]

void world::set_time ( ::game ctx,
int  year,
int  month,
int  day,
int  hour,
int  minute,
double  second 
)

Sets the current time.

Parameters
ctxGame context.
yearAstronomical year numbering. 1 BC is 0, 2 BC is -1.
monthMonth number on [1, 12].
dayDay number on [1, 31].
hourHour number on [0, 23].
minuteMinute number on [0, 59].
secondFractional second on [0.0, 60.0).

Definition at line 172 of file world.cpp.

◆ set_time_scale()

void world::set_time_scale ( ::game ctx,
double  scale 
)

Sets rate at which time passes.

Parameters
ctxGame context.
scaleTime scale.

Definition at line 197 of file world.cpp.

◆ switch_scene()

void world::switch_scene ( ::game ctx)

Definition at line 473 of file world.cpp.