#include <ckviewable.h>
Public Member Functions | |
CkViewable () | |
virtual | ~CkViewable () |
virtual bool | shouldRender (const CkViewpoint &univ2screen, const CkView &oldView)=0 |
Return true if this object needs to be redrawn, false if oldView is acceptable from the new viewpoint. | |
virtual CkView * | renderView (const CkViewpoint &univ2screen)=0 |
Draw this object from this point of view, and return the resulting image (or NULL if none is appropriate). | |
virtual double | getSize (const CkViewpoint &univ2screen) |
Return our onscreen size, in radians measured from the camera. | |
Data Fields | |
int | priorityAdjust |
Priority adjustment for re-rendering. |
Definition at line 141 of file ckviewable.h.
CkViewable::CkViewable | ( | ) | [inline] |
Definition at line 143 of file ckviewable.h.
virtual CkViewable::~CkViewable | ( | ) | [virtual] |
virtual bool CkViewable::shouldRender | ( | const CkViewpoint & | univ2screen, | |
const CkView & | oldView | |||
) | [pure virtual] |
Return true if this object needs to be redrawn, false if oldView is acceptable from the new viewpoint.
oldView is always a CkView returned from a previous call to "render".
Implemented in CkFixedViewable, and CkInterestViewable.
Referenced by impl_LV3D_Array::viewpoint().
virtual CkView* CkViewable::renderView | ( | const CkViewpoint & | univ2screen | ) | [pure virtual] |
Draw this object from this point of view, and return the resulting image (or NULL if none is appropriate).
The output CkView will be unref()'d exactly once after each call to render.
Implemented in CkFixedViewable, and CkInterestViewable.
Referenced by impl_LV3D_Array::LV3D_FlatRender(), and impl_LV3D_Array::render().
virtual double CkViewable::getSize | ( | const CkViewpoint & | univ2screen | ) | [virtual] |
Return our onscreen size, in radians measured from the camera.
This routine is *only* called after a successful shouldRender or a call to renderView, to set the priority of the resulting message. The default implementation always returns 0.1.
Reimplemented in CkInterestViewable.
Referenced by impl_LV3D_Array::render(), and impl_LV3D_Array::viewpoint().
Priority adjustment for re-rendering.
This starts out at 0, but should be made more and more positive for more and more important views.
Definition at line 149 of file ckviewable.h.