Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 2.06 KB

nodePageDefinition.cmn.md

File metadata and controls

39 lines (26 loc) · 2.06 KB

nodePageDefinition [common profile]

Nodes are stored contiguously in what can be considered a flat array of nodes. This array can be accessed by fixed-size pages of nodes for better request efficiency. All pages contains exactly layer.nodePages.nodesPerPage nodes, except for the last page (that may contain less). We use an integer ID to map a node to its page as follow:

page_id         = floor( node_id / node_per_page)
node_id_in_page = modulo( node_id, node_per_page)

Related:

cmn::3DSceneLayer, psl::3DSceneLayer, cmn::node

Properties

Property Type Description
nodesPerPage integer Number of nodes per page for this layer. Must be a power-of-two less than 4096
rootIndex integer Index of the root node. Default = 0.
lodSelectionMetricType string Defines the meaning of nodes[].lodThreshold for this layer.
Must be:
  • maxScreenThresholdSQ: A per-node value for the maximum area of the projected bounding volume on screen in pixel squared. 3D Viewers may implement look-angle dependent node switching by comparing this metric with the area of the 2D outline of the oriented-bounding box (OBB) on screen. ( see "Fast Projected Area Computation for Three-Dimensional Bounding Boxes", Dieter Schmalstieg and Robert F. Tobler for an efficient algorithm). If a look-angle independent LOD switching is desired, viewers may use the area of minimum bounding-sphere (MBS) of the node if available or the MBS of the OBB otherwise. Note: maxScreenThresholdSQ may be related to maxScreenThreshold as follow: maxScreenThresholdSQ = PI * 0.25 * maxScreenThreshold * maxScreenThreshold

Note: properties in bold are required

Examples

Example: 64 nodes per page index

 {
  "nodesPerPage": 64,
  "rootIndex": 0,
  "lodSelectionMetricType": "maxScreenThresholdSQ"
}