@itwin/core-common
Version:
iTwin.js components common to frontend and backend
53 lines • 2.69 kB
TypeScript
/** @packageDocumentation
* @module DisplayStyles
*/
import { NonFunctionPropertiesOf } from "@itwin/core-bentley";
import { ColorDef, ColorDefProps } from "./ColorDef";
/** JSON representation of a [[GroundPlane]].
* @see [[EnvironmentProps.ground]].
* @public
* @extensions
*/
export interface GroundPlaneProps {
/** Whether the ground plane should be displayed. Defaults to false. */
display?: boolean;
/** The Z height at which to draw the ground plane. */
elevation?: number;
/** The color in which to draw the ground plane when viewed from above. */
aboveColor?: ColorDefProps;
/** The color in which to draw the ground plane when viewed from below. */
belowColor?: ColorDefProps;
}
/** A type containing all of the properties and none of the methods of [[GroundPlane]], with `readonly` modifiers removed.
* @see [[GroundPlane.create]] and [[GroundPlane.clone]].
* @public
*/
export type GroundPlaneProperties = NonFunctionPropertiesOf<GroundPlane>;
/** A circle drawn at a Z elevation, whose diameter is the the XY diagonal of the project extents, used to represent the ground as a reference point within a spatial view.
* @see [[Environment.ground]].
* @public
*/
export declare class GroundPlane {
/** The Z height in meters at which to draw the plane. */
readonly elevation: number;
/** The color in which to draw the ground plane when viewed from above. */
readonly aboveColor: ColorDef;
/** The color in which to draw the ground plane when viewed from below. */
readonly belowColor: ColorDef;
protected constructor(props: Partial<GroundPlaneProperties>);
/** Default settings with a dark green "above" color, dark brown "below" color, and elevation of -0.01 meters. */
static readonly defaults: GroundPlane;
/** Create a new GroundPlane. Any properties not specified by `props` will be initialized to their default values. */
static create(props?: Partial<GroundPlaneProperties>): GroundPlane;
/** Create a copy of this ground plane, identical except for any properties explicitly specified by `changedProps`.
* Any properties of `changedProps` explicitly set to `undefined` will be initialized to their default values.
*/
clone(changedProps?: Partial<GroundPlaneProperties>): GroundPlane;
/** Create from JSON representation. */
static fromJSON(props?: GroundPlaneProps): GroundPlane;
/** Convert to JSON representation.
* @param display If defined, the value to use for [[GroundPlaneProps.display]]; otherwise, that property will be left undefined.
*/
toJSON(display?: boolean): GroundPlaneProps;
}
//# sourceMappingURL=GroundPlane.d.ts.map