PPL Logo

CkViewable Class Reference

An object that can be "viewed"-- turned into an image. More...

#include <ckviewable.h>

Inheritance diagram for CkViewable:

Inheritance graph
[legend]
Collaboration diagram for CkViewable:

Collaboration graph
[legend]

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 CkViewrenderView (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.

Detailed Description

An object that can be "viewed"-- turned into an image.

Definition at line 141 of file ckviewable.h.


Constructor & Destructor Documentation

CkViewable::CkViewable (  )  [inline]

Definition at line 143 of file ckviewable.h.

virtual CkViewable::~CkViewable (  )  [virtual]


Member Function Documentation

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:


Field Documentation

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.


The documentation for this class was generated from the following file:

Generated on Mon Sep 21 08:21:43 2020 for Charm++ by  doxygen 1.5.5