GRE_LAYERDC Class Reference

Layer drawing context. More...

#include <gre/layerdc.h>

Inheritance diagram for GRE_LAYERDC:

Inheritance graph
[legend]
List of all members.

Public Member Functions

ERRVALUE DrawLine2D (POLYLINE &PolyLine)
int DrawLineClipped2D (POLYLINE &PolyLine) const
int DrawLineClipped2DNoTrans (POLYLINE &PolyLine) const
int DrawLineClipped3D (DPOINT3D *points, INT32 NumPoints) const
int DrawLineClipped3D (POLYLINE &PolyLine) const
int DrawSegment3D (const DPOINT3D &point1, const DPOINT3D &point2) const
const REGION2DGetClipRegion () const
GRE_LAYERGetLayer () const
const DRECT2DGetObjectClipRect () const
ERRVALUE GetSurfaceZ (POLYLINE &polyline) const
ERRVALUE GetSurfaceZ (DPOINT3D *points, INT32 NumPoints) const
const TRANS2D_MAPGENGetTransLayerDevice () const
const TRANS2D_MAPGENGetTransLayerSurface () const
 GRE_LAYERDC (GRE_VIEW *view, MGD::CONTEXT *ggc, const TRANS2D_MAPGEN &ObjectToDevice, UINT32 drawflags=0)
 GRE_LAYERDC (GRE_LAYER *layer, GRE_VIEW *view=0, MGD::CONTEXT *ggc=0, UINT32 drawflags=0)
bool IsHidden () const
void NotifyDrawElementBegin (ELEMTYPE ElemType, INT32 ElemNum) const
void NotifyDrawElementBegin (const RVC::ELEMENT &element) const
void NotifyDrawElementEnd (ELEMTYPE ElemType, INT32 ElemNum) const
void NotifyDrawElementEnd (const RVC::ELEMENT &element) const
void SetTransLayerDevice (const TRANS2D_MAPGEN &tmg)
ERRVALUE Setup2D ()
ERRVALUE Setup3D (const GRE_VIEWPOINT3D &ViewPoint, int ViewIndex=0)
int TransPoint3D (DPOINT3D &ipoint, DPOINT3D &opoint) const
virtual ~GRE_LAYERDC ()

Public Attributes

COLOR BackgroundColor
UINT32 Clip3DFlags
double cosrot
UINT32 drawflags
MGD::CONTEXTggc
bool Is3D
GRE_LAYERlayer
double LayoutScale
double MapScale
double MapScaleZ
bool NoDrawActive
DRECT2D ObjClipRect
double RotAngle
bool ScaleToMap3D
double sinrot
const GRE_LAYER_SURFACE::DISPPARMsurfdp
bool SurfHasNull
double surfinc
GRE_LAYER_SURFACEsurflayer
bool UseSurface
GRE_VIEWview
UINT8 ViewIndex
GRE_VIEWPOINT3DViewPoint
double xpixelsize
double ypixelsize

Detailed Description

Layer drawing context.

Contains information needed to actually draw layer on a particular view.

Definition at line 59 of file layerdc.h.


Constructor & Destructor Documentation

GRE_LAYERDC::GRE_LAYERDC GRE_LAYER layer,
GRE_VIEW view = 0,
MGD::CONTEXT ggc = 0,
UINT32  drawflags = 0
[explicit]
 

Constructor.

GRE_LAYERDC::GRE_LAYERDC GRE_VIEW view,
MGD::CONTEXT ggc,
const TRANS2D_MAPGEN ObjectToDevice,
UINT32  drawflags = 0
 

Constructor.

Does not need a layer, but you need to calculate the transformation and pass it in. Do not call Setup2D() if you use this ctor.

virtual GRE_LAYERDC::~GRE_LAYERDC  )  [virtual]
 

Destructor.


Member Function Documentation

ERRVALUE GRE_LAYERDC::DrawLine2D POLYLINE PolyLine  )  [inline]
 

Draw line in 2D, does not translate or clip.

Returns:
TRUE if visible, FALSE if not, < 0 if error.

Definition at line 109 of file layerdc.h.

