OpenCPN Partial API docs
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PlugInChartBaseGL Class Reference

OpenGL-optimized chart base class for plugin chart types. More...

#include <ocpn_plugin.h>

Inheritance diagram for PlugInChartBaseGL:
PlugInChartBase PlugInChartBaseGLPlus2

Public Member Functions

virtual int RenderRegionViewOnGL (const wxGLContext &glc, const PlugIn_ViewPort &VPoint, const wxRegion &Region, bool b_use_stencil)
 Renders chart content using OpenGL.
 
virtual ListOfPI_S57Obj * GetObjRuleListAtLatLon (float lat, float lon, float select_radius, PlugIn_ViewPort *VPoint)
 Gets chart objects near specified position.
 
virtual wxString CreateObjDescriptions (ListOfPI_S57Obj *obj_list)
 Creates description text for chart objects.
 
virtual int GetNoCOVREntries ()
 Gets number of no-coverage areas in chart.
 
virtual int GetNoCOVRTablePoints (int iTable)
 Gets number of points in no-coverage area boundary.
 
virtual int GetNoCOVRTablenPoints (int iTable)
 Alternative to GetNoCOVRTablePoints().
 
virtual float * GetNoCOVRTableHead (int iTable)
 Gets coordinate data for no-coverage area boundary.
 
- Public Member Functions inherited from PlugInChartBase
virtual wxString GetFileSearchMask (void)
 Returns file pattern(s) for chart files this plugin can handle.
 
virtual int Init (const wxString &full_path, int init_flags)
 Initializes a chart instance from a file.
 
virtual void SetColorScheme (int cs, bool bApplyImmediate)
 Sets the color scheme for chart display.
 
virtual double GetNormalScaleMin (double canvas_scale_factor, bool b_allow_overzoom)
 Returns the minimum recommended scale for this chart.
 
virtual double GetNormalScaleMax (double canvas_scale_factor, int canvas_width)
 Returns the maximum recommended scale for this chart.
 
virtual double GetNearestPreferredScalePPM (double target_scale_ppm)
 Returns the nearest preferred scale value for this chart.
 
virtual bool GetChartExtent (ExtentPI *pext)
 Gets the geographic boundaries of the chart.
 
virtual wxBitmap & RenderRegionView (const PlugIn_ViewPort &VPoint, const wxRegion &Region)
 Renders a region of the chart for display.
 
virtual bool AdjustVP (PlugIn_ViewPort &vp_last, PlugIn_ViewPort &vp_proposed)
 Adjusts viewport parameters for chart-specific requirements.
 
virtual void GetValidCanvasRegion (const PlugIn_ViewPort &VPoint, wxRegion *pValidRegion)
 Determines the valid display area for this chart.
 
virtual int GetCOVREntries ()
 Returns the number of coverage table entries for this chart.
 
virtual int GetCOVRTablePoints (int iTable)
 Returns the number of points in a specific coverage table entry.
 
virtual int GetCOVRTablenPoints (int iTable)
 Alternative method to get the number of points in a coverage table entry.
 
virtual float * GetCOVRTableHead (int iTable)
 Returns a pointer to the coverage table data for a specific entry.
 
virtual wxBitmap * GetThumbnail (int tnx, int tny, int cs)
 Generates a thumbnail image of the chart.
 
virtual wxString GetFullPath () const
 Returns the full file path of the chart.
 
virtual ChartTypeEnumPI GetChartType ()
 Returns the chart type identifier.
 
virtual ChartFamilyEnumPI GetChartFamily ()
 Returns the chart family classification.
 
virtual OcpnProjTypePI GetChartProjection ()
 Returns the projection type used by the chart.
 
virtual wxString GetName ()
 Returns the chart's name or title.
 
virtual wxString GetDescription ()
 Returns a descriptive text about the chart.
 
virtual wxString GetID ()
 Returns a unique identifier for the chart.
 
virtual wxString GetSE ()
 Returns the chart's source edition identifier.
 
virtual wxString GetDepthUnits ()
 Returns the depth units used in the chart.
 
virtual wxString GetSoundingsDatum ()
 Returns the vertical datum used for soundings in the chart.
 
virtual wxString GetDatumString ()
 Returns the horizontal geodetic datum of the chart.
 
virtual wxString GetExtraInfo ()
 Returns additional information about the chart.
 
virtual wxString GetPubDate ()
 Returns the publication date/year of the chart.
 
virtual double GetChartErrorFactor ()
 Returns the error factor for the chart.
 
virtual ChartDepthUnitTypePI GetDepthUnitId ()
 Returns the depth unit type identifier.
 
virtual bool IsReadyToRender ()
 Indicates whether the chart is ready for rendering.
 
virtual int GetNativeScale ()
 Returns the native scale of the chart.
 
virtual double GetChartSkew ()
 Returns the skew/rotation angle of the chart.
 
virtual wxDateTime GetEditionDate (void)
 Returns the edition date of the chart.
 
virtual void ComputeSourceRectangle (const PlugIn_ViewPort &vp, wxRect *pSourceRect)
 Computes the source rectangle for the chart based on a given viewport.
 
virtual double GetRasterScaleFactor ()
 Returns the scale factor for raster chart rendering.
 
