#include <lv3d1_server.h>
Public Member Functions | |
LV3D_Array (void) | |
LV3D_Array (CkMigrateMessage *m) | |
void | addViewable (CkViewable *v) |
Add this viewable to our set. | |
void | removeViewable (CkViewable *v) |
virtual void | pup (PUP::er &p) |
~LV3D_Array () | |
virtual void | LV3D_NewClient (int clientID) |
This request is broadcast every time a client connects. | |
virtual void | LV3D_Prepare (void) |
Prepare to handle a call. | |
virtual void | LV3D_DoBalance (void) |
Participate in load balancing. | |
virtual void | LV3D_Viewpoint (LV3D_ViewpointMsg *m) |
This request is broadcast every time a client viewpoint changes. | |
virtual void | LV3D_Render (LV3D_RenderMsg *m) |
This method is used to prioritize rendering. | |
virtual void | LV3D_FlatRender (liveVizRequestMsg *m) |
This entry method is only used when rendering to plain old server-assembled liveViz 2d. | |
Private Member Functions | |
void | init () |
Private Attributes | |
impl_LV3D_Array * | impl |
Users should inherit all their visible classes from this kind of array element.
Rationale: By keeping all viewables in one big array, we can update the viewpoint using a single broadcast. The sensible alternative of keeping several different arrays (e.g., one array of tiles, one of buildings, one of trees) would result in multiple broadcasts, and make addressing more complicated.
Definition at line 91 of file lv3d1_server.h.
LV3D_Array::LV3D_Array | ( | void | ) | [inline] |
Definition at line 95 of file lv3d1_server.h.
References init().
LV3D_Array::LV3D_Array | ( | CkMigrateMessage * | m | ) | [inline] |
Definition at line 96 of file lv3d1_server.h.
References init().
LV3D_Array::~LV3D_Array | ( | ) |
void LV3D_Array::init | ( | void | ) | [private] |
Definition at line 143 of file lv3d1_server.C.
References impl.
Referenced by LV3D_Array().
void LV3D_Array::addViewable | ( | CkViewable * | v | ) |
Add this viewable to our set.
The viewable is still owned by the caller, but must survive until removed or the element is destroyed.
This routine is often called exactly one per array element lifetime, and often from the constructor or pup routine.
For liveViz, the array element basically only exists to provide network access for this CkViewable.
There is a small fixed limit on the number of CkViewables you can add. 1 is safe.
Definition at line 148 of file lv3d1_server.C.
References impl_LV3D_Array::add(), and impl.
void LV3D_Array::removeViewable | ( | CkViewable * | v | ) |
Definition at line 151 of file lv3d1_server.C.
References impl, and impl_LV3D_Array::remove().
void LV3D_Array::pup | ( | PUP::er & | p | ) | [virtual] |
Definition at line 154 of file lv3d1_server.C.
References Converse::CkMyPe(), data, and LV3D_Verbosity.
void LV3D_Array::LV3D_NewClient | ( | int | clientID | ) | [virtual] |
This request is broadcast every time a client connects.
Definition at line 172 of file lv3d1_server.C.
References impl, and impl_LV3D_Array::newClient().
void LV3D_Array::LV3D_Prepare | ( | void | ) | [virtual] |
Prepare to handle a call.
Can be used to add viewables lazily.
Definition at line 213 of file lv3d1_server.C.
Referenced by LV3D_FlatRender(), and LV3D_Viewpoint().
void LV3D_Array::LV3D_DoBalance | ( | void | ) | [virtual] |
Participate in load balancing.
Perform load balancing now.
Definition at line 178 of file lv3d1_server.C.
void LV3D_Array::LV3D_Viewpoint | ( | LV3D_ViewpointMsg * | m | ) | [virtual] |
This request is broadcast every time a client viewpoint changes.
Internally, it asks the stored CkViewables if they should redraw, and if so, queues up a LV3DRenderMsg.
Internally, it asks the stored CkViewables if they should redraw, and if so, queues up a LV3D_RenderMsg.
Definition at line 187 of file lv3d1_server.C.
References impl, LV3D_Prepare(), and impl_LV3D_Array::viewpoint().
void LV3D_Array::LV3D_Render | ( | LV3D_RenderMsg * | m | ) | [virtual] |
This method is used to prioritize rendering.
Definition at line 196 of file lv3d1_server.C.
References impl, and impl_LV3D_Array::render().
Referenced by impl_LV3D_Array::viewpoint().
void LV3D_Array::LV3D_FlatRender | ( | liveVizRequestMsg * | m | ) | [virtual] |
This entry method is only used when rendering to plain old server-assembled liveViz 2d.
This entry method is only used when rendering to plain old server-assembled liveViz 2d.
Definition at line 205 of file lv3d1_server.C.
References impl, impl_LV3D_Array::LV3D_FlatRender(), and LV3D_Prepare().
impl_LV3D_Array* LV3D_Array::impl [private] |
Definition at line 92 of file lv3d1_server.h.
Referenced by addViewable(), init(), LV3D_FlatRender(), LV3D_NewClient(), LV3D_Render(), LV3D_Viewpoint(), removeViewable(), and ~LV3D_Array().