int GRE_LAYERDC::DrawLineClipped2D POLYLINE PolyLine  )  const
 

Translate, clip and draw line in 2D.

Returns:
TRUE if visible, FALSE if not, < 0 if error.

int GRE_LAYERDC::DrawLineClipped2DNoTrans POLYLINE PolyLine  )  const
 

Clip and draw line in 2D.

Returns:
TRUE if visible, FALSE if not, < 0 if error.

int GRE_LAYERDC::DrawLineClipped3D DPOINT3D points,
INT32  NumPoints
const
 

Translate, clip and draw line in 3D.

Returns:
TRUE if visible, FALSE if not, < 0 if error.
Parameters:
points  Array of points with X/Y coordinates in layer associated with context
NumPoints  Number of points

int GRE_LAYERDC::DrawLineClipped3D POLYLINE PolyLine  )  const
 

Translate, clip and draw line in 3D.

Returns:
TRUE if visible, FALSE if not, < 0 if error.

int GRE_LAYERDC::DrawSegment3D const DPOINT3D point1,
const DPOINT3D point2
const
 

Clip and draw segment in 3D.

Returns:
TRUE if visible, FALSE if not, < 0 if error.
Parameters:
point1  First point in map coordinates
point2  Second point in map coordinates

const REGION2D& GRE_LAYERDC::GetClipRegion  )  const [inline]
 

Get clipping region.

Definition at line 146 of file layerdc.h.

GRE_LAYER* GRE_LAYERDC::GetLayer  )  const [inline]
 

Get layer.

Definition at line 150 of file layerdc.h.

const DRECT2D& GRE_LAYERDC::GetObjectClipRect  )  const [inline]
 

Get the clip rectangle in object coordinates.

Definition at line 154 of file layerdc.h.

ERRVALUE GRE_LAYERDC::GetSurfaceZ POLYLINE polyline  )  const
 

Get surface Z coordinates for POLYLINE.

Parameters:
polyline  3D polyline

ERRVALUE GRE_LAYERDC::GetSurfaceZ DPOINT3D points,
INT32  NumPoints
const
 

Get surface Z coordinates for array of points.

Parameters:
points  Array of points with X/Y coordinates in layer associated with context
NumPoints  Number of points

const TRANS2D_MAPGEN& GRE_LAYERDC::GetTransLayerDevice  )  const [inline]
 

Get transformation from 'layer' to 'device' coordinates.

Definition at line 169 of file layerdc.h.

const TRANS2D_MAPGEN& GRE_LAYERDC::GetTransLayerSurface  )  const [inline]
 

Get transformation from 'layer' to 'surface' coordinates.

Definition at line 173 of file layerdc.h.

bool GRE_LAYERDC::IsHidden  )  const [inline]
 

Determine if layer is 'hidden' due to scale or other visibility setting.

Definition at line 177 of file layerdc.h.

void GRE_LAYERDC::NotifyDrawElementBegin ELEMTYPE  ElemType,
INT32  ElemNum
const [inline]
 

Send notification before drawing element.

Definition at line 186 of file layerdc.h.

void GRE_LAYERDC::NotifyDrawElementBegin const RVC::ELEMENT element  )  const [inline]
 

Send notification before drawing element.

Definition at line 181 of file layerdc.h.

void GRE_LAYERDC::NotifyDrawElementEnd ELEMTYPE  ElemType,
INT32  ElemNum
const [inline]
 

Send notification after drawing element.

Definition at line 197 of file layerdc.h.

void GRE_LAYERDC::NotifyDrawElementEnd const RVC::ELEMENT element  )  const [inline]
 

Send notification after drawing element.

Definition at line 192 of file layerdc.h.

void GRE_LAYERDC::SetTransLayerDevice const TRANS2D_MAPGEN tmg  )  [inline]
 

Set transformation from 'layer' to 'device' coordinates.

Definition at line 203 of file layerdc.h.

ERRVALUE GRE_LAYERDC::Setup2D  ) 
 

Setup for drawing in 2D.

Returns:
TRUE if visible, FALSE if not, < 0 if error.

