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

bool CanDrawLayer () const
bool CheckColorLock (MGD::COLORLOCK &colorlock, ELEMTYPE ElemType, INT32 ElemNum, const BITSET &HighlightSet)
bool CheckColorLock (MGD::COLORLOCK &colorlock)
bool CheckColorOverride (COLOR &color)
void ClearAllDrawnSets ()
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
bool Fill3dFlatPolygon (const DPOINT3D *points, INT32 numPoints) const
bool Fill3dTriangle (const DPOINT3D *tp[3]) const
double Get3dDepthScale () const
GRE::SCENE3DGet3dScene ()
const GRE::SCENE3DGet3dScene () const
GRE::SCENE3D::STEREOVIEW Get3dStereoView () const
double Get3dSurfaceIncrement () const
double Get3dZScale () const
const REGION2DGetClipRegion () const
double GetDesignScale () const
GRE::DRAWFLAGS GetDrawFlags () const
MGD::CONTEXTGetDrawingContext () const
MGD::DEVICEGetDrawingDevice () const
double GetDrawingScale () const
BITSETGetElemDrawnSet (ELEMTYPE ElemType=ELEMTYPE_All) const
GRE_LAYERGetLayer () const
GRE::LAYERVIEWGetLayerView ()
const GRE::LAYERVIEWGetLayerView () const
bool GetNoDrawActive () const
const DRECT2DGetObjectClipRect () const
const DPOINT2DGetPixelSizeMM () const
GRE::RENDERTARGET GetRenderTarget () const
double GetRotationAngle () const
double GetRotationCos () const
double GetRotationSin () const
GRE_LAYER_SURFACEGetSurfaceLayer () const
ERRVALUE GetSurfaceZ (POLYLINE &polyline) const
ERRVALUE GetSurfaceZ (DPOINT3D *points, INT32 NumPoints) const
const TRANS2D_MAPGENGetTransLayerDevice () const
const TRANS2D_MAPGENGetTransLayerSurface () const
GRE_VIEWGetView () const
 GRE_LAYERDC (GRE_VIEW *view, MGD::DEVICE *pDevice, const TRANS2D_MAPGEN &ObjectToDevice, GRE::DRAWFLAGS drawflags=GRE::DRAWFLAG_None)
 GRE_LAYERDC (GRE_LAYER *layer, GRE_VIEW *view, MGD::DEVICE *pDevice=0, GRE::DRAWFLAGS drawflags=GRE::DRAWFLAG_None)
bool HasSurfaceLayer () const
bool HasSurfaceNulls () const
bool Is3D () const
bool IsHidden () const
bool IsSurfaceUsed () 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 Set3dElemScaled (bool IsScaled)
void Set3dStereoView (GRE::SCENE3D::STEREOVIEW StereoView)
void SetDrawFlags (GRE::DRAWFLAGS drawflags)
void SetDrawingDevice (MGD::DEVICE *pDevice)
int TransPoint3D (DPOINT3D &ipoint, DPOINT3D &opoint) const
virtual ~GRE_LAYERDC ()

Detailed Description

Layer drawing context.

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

Definition at line 141 of file layerdc.h.


Constructor & Destructor Documentation

GRE_LAYERDC::GRE_LAYERDC GRE_LAYER layer,
GRE_VIEW view,
MGD::DEVICE pDevice = 0,
GRE::DRAWFLAGS  drawflags = GRE::DRAWFLAG_None
 

Construct using layer, view and drawing device.

Parameters:
layer  Layer, must not be NULL
view  View, should not be NULL

GRE_LAYERDC::GRE_LAYERDC GRE_VIEW view,
MGD::DEVICE pDevice,
const TRANS2D_MAPGEN ObjectToDevice,
GRE::DRAWFLAGS  drawflags = GRE::DRAWFLAG_None
 

Construct using view, drawing device and transformation.

Does not need a layer, but you need to calculate the transformation and pass it in.

Parameters:
view  View, cannot be NULL
pDevice  Drawing device, cannot be NULL

virtual GRE_LAYERDC::~GRE_LAYERDC  )  [virtual]
 

Destructor.


Member Function Documentation

bool GRE_LAYERDC::CanDrawLayer  )  const
 

Determine if possible to draw layer.

Returns:
false if out of view or cannot draw based on 2D/3D view type.

bool GRE_LAYERDC::CheckColorLock MGD::COLORLOCK colorlock,
ELEMTYPE  ElemType,
INT32  ElemNum,
const BITSET HighlightSet
 

Check if drawing flags require a color lock, set color and lock if so.

Parameters:
colorlock  Color lock passed/returned
ElemType  Element type
ElemNum  Element number
HighlightSet  Highlight set

bool GRE_LAYERDC::CheckColorLock MGD::COLORLOCK colorlock  ) 
 

Check if drawing flags require a color lock, set color and lock if so.

Parameters:
colorlock  Color lock passed/returned

bool GRE_LAYERDC::CheckColorOverride COLOR color  ) 
 

Check if drawing flags require a color override.

Parameters:
color  Override color returned

void GRE_LAYERDC::ClearAllDrawnSets  ) 
 

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 192 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

bool GRE_LAYERDC::Fill3dFlatPolygon const DPOINT3D points,
INT32  numPoints
const
 

Fill 3D flat polygon.

Returns:
true if was visible, false if not.
Parameters:
points  Polygon vertices
numPoints  Number of vertices

bool GRE_LAYERDC::Fill3dTriangle const DPOINT3D tp[3]  )  const
 

Fill 3D triangle.

Returns:
true if was visible, false if not.
Parameters:
tp  Pointers to triangle vertices

double GRE_LAYERDC::Get3dDepthScale  )  const [inline]
 

Get depth scaling, multiplied by depth to get drawing scale.