virtual bool GetChartBits (wxRect &source, unsigned char *pPix, int sub_samp)
 Gets pixel data for a portion of a raster chart.
 
virtual int GetSize_X ()
 Gets the width of the chart in pixels.
 
virtual int GetSize_Y ()
 Gets the height of the chart in pixels.
 
virtual void latlong_to_chartpix (double lat, double lon, double &pixx, double &pixy)
 Converts geographic coordinates to chart pixel coordinates.
 
virtual void chartpix_to_latlong (double pixx, double pixy, double *plat, double *plon)
 Converts chart pixel coordinates to geographic coordinates.
 

Additional Inherited Members

- Protected Attributes inherited from PlugInChartBase
ChartTypeEnumPI m_ChartType
 
ChartFamilyEnumPI m_ChartFamily
 
wxString m_FullPath
 
OcpnProjTypePI m_projection
 
int m_Chart_Scale
 
double m_Chart_Skew
 
wxDateTime m_EdDate
 
bool m_bReadyToRender
 
wxString m_Name
 
wxString m_Description
 
wxString m_ID
 
wxString m_SE
 
wxString m_SoundingsDatum
 
wxString m_datum_str
 
wxString m_PubYear
 
wxString m_DepthUnits
 
wxString m_ExtraInfo
 
ChartDepthUnitTypePI m_depth_unit_id
 
double m_Chart_Error_Factor
 

Detailed Description

OpenGL-optimized chart base class for plugin chart types.

Derived from PlugInChartBase, this class adds OpenGL-specific rendering methods for vector charts. It's designed for charts that can benefit from hardware acceleration and OpenGL features.

Key capabilities:

  • Direct OpenGL rendering for better performance
  • Vector object management and queries
  • Support for S57 chart features
Examples
/home/runner/work/main/main/opencpn/include/ocpn_plugin.h.

Definition at line 3307 of file ocpn_plugin.h.

Constructor & Destructor Documentation

◆ PlugInChartBaseGL()

PlugInChartBaseGL::PlugInChartBaseGL ( )

Definition at line 3508 of file pluginmanager.cpp.

◆ ~PlugInChartBaseGL()

PlugInChartBaseGL::~PlugInChartBaseGL ( )
virtual

Definition at line 3510 of file pluginmanager.cpp.

Member Function Documentation

◆ CreateObjDescriptions()

wxString PlugInChartBaseGL::CreateObjDescriptions ( ListOfPI_S57Obj *  obj_list)
virtual

Creates description text for chart objects.

Generates human-readable descriptions of S57 objects for tooltips and info displays.

Parameters
obj_listList of objects to describe
Returns
Formatted description text

Definition at line 3524 of file pluginmanager.cpp.

◆ GetNoCOVREntries()

int PlugInChartBaseGL::GetNoCOVREntries ( )
virtual

Gets number of no-coverage areas in chart.

Returns
Number of no-coverage table entries (0 if none)

Definition at line 3528 of file pluginmanager.cpp.

◆ GetNoCOVRTableHead()

float * PlugInChartBaseGL::GetNoCOVRTableHead ( int  iTable)
virtual

Gets coordinate data for no-coverage area boundary.

Parameters
iTableIndex of no-coverage area
Returns
Pointer to array of lat/lon points, NULL if invalid index

Definition at line 3534 of file pluginmanager.cpp.

◆ GetNoCOVRTablenPoints()

int PlugInChartBaseGL::GetNoCOVRTablenPoints ( int  iTable)
virtual

Alternative to GetNoCOVRTablePoints().

Parameters
iTableIndex of no-coverage area
Returns
Number of points in boundary polygon

Definition at line 3532 of file pluginmanager.cpp.

◆ GetNoCOVRTablePoints()

int PlugInChartBaseGL::GetNoCOVRTablePoints ( int  iTable)
virtual

Gets number of points in no-coverage area boundary.

Parameters
iTableIndex of no-coverage area
Returns
Number of points in boundary polygon

Definition at line 3530 of file pluginmanager.cpp.

◆ GetObjRuleListAtLatLon()

ListOfPI_S57Obj * PlugInChartBaseGL::GetObjRuleListAtLatLon ( float  lat,
float  lon,
float  select_radius,
PlugIn_ViewPort VPoint 
)
virtual

Gets chart objects near specified position.

Returns list of S57 objects within selection radius of given position. Used for object queries and pick operations.

Parameters
latPosition latitude
lonPosition longitude
select_radiusSearch radius in pixels
VPointCurrent viewport
Returns
List of S57 objects found, NULL if none

Definition at line 3519 of file pluginmanager.cpp.

◆ RenderRegionViewOnGL()

int PlugInChartBaseGL::RenderRegionViewOnGL ( const wxGLContext &  glc,
const PlugIn_ViewPort VPoint,
const wxRegion &  Region,
bool  b_use_stencil 
)
virtual

Renders chart content using OpenGL.

Primary rendering method for OpenGL-enabled chart display. Allows efficient hardware-accelerated rendering of vector charts.

Parameters
glcOpenGL context for rendering
VPointCurrent viewport parameters
RegionRegion to render in screen coordinates
b_use_stencilTrue to enable stencil buffer for clipping
Returns
Status/error code: 0 = no error Other values indicate rendering errors

Definition at line 3512 of file pluginmanager.cpp.


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