HitItem

class cee.cug.HitItem()

An object describing the result of a picking action on a ConstantRemoteModel.

Returned by ConstantRemoteModel.rayIntersect

Constructors


Constructors

HitItem.constructor()
Return type:

HitItem

Properties

HitItem.elementId
Type:

number

The id of the element in the data model on the server that was hit

HitItem.elementIndex
Type:

number

The index of the element in the data model on the server that was hit

HitItem.elementLocalSurface
Type:

number

The type of the element in the data model on the server that was hit, for example ‘Quad’, ‘Tetrahedron’, ‘Hexahedron’

HitItem.elementScalarResult
Type:

number

The scalar result in the closest node as indicated by nodeId/nodeIndex.

HitItem.elementTriangleVertices
Type:

[number]

A tessellation of triangles of the element that was hit.

This array contains x,y,z values for each triangle vertex. So there will be 9 values (3 vertices * (x,y,z)) per triangle. This can be used to highlight the selected element using the geometry or the markup model.

HitItem.elementType
Type:

string

The type of the element in the data model on the server that was hit, for example ‘Quad’, ‘Tetrahedron’, ‘Hexahedron’

HitItem.frameIndex
Type:

number

The index of the frame in which the picking occurred

HitItem.intersectionPoint
Type:

Vec3

The 3d point (in world coordinates) on the surface that was hit.

This is the actual point that was hit

HitItem.intersectionPointNormal
Type:

Vec3

The normal of the surface at the point where the surface was hit.

HitItem.nodeId
Type:

number

The id of the node in the data model on the server that was hit

HitItem.nodeIndex
Type:

number

The index of the node in the data model on the server that was hit

HitItem.nodeScalarResult
Type:

number

The scalar result in the closest node as indicated by nodeId/nodeIndex.

HitItem.objectIndex
Type:

number

The index of the object (part/iso/cut/isovol) that was hit

HitItem.objectType
Type:

ObjectType

The type of object (part/iso/cut/isovol) that was hit

HitItem.serverItemIdent
Type:

ServerItemIdent

Object identifying the hit item. Can be used for query