Definition at line 242 of file layerdc.h.

GRE::SCENE3D& GRE_LAYERDC::Get3dScene  )  [inline]
 

Get 3D scene containing 3D transformations.

Definition at line 250 of file layerdc.h.

const GRE::SCENE3D& GRE_LAYERDC::Get3dScene  )  const [inline]
 

Get 3D scene containing 3D transformations.

Definition at line 246 of file layerdc.h.

GRE::SCENE3D::STEREOVIEW GRE_LAYERDC::Get3dStereoView  )  const [inline]
 

Get 3D stereo view setting.

Definition at line 258 of file layerdc.h.

double GRE_LAYERDC::Get3dSurfaceIncrement  )  const [inline]
 

Get increment in layer relative to once cell in surface layer.

Definition at line 254 of file layerdc.h.

double GRE_LAYERDC::Get3dZScale  )  const [inline]
 

Get 3D Z scaling.

Definition at line 262 of file layerdc.h.

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

Get clipping region in device coordinates.

Definition at line 266 of file layerdc.h.

double GRE_LAYERDC::GetDesignScale  )  const [inline]
 

Get design scale.

Definition at line 270 of file layerdc.h.

GRE::DRAWFLAGS GRE_LAYERDC::GetDrawFlags  )  const [inline]
 

Get drawing flags.

Definition at line 274 of file layerdc.h.

MGD::CONTEXT* GRE_LAYERDC::GetDrawingContext  )  const [inline]
 

Get drawing device context.

Definition at line 278 of file layerdc.h.

MGD::DEVICE* GRE_LAYERDC::GetDrawingDevice  )  const [inline]
 

Get drawing device.

Definition at line 282 of file layerdc.h.

double GRE_LAYERDC::GetDrawingScale  )  const [inline]
 

Get scale at which layer is currently being drawn.

Definition at line 286 of file layerdc.h.

BITSET* GRE_LAYERDC::GetElemDrawnSet ELEMTYPE  ElemType = ELEMTYPE_All  )  const
 

Get pointer to 'drawn set' based on specified element type and current target device.

Returns:
Pointer to BITSET, NULL if none available.

GRE_LAYER* GRE_LAYERDC::GetLayer  )  const [inline]
 

Get layer.

Definition at line 300 of file layerdc.h.

GRE::LAYERVIEW* GRE_LAYERDC::GetLayerView  )  [inline]
 

Get LAYERVIEW (non-const).

Definition at line 308 of file layerdc.h.

const GRE::LAYERVIEW* GRE_LAYERDC::GetLayerView  )  const [inline]
 

Get LAYERVIEW (const).

Definition at line 304 of file layerdc.h.

bool GRE_LAYERDC::GetNoDrawActive  )  const [inline]
 

Definition at line 311 of file layerdc.h.

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

Get the clip rectangle in object coordinates.

Definition at line 315 of file layerdc.h.

const DPOINT2D& GRE_LAYERDC::GetPixelSizeMM  )  const [inline]
 

Get pixel size in millimeters.

Definition at line 319 of file layerdc.h.

GRE::RENDERTARGET GRE_LAYERDC::GetRenderTarget  )  const [inline]
 

Get target based on current drawing device.

Definition at line 290 of file layerdc.h.

double GRE_LAYERDC::GetRotationAngle  )  const [inline]
 

Get rotation angle.

Definition at line 323 of file layerdc.h.

double GRE_LAYERDC::GetRotationCos  )  const [inline]
 

Get rotation cosine.

Definition at line 327 of file layerdc.h.

double GRE_LAYERDC::GetRotationSin  )  const [inline]
 

Get rotation sine.

Definition at line 331 of file layerdc.h.

GRE_LAYER_SURFACE* GRE_LAYERDC::GetSurfaceLayer  )  const [inline]
 

Get surface layer for 3D draping.

Definition at line 335 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 350 of file layerdc.h.

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

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

Definition at line 354 of file layerdc.h.

GRE_VIEW* GRE_LAYERDC::GetView  )  const [inline]
 

Definition at line 357 of file layerdc.h.

bool GRE_LAYERDC::HasSurfaceLayer  )  const [inline]
 

Determine if has surface layer.

Definition at line 361 of file layerdc.h.

bool GRE_LAYERDC::HasSurfaceNulls  )  const [inline]
 

Determine if surface has nulls.

Definition at line 365 of file layerdc.h.

bool GRE_LAYERDC::Is3D  )  const [inline]
 

Determine if drawing in 2D or 3D.

Definition at line 369 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 373 of file layerdc.h.

bool GRE_LAYERDC::IsSurfaceUsed  )  const [inline]
 

Determine if surface (layer or flat) is being used.

Definition at line 377 of file layerdc.h.

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

Send notification before drawing element.

Definition at line 386 of file layerdc.h.

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

Send notification before drawing element.

Definition at line 381 of file layerdc.h.

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

Send notification after drawing element.

Definition at line 397 of file layerdc.h.

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

Send notification after drawing element.

Definition at line 392 of file layerdc.h.

void GRE_LAYERDC::Set3dElemScaled bool  IsScaled  )  [inline]
 

Set whether current element is scaled when rendered in 3D.

Definition at line 403 of file layerdc.h.

void GRE_LAYERDC::Set3dStereoView GRE::SCENE3D::STEREOVIEW  StereoView  ) 
 

void GRE_LAYERDC::SetDrawFlags GRE::DRAWFLAGS  drawflags  ) 
 

Set drawing flags.

void GRE_LAYERDC::SetDrawingDevice MGD::DEVICE pDevice  ) 
 

Set drawing device.

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


The documentation for this class was generated from the following file:
Generated on Wed May 31 15:28:38 2006 for TNTsdk by  doxygen 1.3.8-20040913