UNPKG

@itwin/core-common

Version:

iTwin.js components common to frontend and backend

75 lines 3.42 kB
/** @packageDocumentation * @module Geometry */ import { Id64String } from "@itwin/core-bentley"; import { Point3d, Range3d, Transform, XYZProps } from "@itwin/core-geometry"; /** JSON representation of the 4 corners of an [[ImageGraphicProps]]. @see [[ImageGraphicCorners]]. * @public * @extensions */ export type ImageGraphicCornersProps = [XYZProps, XYZProps, XYZProps, XYZProps]; /** JSON representation of an [[ImageGraphic]]. * @see [[GeometryStreamEntryProps]]. * @public * @extensions */ export interface ImageGraphicProps { /** The 4 corners of defining the quadrilateral on which the image is displayed. */ corners: ImageGraphicCornersProps; /** The Id of the persistent [[Texture]] element defining the image to be displayed on the quadrilateral. */ textureId: Id64String; /** Whether or not to draw a border around the image. */ hasBorder: boolean; } /** Defines the 4 corners of an [[ImageGraphic]]. The points are expected to lie in a single plane and define a (possibly-skewed) quadrilateral. * The points map to the corners of the image as follows: * ` * 3____2 * | | * |____| * 0 1 * ` * The image can be flipped and/or rotated by specifying the points in a different order. * @public */ export declare class ImageGraphicCorners { readonly 0: Point3d; readonly 1: Point3d; readonly 2: Point3d; readonly 3: Point3d; constructor(p0: Point3d, p1: Point3d, p2: Point3d, p3: Point3d); static fromJSON(props: ImageGraphicCornersProps): ImageGraphicCorners; static from4Points(points: [Point3d, Point3d, Point3d, Point3d]): ImageGraphicCorners; clone(): ImageGraphicCorners; toJSON(): ImageGraphicCornersProps; } /** A geometric primitive that displays an image mapped to the corners of a quadrilateral, with an optional border. * The image is always displayed regardless of [[RenderMode]] or [[ViewFlags]], and is displayed without lighting. * @public */ export declare class ImageGraphic { /** The 4 corners of defining the quadrilateral on which the image is displayed. */ readonly corners: ImageGraphicCorners; /** The Id of the persistent [[Texture]] element defining the image to be displayed on the quadrilateral. */ readonly textureId: Id64String; /** Whether or not to draw a border around the image. */ readonly hasBorder: boolean; /** Construct a new ImageGraphic. * @param corners Defines the 4 corners of the quadrilateral on which the image is to be displayed. The ImageGraphic takes ownership of this input. * @param textureId Identifies a persistent [[Texture]] element defining the image to be mapped onto the quadrilateral. * @param hasBorder Whether or not to display a border around the image. */ constructor(corners: ImageGraphicCorners, textureId: Id64String, hasBorder?: boolean); static fromJSON(props: ImageGraphicProps): ImageGraphic; clone(): ImageGraphic; cloneTransformed(transform: Transform): ImageGraphic; toJSON(): ImageGraphicProps; /** Computes and returns the range. * @param result If supplied, will be modified to hold the computed range and returned. * @returns The computed range. */ computeRange(result?: Range3d): Range3d; /** Apply a transform to the corners of the quadrilateral. */ transformInPlace(transform: Transform): void; } //# sourceMappingURL=ImageGraphic.d.ts.map