- Joined
- Oct 30, 2009
- Messages
- 14,019
- Reaction score
- 4
- Points
- 0
This is first public alpha version of Enhanced Bases Environment. An idea for making this was born in this thread.
Enhanced Bases Environment enables access to parameters of surface base objects, not available otherwise by callings to Orbiter API. It defines 3 classes which public interface (without constructors and destructors) is exported through DLL module's API. Those classes are: BaseList, BaseEntry and BaseObject.
At the moment, it's mostly only a Software Development Kit, meant only for testing its functionality, and searching for bugs (that's why it's alpha version).
Attached ENVIRONMENT.dll module itself does nothing more than reads configuration files of star system, its planets and surface bases after loading scenario file, from which it got star system name, and creates instances of appropriate classes.
Future versions of Enhanced Bases Environment will allow loading vessel modules through additional fields of object entry at OBJECTLIST section in configuration file of surface base, and define additional runway lighting systems for RUNWAYLIGHTS, and hence they may define and export additional classes, new methods and properties in existing classes, or modify them, so at some point of the development the API interface may become incompatible with this alpha version.
List of currently exported interface through API:
More details about types and function usage in API Reference Manual attached in the zip file. Attachment contains also a simple SDK sample which uses Enhanced Bases Environment API.
I'd appreciate any suggestion about adding / modifying anything in the API, and in the reference manual, or changing functionality.
Enhanced Bases Environment enables access to parameters of surface base objects, not available otherwise by callings to Orbiter API. It defines 3 classes which public interface (without constructors and destructors) is exported through DLL module's API. Those classes are: BaseList, BaseEntry and BaseObject.
At the moment, it's mostly only a Software Development Kit, meant only for testing its functionality, and searching for bugs (that's why it's alpha version).
Attached ENVIRONMENT.dll module itself does nothing more than reads configuration files of star system, its planets and surface bases after loading scenario file, from which it got star system name, and creates instances of appropriate classes.
Future versions of Enhanced Bases Environment will allow loading vessel modules through additional fields of object entry at OBJECTLIST section in configuration file of surface base, and define additional runway lighting systems for RUNWAYLIGHTS, and hence they may define and export additional classes, new methods and properties in existing classes, or modify them, so at some point of the development the API interface may become incompatible with this alpha version.
List of currently exported interface through API:
BaseList * envGetBaseList ();
DWORD envVersion ();
class BaseList;
class BaseEntry;
class BaseObject;
DWORD envVersion ();
class BaseList;
- properties:
bool Initialized;
size_t BaseCount;
BaseEntry ** Bases;
size_t BaseCount;
BaseEntry ** Bases;
- operators:
BaseEntry * operator [] (OBJHANDLE baseHandle);
BaseEntry * operator [] (SurfaceBaseId baseId);
BaseEntry * operator [] (unsigned int index);
BaseEntry * operator [] (SurfaceBaseId baseId);
BaseEntry * operator [] (unsigned int index);
- methods:
static void Release (void ** list);
BaseEntry ** GetBases (OBJHANDLE GbodyHandle);
BaseEntry ** GetBases (const char * GbodyName);
BaseObject ** GetObjects (DWORD typeMask = ALLOBJ_MASK);
BaseObject ** GetObjects (OBJHANDLE GbodyHandle, DWORD typeMask = ALLOBJ_MASK);
BaseObject ** GetObjects (const char * GbodyName, DWORD typeMask = ALLOBJ_MASK);
BaseEntry ** GetBases (OBJHANDLE GbodyHandle);
BaseEntry ** GetBases (const char * GbodyName);
BaseObject ** GetObjects (DWORD typeMask = ALLOBJ_MASK);
BaseObject ** GetObjects (OBJHANDLE GbodyHandle, DWORD typeMask = ALLOBJ_MASK);
BaseObject ** GetObjects (const char * GbodyName, DWORD typeMask = ALLOBJ_MASK);
- properties:
char * BaseName;
char * GbodyName;
double Latitude;
double Longitude;
OBJHANDLE BaseHandle;
OBJHANDLE GbodyHandle;
size_t ObjectCount;
BaseObject ** Objects;
bool ObjectsMappedToSphere;
char * GbodyName;
double Latitude;
double Longitude;
OBJHANDLE BaseHandle;
OBJHANDLE GbodyHandle;
size_t ObjectCount;
BaseObject ** Objects;
bool ObjectsMappedToSphere;
- operators:
BaseObject * operator [] (unsigned int index);
- methods:
BaseObject ** GetObjects (DWORD typeMask = ALLOBJ_MASK);
- properties:
BaseObjectType Type;
VECTOR3 Pos;
VECTOR3 Size;
double Rot;
void * Prop;
char * ModuleName;
OBJHANDLE ModuleObject;
BaseEntry * Base;
VECTOR3 Pos;
VECTOR3 Size;
double Rot;
void * Prop;
char * ModuleName;
OBJHANDLE ModuleObject;
BaseEntry * Base;
- methods:
double mapLocalToSpherical (double & x, double & z);
More details about types and function usage in API Reference Manual attached in the zip file. Attachment contains also a simple SDK sample which uses Enhanced Bases Environment API.
I'd appreciate any suggestion about adding / modifying anything in the API, and in the reference manual, or changing functionality.
Attachments
Last edited: