| 99 | Descriptions of the key parameters are given below: |
| 100 | |
| 101 | ||ZOffset||An expression that evaluates to the height of the base of the feature in meters|| |
| 102 | ||ZExtrusion||An expression that evaluates to the desired vertical extrusion (in meters) to be applied to the feature|| |
| 103 | ||ZOffsetType||A string value, either "!RelativeToGround" or "Absolute", that indicates how to interpret the ZOffset value|| |
| 104 | |
| 105 | Additional !ExtendedData elements have been added to allow for future extensions to this part of the schema. |
| 106 | |
| 107 | === MDF Model and Parser Modifications === |
| 108 | |
| 109 | The MDF Model would require the addition of two new classes: !ElevationSettings and !VectorScaleRangeExtendedData1, corresponding to the <!ElevationSettings> and custom <!ExtendedData1> elements respectively. Similarly, the MDF Parser would require two new classes: IOElevationSettings and IOVectorScaleRangeExtendedData1. |
| 110 | |
| 111 | The parser classes would be responsible for reading and writing the elevation settings to/and from XML. The model classes would be used to store and access those settings. The methods implemented by each class would be very simple get/set or read/write functions. |
| 112 | |
| 113 | === Rendering / Stylization Modifications === |
| 114 | |
| 115 | A few changes would be required to the internal stylization interfaces in order to pass the elevation settings through the framework to the Stylize() methods of the affected !GeometryAdapters. Inside these methods, the offset and extrusion expressions would be evaluated for the current feature, and the resulting floating point values would be passed as additional parameters into the Renderer::!StartFeature() command. The method signature chages are as follows: |
| 116 | |
| 117 | !GeometryAdapter::Stylize() would be modified from this: |
| 118 | {{{ |
| 119 | virtual void Stylize(Renderer* /*renderer*/, |
| 120 | RS_FeatureReader* /*features*/, |
| 121 | RS_FilterExecutor* /*exec*/, |
| 122 | LineBuffer* /*lb*/, |
| 123 | MdfModel::FeatureTypeStyle* /*style*/, |
| 124 | const MdfModel::MdfString* /*tooltip = NULL*/, |
| 125 | const MdfModel::MdfString* /*url = NULL*/) |
| 126 | }}} |
| 127 | to this: |
| 128 | {{{ |
| 129 | virtual void Stylize(Renderer* /*renderer*/, |
| 130 | RS_FeatureReader* /*features*/, |
| 131 | RS_FilterExecutor* /*exec*/, |
| 132 | LineBuffer* /*lb*/, |
| 133 | MdfModel::FeatureTypeStyle* /*style*/, |
| 134 | const MdfModel::MdfString* /*tooltip = NULL*/, |
| 135 | const MdfModel::MdfString* /*url = NULL*/, |
| 136 | RS_ElevationSettings* /*elevSettings = NULL*/) |
| 137 | }}} |
| 138 | where RS_ElevationSettings is a simple struct-like class that contains the elevation settings. |
| 139 | |
| 140 | Renderer::!StartFeature() would be modified from this: |
| 141 | {{{ |
| 142 | virtual void StartFeature (RS_FeatureReader* feature, |
| 143 | const RS_String* tooltip = NULL, |
| 144 | const RS_String* url = NULL, |
| 145 | const RS_String* theme = NULL) = 0; |
| 146 | }}} |
| 147 | to this: |
| 148 | {{{ |
| 149 | virtual void StartFeature (RS_FeatureReader* feature, |
| 150 | const RS_String* tooltip = NULL, |
| 151 | const RS_String* url = NULL, |
| 152 | const RS_String* theme = NULL, |
| 153 | double zOffset = 0, |
| 154 | double zExtrusion = 0, |
| 155 | RS_ElevationType zOffsetType = RS_ElevationType_RelativeToGround) = 0; |
| 156 | }}} |
| 157 | |