Extensible 3D (X3D)
Part 1: Architecture and base components

Layering Component (Xj3D Extension)

--- X3D separator bar ---

cube x.1. Introduction

x.1.1 Name

The name of this component is "xj3d_Layering". This name shall be used when referring to this component in the COMPONENT statement (see ISO FDIS 19775-1:200x 7.2.5.4 Component statement).

x.1.2 Overview

The layering extension is used to control the position and movement of individual layers within the viewing window. It is designed to act as an extension to the core Layering component provided in the X3D Amd2 specification

Table x.1 — Topics

cube 2 Concepts

x.2.1 Overview

The core X3D specification contains the ability to layer geometry in multiple subscenes that are composited together to create the final rendering per frame. In the base specification, a layer consumes the entire available screen space. For many applications of layers, this is not useful as the layer presents small user interface elements, such as buttons that should not cover the entire screen. The purpose of this component is to provide the ability to restrict the rendering within an individual layer to a small subset of the available screen space to the containing layer. This concept is termed a viewport.

Viewport nodes are used to describe the amount and location of the restricted screen space within a given layer. They do not contain content themselves, as that is maintained by the layer node. The content shall remain the same, regardless of how or where it is placed on the screen.

x.2.2 Coordinate Systems

The viewport describes a position in screen space that the content should be rendered to. X3D is rendering device independent, yet a viewport requires restricting rendering to a subsection of the output device. In order to resolve this conflict, this specification defines a new coordinate space for the screen representation. We start by defining the output device as physical object that our content is rendered to. This display device has a natural origin based on it's physical characteristics. A desktop screen would be at the center of the screen, a 6 wall immersive environment (a.k.a CAVE) has a "front" wall and so forth. The center of this display is where the content, using a default viewpoint would show on the screen. This center location is treated as the 2D origin for the viewport description. The viewport is placed relative to this screen space origin.

cube x.3 Absrtact Types

x.3.1 X3DViewportNode

X3DViewportNode : X3DNode {
   SFNode  [in, out] metadata NULL [X3DMetadataObject]
}

Defines a node that lays out a section of screen space to place the X3D content in for the layer it is embedded in.

cube x.4 Node reference

x.4.1 CustomViewport

CustomViewport : X3DViewportNode {
   SFNode  [in, out] metadata      NULL [X3DMetadataObject]
   SFBool  []        fixedX        TRUE
   SFBool  []        fixedY        TRUE
   SFBool  []        fixedHeight   TRUE
   SFBool  []        fixedWidth    TRUE
   SFFloat []        height        0
   SFFloat []        width         0
   SFFloat []        x             0
   SFFloat []        y             0
}

Allows for the custom creation of a viewport that is mixed between fixed and proportional configuration. For example, it allows one axis to be defined as relative to the overall screen space, while another is fixed in pixel size. If the layout fixed fields are set to true, then the floating point value is treated as an integer value. Non-integer values are truncated to generate the corresponding integer pixel value.

The four fields fixedX,fixedY,fixedHeight, fixedWidth, are used to indicate whether to treat the values of the corresponding size fields of x, y, width, and height as proportional or fixed. When set to TRUE the corresponding size field is treated as a fixed pixel dimension value. When set to FALSE the size field is treated as a proportional amount of the available screen space.

x.4.2 FixedViewport

FixedViewport : X3DViewportNode {
   SFNode   [in, out] metadata           NULL	[X3DMetadataObject]
   SFInt32  []        height             0      (0,0)
   SFInt32  []        width              0      (0,0)
   SFInt32  []        x                  0      (0,0)
   SFInt32  []        y                  0      (0,0)
}

Places the viewport at a fixed pixel location in the surface. Dimensions are in pixels relative to the center of the screen, looking directly down the view axis.

x.4.3 ProportionalViewport

ProportionalViewport : X3DViewportNode {
   SFNode  [in, out] metadata   NULL  [X3DMetadataObject]
   SFFloat []        height     0     [-1,1]
   SFFloat []        width      0     [-1,1]
   SFFloat []        x          0     [-1,1]
   SFFloat []        y          0     [-1,1]
}

Places and sizes the viewport in a manner that is always porportional to the total window size. Values provided describe a percentage of the primary window space that is to be covered by this viewport. A value of 1 indicates 100% coverage of the screen space for this layer in the appropriate axis.

The origin of the viewport is described by the two fields x and y. Negative values indicate a starting position to the left and below the screen space origin. Positive values to the right and above the screen space origin.

The size of the viewport is described by the width and height fields. The values indicate the percentage of the total screen space that should be consumed by this viewport. Negative values indicate that the viewport should take screen space to the left and below the origin of viewport layout, while positive values go to the right and above the viewport's origin.

cube x.5 Support Levels

The Layering component defines two levels of support as specified in Table 2.

Table x.2 — Layering component support levels

LevelPrequisitesNodes/FeaturesSupport
Level 1 Core 1
Grouping 1
Shape 1
Rendering 1
Texturing 1
Layering 1
X3DViewportNode n/a
CustomViewport All fields fully supported
FixedViewport All fields fully supported
ProportionalViewport All fields fully supported
XYLayout All fields fully supported
--- X3D separator bar ---
[ Xj3D Homepage | Xj3D @ Web3d | Screenshots | Dev docs | Dev Releases | Contributors | Getting Started ]
Last updated: $Date: 2008-09-12 21:03:53 $