import { Vector3, Matrix } from "./GeoMath"; import GLEnv from "./GLEnv"; import Mesh from "./Mesh"; import type EntityMaterial from "./EntityMaterial"; import type RenderStage from "./RenderStage"; /** * 描画プリミティブ * * @see mapray.PropSet * @see mapray.Entity#getPrimitives */ declare class Primitive { /** * 描画されるメッシュ * * 構築子の `mesh` 引数が設定される。 */ mesh: Mesh; /** * 描画に使用するマテリアル * * 構築子の `material` 引数が設定される。 */ material: EntityMaterial; /** * モデル座標系から GOCS への変換行列 * * 構築子の `transform` 引数が設定される。 */ transform: Matrix; /** * 中心点 (モデル座標系) * * `null` のときは零ベクトルと見なす。 * * @defaultValue `null` */ pivot: Vector3 | null; /** * 境界箱 (モデル座標系) * * `bbox[0]` は座標の最小値、`bbox[1]` は座標の最大値とする。 * * `null` のときは無限大の境界箱と見なす。 * * @defaultValue `null` */ bbox: Vector3[] | null; /** * プロパティ集合 * * `null` のときは空集合と見なす。 * * @defaultValue `null` */ properties: object | null; /** * `RenderTarget.RID` のときだけ存在する */ rid?: number; /** * 引数に `null` を指定した場合は、`this` を使う前に対応するプロパ * ティに適切なオブジェクトを設定しなければならない。 * * @param glenv - WebGL 環境 * @param mesh - メッシュ * @param material - マテリアル * @param transform - 変換行列 */ constructor(glenv: GLEnv, mesh: Mesh | null, material: EntityMaterial | null, transform: Matrix | null); /** * インスタンスの複製を返す * * 公開プロパティが `this` と同じインスタンスを生成して返す。 * * ただしプロパティ `mesh`, `material`, `properties` は参照コピー * で、それ以外は深いコピーとなる。 * * @return インスタンスの複製 */ fastClone(): Primitive; /** * プリミティブが見えるか? * * `true` を返したときはソート深度 `this.sort_z` が設定される。 * * @param stage - レンダリングステージ * * @return プリミティブの一部が視体積に含まれるとき true, それ以外 * のとき false */ isVisible(stage: RenderStage): boolean; /** * 背景との混合が必要か? * * @param stage - レンダリングステージ * * @return 背景との混合が必要なとき `true`, それ以外のとき `false` * */ isTranslucent(stage: RenderStage): boolean; /** * プリミティブを描画 * * @param stage - レンダリングステージ */ draw(stage: RenderStage): void; private readonly _glenv; } /** * @summary プロパティ集合 * @desc *
プリミティブのプロパティ集合を表現する。
*props を PropSet のインスタンス、name をプロパティ名とするとき、props.name または props["name"] * でプロパティ名からプロパティ値を取得することができる。
*このクラスは実際には存在せず、一般的に Object で代用することができる。
* @class mapray.PropSet * @private * @see mapray.Primitive */ export default Primitive; //# sourceMappingURL=Primitive.d.ts.map