All files / engine/Source/Scene PickedMetadataInfo.js

0% Statements 0/5
100% Branches 0/0
0% Functions 0/1
0% Lines 0/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58                                                                                                                   
/**
 * Information about metadata that is supposed to be picked.
 *
 * This is initialized in the `Scene.pickMetadata` function, and passed to
 * the `FrameState`. It is used to configure the draw commands that render
 * the metadata values of an object into the picking frame buffer. The
 * raw values are read from that buffer, and are then translated back into
 * proper metadata values in `Picking.pickMetadata`, using the structural
 * information about the metadata that is stored here.
 *
 * @private
 */
function PickedMetadataInfo(
  schemaId,
  className,
  propertyName,
  classProperty,
  metadataProperty,
) {
  /**
   * The optional ID of the metadata schema
   *
   * @type {string|undefined}
   */
  this.schemaId = schemaId;
  /**
   * The name of the metadata class
   *
   * @type {string}
   */
  this.className = className;
  /**
   * The name of the metadata property
   *
   * @type {string}
   */
  this.propertyName = propertyName;
 
  /**
   * The the `MetadataClassProperty` that is described by this
   * structure, as obtained from the `MetadataSchema`
   *
   * @type {MetadataClassProperty}
   */
  this.classProperty = classProperty;
 
  /**
   * The `PropertyTextureProperty` or `PropertyAttributeProperty` that
   * is described by this structure, as obtained from the property texture
   * or property attribute of the `StructuralMetadata` that matches the
   * class name and property name.
   *
   * @type {object}
   */
  this.metadataProperty = metadataProperty;
}
export default PickedMetadataInfo;