ERRVALUE GRE_LAYERDC::Setup3D const GRE_VIEWPOINT3D ViewPoint,
int  ViewIndex = 0
 

Setup for drawing in 3D.

Returns:
TRUE if visible, FALSE if not, < 0 if error.

int GRE_LAYERDC::TransPoint3D DPOINT3D ipoint,
DPOINT3D opoint
const
 

Translate 3D point to display coordinates.

Returns:
TRUE if point visible, FALSE if not, < 0 if error.
Parameters:
ipoint  Point in layer coordinates, Z value may be altered if surface reference used
opoint  Point in display coordinates with canonical depth returned


Member Data Documentation

COLOR GRE_LAYERDC::BackgroundColor
 

Background color for AllBackground.

Definition at line 76 of file layerdc.h.

UINT32 GRE_LAYERDC::Clip3DFlags
 

3D clipping flags

Definition at line 78 of file layerdc.h.

double GRE_LAYERDC::cosrot
 

Definition at line 72 of file layerdc.h.

UINT32 GRE_LAYERDC::drawflags
 

MDISPDRAW_... flags.

Definition at line 77 of file layerdc.h.

MGD::CONTEXT* GRE_LAYERDC::ggc
 

Generic graphic context.

Definition at line 64 of file layerdc.h.

bool GRE_LAYERDC::Is3D
 

Set if drawing in 3D.

Definition at line 79 of file layerdc.h.

GRE_LAYER* GRE_LAYERDC::layer
 

Layer being drawn.

Definition at line 62 of file layerdc.h.

double GRE_LAYERDC::LayoutScale
 

Map scale of layout for relative size.

Definition at line 69 of file layerdc.h.

double GRE_LAYERDC::MapScale
 

Current map scale for relative size.

Definition at line 70 of file layerdc.h.

double GRE_LAYERDC::MapScaleZ
 

Map scale factor for 3D (multiply by depth to get actual scale).

Definition at line 75 of file layerdc.h.

bool GRE_LAYERDC::NoDrawActive
 

Don't draw "active" element.

Definition at line 82 of file layerdc.h.

DRECT2D GRE_LAYERDC::ObjClipRect
 

Clipping rectangle in object coordinates.

Definition at line 68 of file layerdc.h.

double GRE_LAYERDC::RotAngle
 

Rotation angle.

Definition at line 71 of file layerdc.h.

bool GRE_LAYERDC::ScaleToMap3D
 

Set if 3D scaling to map.

Definition at line 84 of file layerdc.h.

double GRE_LAYERDC::sinrot
 

sin/cos of rotation angle

Definition at line 72 of file layerdc.h.

const GRE_LAYER_SURFACE::DISPPARM* GRE_LAYERDC::surfdp
 

Surface layer display parameters for 3D.

Definition at line 67 of file layerdc.h.

bool GRE_LAYERDC::SurfHasNull
 

Surface layer has NULL values.

Definition at line 81 of file layerdc.h.

double GRE_LAYERDC::surfinc
 

Increment in layer corresponding to one cell in surface raster.

Definition at line 74 of file layerdc.h.

GRE_LAYER_SURFACE* GRE_LAYERDC::surflayer
 

Surface layer in 3D.

Definition at line 66 of file layerdc.h.

bool GRE_LAYERDC::UseSurface
 

Use surface layer for Z value.

Definition at line 80 of file layerdc.h.

GRE_VIEW* GRE_LAYERDC::view
 

View being drawn in.

Definition at line 63 of file layerdc.h.

UINT8 GRE_LAYERDC::ViewIndex
 

Stereo view index.

Definition at line 83 of file layerdc.h.

GRE_VIEWPOINT3D* GRE_LAYERDC::ViewPoint
 

3D viewpoint

Definition at line 65 of file layerdc.h.

double GRE_LAYERDC::xpixelsize
 

Definition at line 73 of file layerdc.h.

double GRE_LAYERDC::ypixelsize
 

Pixel size in millimeters.

Definition at line 73 of file layerdc.h.


The documentation for this class was generated from the following file:
Generated on Tue Dec 14 13:19:53 2004 for TNTsdk by  doxygen 1.3.8-20040913