EnvironmentHandlerEnvironment handlers render the backdrop, the points at infinity that aren't covered by anything in the scene. This is the natural place to draw the sky, the distant horizon, or a procedural nebula in space. Handler Activation Function XCALL_( int ) MyEnvironment( long version, GlobalFunc *global,
LWEnvironmentHandler *local, void *serverData );
The local argument to an environment handler's activation function is an LWEnvironmentHandler. typedef struct st_LWEnvironmentHandler {
LWInstanceFuncs *inst;
LWItemFuncs *item;
LWRenderFuncs *rend;
LWError (*evaluate) (LWInstance, LWEnvironmentAccess *);
unsigned int (*flags) (LWInstance);
} LWEnvironmentHandler;
The first three members of this structure point to the standard handler functions. In addition to these, an environment handler provides an evaluation function and a flags function.
Interface Activation Function XCALL_( int ) MyInterface( long version, GlobalFunc *global,
??? *???, void *serverData );
TBD Environment Access This is the structure passed to the handler's evaluation function. typedef struct st_LWEnvironmentAccess {
LWEnvironmentMode mode;
double h[2], p[2];
LWDVector dir;
double colRect[4][3];
double color[3];
} LWEnvironmentAccess;
|