[原][譯][osgearth]樣式表style中參數總結(OE官方文檔翻譯)


幾何Geometry

高度Altitude

擠壓Extrusion

圖標Icon

模型Model

渲染Render

皮膚Skin

文本Text

覆蓋Coverage

 

提示:  在SDK中,樣式表的命名空間是osgEarth::Symbology

      每個符號類是在AltitudeSymbol中,屬性通過LineSymbol::strokeWidth() 訪問器可用

值類型

 

float:

實數

 float with units:

有單位的實數, e.g. 20px (20 pixels) or 10m (10 meters)

HTML_Color:

顏色以十六進制格式字符串,用於HTML;# RRGGBB或# RRGGBBAA的格式。(例如:# FFCC007F)

integer:

整數

numeric_expr:

表達式(簡單或JavaScript)解決一個數字

string:

字符串

string_expr:

表達式(簡單或JavaScript)解決一個文本字符串

uri_string:

表示(如URL資源位置的字符串或文件路徑)。

 

幾何Geometry

基本幾何符號(SDK:LineSymbol、PolygonSymbol PointSymbol)控制矢量數據的顏色和風格

Property Description Value(s)
fill Fill color for a polygon. HTML color
stroke Line color (or polygon outline color, if fill is present) HTML color
stroke-width Line width float with units
stroke-min-pixels Minimum rendering width; Prevents a line from getting thinner than this value in pixels. Only applies when the stroke-width is NOT in pixels float (pixels)
stroke-tessellation Number of times to subdivide a line integer
stroke-linejoin Join style for polygonized lines. Only applies with stroke-width is in world units (and not pixels) miter, round
stroke-linecap Cap style for polygonized lines. Only applies with stroke-width is in world units (and not pixels) square, flat, round
stroke-rounding-ratio For joins and caps that are set to round, the resolution of the rounded corner. Value is the ratio of line width to corner segment length. float (0.4)
stroke-stipple-pattern Stippling pattern bitmask. Each set bit represents an “on” pixel in the pattern. integer (65535)
stroke-stipple-factor Stipple factor for pixel-width lines. Number of times to repeat each bit in the stippling pattern integer (1)
stroke-crease-angle When outlining extruded polygons, only draw a post outline if the angle between the adjoining faces exceeds this value. This has the effect of only outlining corners that are sufficiently “sharp”. float degrees (0.0)
point-fill Fill color for a point. HTML color
point-size Size for a GL point geometry

 

高度Altitude

高度的符號(SDK:AltitudeSymbol)控制功能與地形的交互在它的位置。

Property Description
altitude-clamping
控制地形的行為
none: no clamping
terrain: 跟隨地形
relative: 跟隨地形但保留Z值
absolute: 使用Z的絕對值
altitude-technique

altitude-clamping 設置 terrain模式的時候,使用

map: 使用地圖的高度數據
drape: 用投影紋理數據
gpu: 用GPU的數據
scene: 用心的分頁數據重新加載
altitude-binding

  當 altitude-technique 選擇 map,使用的間隔

vertex: 每個頂點
centroid: 每個特征的中心
altitude-resolution 當“altitude-technique”選擇“map”,高程使用和樣例地形高度一樣的分辨率數據
altitude-offset 垂直偏移
altitude-scale 縮放


擠壓Extrusion

擠壓符號(SDK:ExtrusionSymbol)指導osgEarth創建擠壓幾何從源矢量數據;擠壓一個2 d向量轉化為3 d形狀。注意:簡單的anextrusion屬性將使擠壓。

Property Description
extrusion-height How far to extrude the vector data (numeric-expr)
extrusion-flatten Whether to force all extruded vertices to the same Z value (bool). For example, if you are extruding polygons to make 3D buildings, setting this to true will force the rooftops to be flat even if the underlying terrain is not. (boolean)
extrusion-wall-gradient Factor by which to multiply the fill color of the extruded geometry at the base of the 3D shape. This results in the 3D shape being darker at the bottom than at the top, a nice effect. (float [0..1]; try 0.75)
extrusion-wall-style Name of another style in the same stylesheet that osgEarth should apply to the walls of the extruded shape. (string)
extrusion-roof-style Name of another style in the same stylesheet that osgEarth should apply to the roof of the extruded shape. (string)


圖標Icon

圖標符號(SDK:IconSymbol)描述二維圖標的外觀。圖標是用於不同的東西,最常見的是:
點替換,用圖標代替幾何模型
注釋的地方

Property Description
icon URI of the icon image. (uri-string)
icon-library Name of a resource library containing the icon (optional)
icon-placement

For model substitution, describes how osgEarth should replace geometry with icons:

vertex: Replace each vertex in the geometry with an icon.
interval: Place icons at regular intervals along the geometry, according to the icon-density property.
random: Place icons randomly within the geometry, according to the icon-density property.
centroid: Place a single icon at the centroid of the geometry.
icon-density For icon-placement settings of interval or random, this property is hint as to how many instances osgEarth should place. The unit is approximately “units per km” (for linear data) or “units per square km” for polygon data. (float)
icon-scale Scales the icon by this amount (float)
icon-heading Rotates the icon along its central axis (float, degrees)
icon-declutter Activate decluttering for this icon. osgEarth will attempt to automatically show or hide things so they don’t overlap on the screen. (boolean)
icon-align

Sets the icon’s location relative to its anchor point. The valid values are in the form “horizontal-vertical”, and are:

  • left-top
  • left-center
  • left-bottom
  • center-top
  • center-center
  • center-bottom
  • right-top
  • right-center
  • right-bottom
