GRE::LAYERDC Class Reference

Layer drawing context. More...

#include <gre/layerdc.h>

Inheritance diagram for GRE::LAYERDC:

Inheritance graph
POLYLINE::CLIP
[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
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
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
bool HasSurfaceLayer () const
bool HasSurfaceNulls () const
bool Is3D () const
bool IsHidden () const
bool IsSurfaceUsed () const
 LAYERDC (GRE::VIEW *view, MGD::DEVICE *pDevice, const TRANS2D_MAPGEN &ObjectToDevice, GRE::DRAWFLAGS drawflags=GRE::DRAWFLAG_None)
 LAYERDC (LAYER *layer, GRE::VIEW *view, MGD::DEVICE *pDevice=0, GRE::DRAWFLAGS drawflags=GRE::DRAWFLAG_None)
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 ~LAYERDC ()

Detailed Description

Layer drawing context.

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

Definition at line 148 of file layerdc.h.


Constructor & Destructor Documentation

GRE::LAYERDC::LAYERDC ( 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::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::~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 199 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 249 of file layerdc.h.

GRE::SCENE3D& GRE::LAYERDC::Get3dScene (  )  [inline]

Get 3D scene containing 3D transformations.

Definition at line 257 of file layerdc.h.

const GRE::SCENE3D& GRE::LAYERDC::Get3dScene (  )  const [inline]

Get 3D scene containing 3D transformations.

Definition at line 253 of file layerdc.h.

GRE::SCENE3D::STEREOVIEW GRE::LAYERDC::Get3dStereoView (  )  const [inline]

Get 3D stereo view setting.

Definition at line 265 of file layerdc.h.

double GRE::LAYERDC::Get3dSurfaceIncrement (  )  const [inline]

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

Definition at line 261 of file layerdc.h.

double GRE::LAYERDC::Get3dZScale (  )  const [inline]

Get 3D Z scaling.

Definition at line 269 of file layerdc.h.

const REGION2D& GRE::LAYERDC::GetClipRegion (  )  const [inline]

Get clipping region in device coordinates.

Definition at line 273 of file layerdc.h.

double GRE::LAYERDC::GetDesignScale (  )  const [inline]

Get design scale.

Definition at line 277 of file layerdc.h.

GRE::DRAWFLAGS GRE::LAYERDC::GetDrawFlags (  )  const [inline]

Get drawing flags.

Definition at line 281 of file layerdc.h.

MGD::CONTEXT* GRE::LAYERDC::GetDrawingContext (  )  const [inline]

Get drawing device context.

Definition at line 285 of file layerdc.h.

MGD::DEVICE* GRE::LAYERDC::GetDrawingDevice (  )  const [inline]

Get drawing device.

Definition at line 289 of file layerdc.h.

double GRE::LAYERDC::GetDrawingScale (  )  const [inline]

Get scale at which layer is currently being drawn.

Definition at line 293 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.

LAYER* GRE::LAYERDC::GetLayer (  )  const [inline]

Get layer.

Definition at line 307 of file layerdc.h.

GRE::LAYERVIEW* GRE::LAYERDC::GetLayerView (  )  [inline]

Get LAYERVIEW (non-const).

Definition at line 315 of file layerdc.h.

const GRE::LAYERVIEW* GRE::LAYERDC::GetLayerView (  )  const [inline]

Get LAYERVIEW (const).

Definition at line 311 of file layerdc.h.

bool GRE::LAYERDC::GetNoDrawActive (  )  const [inline]

Definition at line 318 of file layerdc.h.

const DRECT2D& GRE::LAYERDC::GetObjectClipRect (  )  const [inline]

Get the clip rectangle in object coordinates.

Definition at line 322 of file layerdc.h.

const DPOINT2D& GRE::LAYERDC::GetPixelSizeMM (  )  const [inline]

Get pixel size in millimeters.

Definition at line 326 of file layerdc.h.

GRE::RENDERTARGET GRE::LAYERDC::GetRenderTarget (  )  const [inline]

Get target based on current drawing device.

Definition at line 297 of file layerdc.h.

double GRE::LAYERDC::GetRotationAngle (  )  const [inline]

Get rotation angle.

Definition at line 330 of file layerdc.h.

double GRE::LAYERDC::GetRotationCos (  )  const [inline]

Get rotation cosine.

Definition at line 334 of file layerdc.h.

double GRE::LAYERDC::GetRotationSin (  )  const [inline]

Get rotation sine.

Definition at line 338 of file layerdc.h.

LAYER_SURFACE* GRE::LAYERDC::GetSurfaceLayer (  )  const [inline]

Get surface layer for 3D draping.

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

const TRANS2D_MAPGEN& GRE::LAYERDC::GetTransLayerSurface (  )  const [inline]

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

Definition at line 361 of file layerdc.h.

GRE::VIEW* GRE::LAYERDC::GetView (  )  const [inline]

Definition at line 364 of file layerdc.h.

bool GRE::LAYERDC::HasSurfaceLayer (  )  const [inline]

Determine if has surface layer.

Definition at line 368 of file layerdc.h.

bool GRE::LAYERDC::HasSurfaceNulls (  )  const [inline]

Determine if surface has nulls.

Definition at line 372 of file layerdc.h.

bool GRE::LAYERDC::Is3D (  )  const [inline]

Determine if drawing in 2D or 3D.

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

bool GRE::LAYERDC::IsSurfaceUsed (  )  const [inline]

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

Definition at line 384 of file layerdc.h.

void GRE::LAYERDC::NotifyDrawElementBegin ( ELEMTYPE  ElemType,
INT32  ElemNum 
) const [inline]

Send notification before drawing element.

Definition at line 393 of file layerdc.h.

void GRE::LAYERDC::NotifyDrawElementBegin ( const RVC::ELEMENT element  )  const [inline]

Send notification before drawing element.

Definition at line 388 of file layerdc.h.

void GRE::LAYERDC::NotifyDrawElementEnd ( ELEMTYPE  ElemType,
INT32  ElemNum 
) const [inline]

Send notification after drawing element.

Definition at line 404 of file layerdc.h.

void GRE::LAYERDC::NotifyDrawElementEnd ( const RVC::ELEMENT element  )  const [inline]

Send notification after drawing element.

Definition at line 399 of file layerdc.h.

void GRE::LAYERDC::Set3dElemScaled ( bool  IsScaled  )  [inline]

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

Definition at line 410 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 Thu Apr 26 04:48:04 2007 for TNTsdk by  doxygen 1.5.2