RemoteModelTrianglePicker
- class cee.ug.RemoteModelTrianglePicker()
Client-side visible triangle picker. This class can be used to get triangles that are currently visible in the view, either within a specified rectangular region or at specified points.
Use
RemoteModel.createTrianglePicker
to create instances of this class.It is the programmer’s responsibility to call
destroy
on pickers that are no longer needed, in order to release resources.Note that a RemoteModelTrianglePicker is only valid while the model is in the same state as when the picker was created. A new picker must be created whenever any display properties are changed on the model, such as current frame or draw style.
Methods
destroy
- cee.ug.RemoteModelTrianglePicker.destroy()
Release WebGL resources. Once called this object can no longer be used.
- Return type
void
getVisibleTrianglesAtPoints
- cee.ug.RemoteModelTrianglePicker.getVisibleTrianglesAtPoints(points)
Returns visible triangles currently located at the specified points in the view
- Arguments
points (
[cee.Vec2Like]
) – Points in canvas css coordinates
- Return type
[cee.ug.ClientSideHitItem]
getVisibleTrianglesInRectangle
- cee.ug.RemoteModelTrianglePicker.getVisibleTrianglesInRectangle(x, y, width, height)
Returns visible triangles currently located within the given rectangular region of the view
- Arguments
x (
number
) – The left side of the rectangle in css coordinatesy (
number
) – The top side of the rectangle in css coordinateswidth (
number
) – The width of the rectangle in css pixelsheight (
number
) – The height of the rectangle in css pixels
- Return type
[cee.ug.ClientSideHitItem]