@kognifai/cogsengine
    Preparing search index...

    Class AbstractPickInfoAbstract

    class AbstractPickInfo: Base class for full picking information of a picked point. Used in Scene camera and ray picking functions. Either as return parameter or in pickInfos parameter.

    Hierarchy (View Summary)

    Index

    Constructors

    • Initialized a new instance of PickInfo class.

      Parameters

      • scene: Scene

        Owning scene

      • entityOrId: number | Entity

        Entity picked

      • rootId: number

        Root entityId if picking flag PickingFlags.ReturnChildEntity set, NoEntity

      • textureId: vec2

        Texture Coordinates as received from Cogs

      Returns AbstractPickInfo

    Accessors

    • get entity(): Entity

      Gets Entity picked

      Returns Entity

    • set entity(value: Entity): void

      Internal: Set entity

      Parameters

      Returns void

    • get id(): number

      Gets Texture Coords.x = id for Asset. Used to look up asset geometry part picked, -1 for no value. See

      Returns number

      textureId for details about value.

    • set id(value: number): void

      Sets Asset id. NOTE! Also changes textureId

      Parameters

      • value: number

      Returns void

    • get root(): Entity

      Get Root of Entity picked (or null) if not picking sub-entities, E.g PickingFlags.ReturnChildEntity set.

      Returns Entity

    • get rootId(): number

      Get ID of Root of Entity picked. Prefer using pickingi.root

      Returns number

    • get textureId(): vec2

      Gets Texture Coordinates from picking or null if not available. Coordinate returned: PickingFlags.FlatTexcoordInterpolation: Set: First point in triangle unless PickingFlags.FlatTexcoordInterpolation. Not Set: Interpolated for picking position.

      Returns vec2

    Methods

    • Internal: Set picked entity

      Parameters

      • value: number

      Returns void

    • Internal: Set root entity ID

      Parameters

      • value: number

      Returns void

    • Internal: Set textureId

      Parameters

      Returns void