icon-random-seed For random placement operations, set this seed so that the randomization is repeatable each time you run the app. (integer)
icon-occlusion-cull Whether to occlusion cull the text so they do not display when line of sight is obstructed by terrain
icon-occlusion-cull-altitude The viewer altitude (MSL) to start occlusion culling when line of sight is obstructed by terrain


模型Model

模型符號(SDK:ModelSymbol)描述了外部的3 d模型。如圖標,模型通常用於:
點替換,用3 d模型代替幾何模型
模型的注釋

Property Description
model URI of the 3D model (uri-string). Use this OR the model-library property, but not both.
model-library Name of a resource library containing the model. Use this OR the model property, but not both.
model-placement

For model substitution, describes how osgEarth should replace geometry with models:

vertex: Replace each vertex in the geometry with a model.
interval: Place models at regular intervals along the geometry, according to the model-density property.
random: Place models randomly within the geometry, according to the model-density property.
centroid: Place a single model at the centroid of the geometry.
model-density For model-placement settings of interval or random, this property is hint as to how many instances osgEarth should place. The unit is approximately “units per km” (for linear data) or “units per square km” for polygon data. (float)
model-scale Scales the model by this amount along all axes (float)
model-heading Rotates the about its +Z axis (float, degrees)
icon-random-seed For random placement operations, set this seed so that the randomization is repeatable each time you run the app. (integer)


渲染Render

渲染符號(SDK:RenderSymbol)適用於一般OpenGL渲染設置以及一些osgEarth-specific設置並非特定於任何其他符號類型。

Property Description
render-depth-test Enable or disable GL depth testing. (boolean)
render-lighting Enable or disable GL lighting. (boolean)
render-transparent hint to render in the transparent (depth-sorted) bin (boolean)
render-bin render bin to use for sorting (string)
render-depth-offset Enable or disable Depth Offseting. Depth offsetting is a GPU technique that modifies a fragment’s depth value, simulating the rendering of that object closer or farther from the viewer than it actually is. It is a mechanism for mitigating z-fighting. (boolean)
render-depth-offset-min-bias Sets the minimum bias (distance-to-viewer offset) for depth offsetting. If is usually sufficient to set this property; all the others will be set automatically. (float, meters)
render-depth-offset-max-bias Sets the minimum bias (distance-to-viewer offset) for depth offsetting.
render-depth-offset-min-range Sets the range (distance from viewer) at which to apply the minimum depth offsetting bias. The bias graduates between its min and max values over the specified range.
render-depth-offset-max-range Sets the range (distance from viewer) at which to apply the maximum depth offsetting bias. The bias graduates between its min and max values over the specified range.


皮膚Skin

皮膚象征(SDK:SkinSymbol)紋理映射適用於幾何形狀,當適用。(目前只適用於擠壓幾何)。

Property Description
skin-library Name of the resource library containing the skin(s)
skin-tags Set of strings (separated by whitespace containing one or more resource tags. When selecting a texture skin to apply, osgEarth will limit the selection to skins with one of these tags. If you omit this property, all skins are considered. For example, if you are extruding buildings, you may only want to consider textures with the building tag. (string)
skin-tiled When set to true, osgEarth will only consider selecting a skin that has its tiled attribute set to true. The tiled attribute indicates that the skin may be used as a repeating texture. (boolean)
skin-object-height Numeric expression resolving to the feature’s real-world height (in meters). osgEarth will use this value to narrow down the selection to skins appropriate to that height (i.e., skins for which the value falls between the skin’s min/max object height range. (numeric-expr)
skin-min-object-height Tells osgEarth to only consider skins whose minimum object height is greater than or equal to this value. (numeric-expr)
skin-max-object-height Tells osgEarth to only consider skins whose maximum object height is less than or equal to this value. (numeric-expr)
skin-random-seed Once the filtering is done (according to the properties above, osgEarth determines the minimal set of appropriate skins from which to choose and chooses one at random. By setting this seed value you can ensure that the same “random” selection happens each time you run the appplication. (integer)


文本Text

文字符號(SDK:TextSymbol)控制文本標簽的存在和外觀。

Property Description
text-fill Foreground color of the text (HTML color)
text-size Size of the text (float, pixels)
text-font Name of the font to use (system-dependent). For example, use “arialbd” on Windows for Arial Bold.
text-halo Outline color of the text; Omit this propery altogether for no outline. (HTML Color)
text-halo-offset Outline thickness (float, pixels)
text-offset-x The x offset of the text in pixels
text-offset-y The y offset of the text in pixels
text-align
Alignment of the text string relative to its anchor point:
  • left-top
  • left-center
  • left-bottom
  • left-base-line
  • left-bottom-base-line
  • center-top
  • center-center
  • center-bottom
  • center-base-line
  • center-bottom-base-line
  • right-top
  • right-center
  • right-bottom
  • right-base-line
  • right-bottom-base-line
  • base-line
text-layout
Layout of text:
  • ltr
  • rtl
  • vertical
text-content The actual text string to display (string-expr)
text-encoding
Character encoding of the text content:
  • utf-8
  • utf-16
  • utf-32
  • ascii
text-declutter Activate decluttering for this icon. osgEarth will attempt to automatically show or hide things so they don’t overlap on the screen. (boolean)
text-occlusion-cull Whether to occlusion cull the text so they do not display when line of sight is obstructed by terrain
text-occlusion-cull-altitude The viewer altitude (MSL) to start occlusion culling when line of sight is obstructed by terrain

 


覆蓋Coverage

覆蓋符號(SDK:CoverageSymbol)控制功能是光柵為覆蓋率數據的離散值。

PropertyDescriptioncoverage-valueExpression resolving to the floating-point value to encode.

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM