UNPKG

@awayjs/view

Version:
94 lines 4.46 kB
import { IAssetClass, IAbstractionPool, Matrix3D, Box, Vector3D, Sphere, AbstractionBase, AssetEvent, Plane3D, IAsset, IAbstraction } from '@awayjs/core'; import { ITraversable } from './ITraversable'; import { PickGroup } from '../PickGroup'; import { _Pick_PickableBase } from './_Pick_PickableBase'; import { _IPick_PickableClass } from './_IPick_PickableClass'; import { PickingCollision } from '../pick/PickingCollision'; import { IEntityTraverser } from './IEntityTraverser'; import { BoundingVolumeBase } from '../bounds/BoundingVolumeBase'; import { BoundingVolumeType } from '../bounds/BoundingVolumeType'; import { IBoundsPicker } from '../pick/IBoundsPicker'; import { ContainerNode } from '../partition/ContainerNode'; import { INode } from '../partition/INode'; /** * @class away.pool.PickEntity */ export declare class PickEntity extends AbstractionBase implements IAbstractionPool, IEntityTraverser, IBoundsPicker { private static _store; static MINIMAL_SCALE: number; private _boundingVolumePools; private _boundingVolumes; private _pickingCollision; private _orientedBoxBounds; private _orientedBoxBoundsDirty; private _orientedSphereBounds; private _orientedSphereBoundsDirty; private static _pickPickableClassPool; private _activePickables; private _pickables; get pickingCollision(): PickingCollision; /** * */ get node(): ContainerNode; /** * */ get pickGroup(): PickGroup; shapeFlag: boolean; /** * //TODO */ init(node: ContainerNode, pickGroup: PickGroup): void; getBoundingVolume(target?: ContainerNode, type?: BoundingVolumeType): BoundingVolumeBase; /** * Evaluates the display object to see if it overlaps or intersects with the * point specified by the <code>x</code> and <code>y</code> parameters. The * <code>x</code> and <code>y</code> parameters specify a point in the * coordinate space of the Scene, not the display object container that * contains the display object(unless that display object container is the * Scene). * * @param x The <i>x</i> coordinate to test against this object. * @param y The <i>y</i> coordinate to test against this object. * @param shapeFlag Whether to check against the actual pixels of the object * (<code>true</code>) or the bounding box * (<code>false</code>). * @param maskFlag Whether to check against the object when it is used as * mask (<code>false</code>). * @return <code>true</code> if the display object overlaps or intersects * with the specified point; <code>false</code> otherwise. */ hitTestPoint(x: number, y: number, shapeFlag?: boolean): boolean; _hitTestPointInternal(rootEntity: ContainerNode, x: number, y: number, shapeFlag?: boolean, maskFlag?: boolean): boolean; isInFrustum(planes: Array<Plane3D>, numPlanes: number): boolean; _isInFrustumInternal(rootEntity: ContainerNode, planes: Array<Plane3D>, numPlanes: number): boolean; /** * @inheritDoc */ isIntersectingRay(globalRayPosition: Vector3D, globalRayDirection: Vector3D): boolean; /** * @inheritDoc */ _isIntersectingRayInternal(rootEntity: INode, globalRayPosition: Vector3D, globalRayDirection: Vector3D): boolean; isIntersectingShape(findClosestCollision: boolean): boolean; _getBoxBoundsInternal(matrix3D?: Matrix3D, strokeFlag?: boolean, fastFlag?: boolean, cache?: Box, target?: Box): Box; _getSphereBoundsInternal(center?: Vector3D, matrix3D?: Matrix3D, strokeFlag?: boolean, fastFlag?: boolean, cache?: Sphere, target?: Sphere): Sphere; applyTraversable(traversable: ITraversable): void; addBoundingVolume(boundingVolume: BoundingVolumeBase): void; removeBoundingVolume(boundingVolume: BoundingVolumeBase): void; addPickable(pickable: _Pick_PickableBase): void; removePickable(pickable: _Pick_PickableBase): void; onInvalidate(event: AssetEvent): void; onClear(event: AssetEvent): void; requestAbstraction(asset: IAsset): IAbstraction; storeAbstraction(abstraction: IAbstraction): void; /** * * @param imageObjectClass */ static registerPickable(pickClass: _IPick_PickableClass, assetClass: IAssetClass): void; private _update; private _isIntersectingMasks; } //# sourceMappingURL=PickEntity.d.ts.map