Click or drag to resize
AB4D logo

OptimizedPointMeshT Methods

The OptimizedPointMeshT type exposes the following members.

Methods
 NameDescription
Public methodGetClosestPositionIndex(Ray) Returns an index of the position that is the closest to the specified ray. The method is highly optimized and checks only the segments that ray goes through (ray intersects segment's bounding box) and this significantly reduces the number of checked positions. When no segment is hit by the ray, then -1 is returned. To also get the distance to the ray use the GetClosestPositionIndex(Ray, Single).
Public methodGetClosestPositionIndex(Ray, Single) Returns an index of the position that is the closest to the specified ray. The method also sets the distance to the out parameter. The method is highly optimized and checks only the segments that ray goes through (ray intersects segment's bounding box) and this significantly reduces the number of checked positions. When no segment is hit by the ray, then -1 is returned and distance is set to NaN.
Public methodStatic memberGetPixel3DSize GetPixel3DSize returns size of one pixel at specified position on screen based on the specified camera and view width. For example, value 5 means a box at the specified position and with size set to 5 will be rendered to 1 pixel on screen.
Public methodGetPositionIndexesAroundRay(Ray, Single, Boolean, Int32) GetPositionIndexesAroundRay method returns a list of position indexes that are closer to the ray then the specified maxDistance. By default (when orderByDistanceToRayPosition is true) the position are ordered by the distance to the ray's Position. When maxResultsCount is set to a bigger number then 0, then it is possible to limit the number of returned indexes. To prevent creating List object on each call to this method, call the overload that takes the List object as ref.
Public methodGetPositionIndexesAroundRay(Ray, Single, ListInt32, Boolean, Int32) GetPositionIndexesAroundRay method returns a list of position indexes that are closer to the ray then the specified maxDistance. By default (when orderByDistanceToRayPosition is true) the position are ordered by the distance to the ray's Position. When maxResultsCount is set to a bigger number then 0, then it is possible to limit the number of returned indexes.
Public methodOptimize Optimize method optimizes the positions with preparing the segments and data views that will be used for different camera positions. This method should be call after a bigger change of the Viewport3D's size.
Public methodRenderGeometry RenderGeometry renders the geometry (executes draw calls but does not apply material settings)
Public methodUpdateVisibleSegments UpdateVisibleSegments method gets camera's worldViewProjectionMatrix as parameter and updates which segments are visible and will be rendered in the next rendering pass. When worldViewProjectionMatrix parameter is Identity then all segments are shown.
Top
See Also