@kognifai/cogsengine
    Preparing search index...

    Class PickInfo

    class PickInfo: Stores full picking information of a picked point in Engine Coordinates. Used in Scene camera and ray picking functions. Either as return parameter or in pickInfos parameter.

    Hierarchy (View Summary)

    Index

    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 position(): vec3

      Gets The picked position in Engine Coordinates

      Returns vec3

    • 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 position in Engine Coordinates

      Parameters

      Returns void

    • Internal: Set root entity ID

      Parameters

      • value: number

      Returns void

    • Creates empty Engine Coordinates picking info.

      Parameters

      • scene: Scene

        Cogs Scene owning information.

      Returns PickInfo

      Created picking info.