PPL Logo

CkQuadView Class Reference

The simplest kind of CkView: a single, flat quadrilateral OpenGL texture. More...

#include <ckviewable.h>

Inheritance diagram for CkQuadView:

Inheritance graph
[legend]
Collaboration diagram for CkQuadView:

Collaboration graph
[legend]

Public Types

enum  { maxCorners = 8 }
 These are the XYZ universe locations of the vertices of our texture image. More...

Public Member Functions

virtual void pup (PUP::er &p)
 PUP this CkView and its image or geometry data.
 PUPable_decl (CkQuadView)
virtual ~CkQuadView ()
 CkQuadView (int w, int h, int n_colors)
 Create a new quad view to display a new texture.
CkAllocImage & getImage (void)
const CkAllocImage & getImage (void) const
 CkQuadView (CkMigrateMessage *m)
 Migration constructor-- prepare for pup.
const oglLilTex * getTexture (void) const
virtual void render (double alpha, CkView *old)
 Render our image to the current OpenGL context.

Data Fields

int nCorners
CkVector3d corners [maxCorners]
CkVector3d texCoord [maxCorners]

Private Member Functions

void render (void)

Private Attributes

CkAllocImage s_tex
 Our texture image-- only valid on server side.
CkImageCompressor x_tex
oglLilTex * c_tex

Detailed Description

The simplest kind of CkView: a single, flat quadrilateral OpenGL texture.

You specify the texture, corners, and draw style.

Definition at line 221 of file ckviewable.h.


Member Enumeration Documentation

anonymous enum

These are the XYZ universe locations of the vertices of our texture image.

These go in a fan, like: corners[0]==image.getPixel(0,0) corners[1]==image.getPixel(w-1,0) corners[2]==image.getPixel(w-1,h-1) corners[3]==image.getPixel(0,h-1) Subclasses MUST set these fields on the server.

Enumerator:
maxCorners 

Definition at line 231 of file ckviewable.h.


Constructor & Destructor Documentation

virtual CkQuadView::~CkQuadView (  )  [virtual]

CkQuadView::CkQuadView ( int  w,
int  h,
int  n_colors 
)

Create a new quad view to display a new texture.

n_colors should be 1 (greyscale, luminance), 3 (rgb, no alpha) or 4 (premultiplied rgba).

Be sure to set the "corners" and "id" fields after making this call. (SERVER ONLY)

CkQuadView::CkQuadView ( CkMigrateMessage m  ) 

Migration constructor-- prepare for pup.

(CLIENT ONLY)


Member Function Documentation

virtual void CkQuadView::pup ( PUP::er p  )  [virtual]

PUP this CkView and its image or geometry data.

(CLIENT AND SERVER).

Reimplemented from CkView.

CkQuadView::PUPable_decl ( CkQuadView   ) 

CkAllocImage& CkQuadView::getImage ( void   )  [inline]

Definition at line 257 of file ckviewable.h.

References s_tex.

Referenced by impl_LV3D_Array::LV3D_FlatRender().

Here is the caller graph for this function:

const CkAllocImage& CkQuadView::getImage ( void   )  const [inline]

Definition at line 258 of file ckviewable.h.

References s_tex.

void CkQuadView::render ( void   )  [private]

const oglLilTex* CkQuadView::getTexture ( void   )  const [inline]

Definition at line 269 of file ckviewable.h.

References c_tex.

virtual void CkQuadView::render ( double  alpha,
CkView old 
) [virtual]

Render our image to the current OpenGL context.

Use "alpha" fraction of your own pixels; "1-alpha" fraction of the "old" pixels. "old" may be NULL.

(CLIENT ONLY) So the server can link without OpenGL, all OpenGL calls made by this routine should be protected by an ifdef CMK_LIVEVIZ3D_CLIENT

Implements CkView.


Field Documentation

Definition at line 232 of file ckviewable.h.

Definition at line 233 of file ckviewable.h.

Referenced by impl_LV3D_Array::LV3D_FlatRender().

Definition at line 234 of file ckviewable.h.

CkAllocImage CkQuadView::s_tex [private]

Our texture image-- only valid on server side.

Definition at line 244 of file ckviewable.h.

Referenced by getImage().

Definition at line 245 of file ckviewable.h.

oglLilTex* CkQuadView::c_tex [private]

Definition at line 262 of file ckviewable.h.

Referenced by getTexture().


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

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