FLidarPointCloudOctree

Used for efficient handling of point cloud data.

Windows
MacOS
Linux

References

Module

LidarPointCloudRuntime

Header

/Engine/Plugins/Enterprise/LidarPointCloud/Source/LidarPointCloudRuntime/Public/LidarPointCloudOctree.h

Include

#include "LidarPointCloudOctree.h"

Syntax

class FLidarPointCloudOctree

Remarks

Used for efficient handling of point cloud data.

Variables

Name Description

Public variable

FCriticalSectio...

 

DataLock

Used for thread safety between rendering and asset operations.

Constructors

Destructors

Name Description

Public function

~FLidarPointCloudOctree()

Functions

Name Description

Public function

void

 

ApplyColorToAllPoints

(
    const FColor& NewColor,
    const bool& bVisibleOnly
)

Applies the given color to all points

Public function

void

 

ApplyColorToFirstPointByRay

(
    const FColor& NewColor,
    const FLidarPointCloudRay& Ray,
    const float& Radius,
    bool bVisibleOnly
)

Applies the given color to the first point hit by the given ray

Public function

void

 

ApplyColorToPointsByRay

(
    const FColor& NewColor,
    const FLidarPointCloudRay& Ray,
    const float& Radius,
    bool bVisibleOnly
)

Applies the given color to all points hit by the given ray

Public function

void

 

ApplyColorToPointsInBox

(
    const FColor& NewColor,
    const FBox& Box,
    const bool& bVisibleOnly
)

Applies the given color to all points within the box

Public function

void

 

ApplyColorToPointsInSphere

(
    const FColor& NewColor,
    const FSphere& Sphere,
    const bool& bVisibleOnly
)

Applies the given color to all points within the sphere

Public function

void

 

BuildCollision

(
    const float& Accuracy,
    const bool& bVisibleOnly
)

Builds collision using the accuracy provided

Public function

void

 

Empty

(
    bool bDestroyNodes
)

Removes all points and, optionally, all nodes except for the root node. Retains the bounds.

Public function

void

 

ExecuteActionOnAllPoints

(
    TFunction< void...,
    const bool& bVisibleOnly
)

Executes the provided action on each of the points.

Public function

void

 

ExecuteActionOnFirstPointByRay

(
    TFunction< void...,
    const FLidarPointCloudRay& Ray,
    const float& Radius,
    bool bVisibleOnly
)

Executes the provided action on the first point hit by the given ray.

Public function

void

 

ExecuteActionOnPointsByRay

(
    TFunction< void...,
    const FLidarPointCloudRay& Ray,
    const float& Radius,
    bool bVisibleOnly
)

Executes the provided action on each of the points hit by the given ray.

Public function

void

 

ExecuteActionOnPointsInBox

(
    TFunction< void...,
    const FBox& Box,
    const bool& bVisibleOnly
)

Executes the provided action on each of the points within the given box.

Public function

void

 

ExecuteActionOnPointsInSphere

(
    TFunction< void...,
    const FSphere& Sphere,
    const bool& bVisibleOnly
)

Executes the provided action on each of the points within the given sphere.

Public function Const

int64

 

GetAllocatedSize()

Returns the amount of memory used by this Octree, including the BulkData

Public function Const

int64

 

GetAllocatedStructureSize()

Returns the amount of memory used by this Octree, excluding the BulkData

Public function Const

FBox

 

GetBounds()

Returns the Cloud bounds.

Public function Const

const FTriMe...

 

GetCollisionData()

Returns pointer to the collision data

Public function Const

float

 

GetEstimatedPointSpacing()

Returns an estimated spacing between points

Public function Const

FVector

 

GetExtent()

Returns the extent of the Cloud's bounds.

Public function Const

int32

 

GetNumLODs()

Returns the number of different LODs.

Public function Const

int32

 

GetNumNodes()

Returns the total number of nodes.

Public function Const

int64

 

GetNumPoints()

Returns the total number of points.

Public function Const

ULidarPointC...

 

GetOwner()

Returns a pointer to the Point Cloud asset, which owns this Octree.

Public function

void

 

GetPoints

(
    TArray< FLidarPointCloudPoint*...,
    int64 StartIndex,
    int64 Count
)

Populates the given array with points from the tree

Public function Const

void

 

GetPointsAsCopies

(
    TArray< FLidarPointCloudPoint >& P...,
    const FTransform* LocalToWorld,
    int64 StartIndex,
    int64 Count
)

Populates the given array with copies of points from the tree

Public function

void

 

GetPointsInBox

(
    TArray< FLidarPointCloudPoint*...,
    const FBox& Box,
    const bool& bVisibleOnly
)

Populates the array with the list of pointers to points within the given box.

Public function Const

void

 

GetPointsInBoxAsCopies

(
    TArray< FLidarPointCloudPoint >& S...,
    const FBox& Box,
    const bool& bVisibleOnly,
    const FTransform* LocalToWorld
)

Populates the array with the list of pointers to points within the given box.

Public function

void

 

GetPointsInFrustum

(
    TArray< FLidarPointCloudPoint*...,
    const FConvexVolume& Frustum,
    const bool& bVisibleOnly
)

Populates the array with the list of points within the given frustum.

Public function

void

 

GetPointsInSphere

(
    TArray< FLidarPointCloudPoint*...,
    const FSphere& Sphere,
    const bool& bVisibleOnly
)

Populates the array with the list of points within the given sphere.

Public function Const

void

 

GetPointsInSphereAsCopies

(
    TArray< FLidarPointCloudPoint >& S...,
    const FSphere& Sphere,
    const bool& bVisibleOnly,
    const FTransform* LocalToWorld
)

Populates the array with the list of points within the given sphere.

Public function Const

float

 

GetRootCellSize()

Returns the grid cell size at root level.

Public function Const

bool

 

HasCollisionData()

Returns true, if the Octree has collision built

Public function Const

bool

 

HasData()

Returns true if the Root node exists and has any data assigned.

Public function Const

bool

 

HasPointsInBox

(
    const FBox& Box,
    const bool& bVisibleOnly
)

Returns true if there are any points within the given box.

Public function Const

bool

 

HasPointsInSphere

(
    const FSphere& Sphere,
    const bool& bVisibleOnly
)

Returns true if there are any points within the given sphere.

Public function

void

 

HideAll()

Marks all points hidden

Public function

void

 

Initialize

(
    const FVector& InExtent
)

Initializes the Octree properties.

Public function

void

 

InsertPoint

(
    const FLidarPointCloudPoint* P...,
    ELidarPointCloudDuplicateHandling D...,
    bool bRefreshPointsBounds,
    const FVector& Translation
)

Inserts the given point into the Octree structure, internally thread-safe.

Public function

void

 

InsertPoints

(
    T Points,
    const int32& Count,
    ELidarPointCloudDuplicateHandling D...,
    bool bRefreshPointsBounds,
    const FVector& Translation
)

Inserts group of points into the Octree structure, internally thread-safe.

Public function Const

bool

 

IsFullyLoaded()

Returns true, if the cloud is fully and persistently loaded.

Public function

void

 

LoadAllNodes()

Persistently loads all nodes.

Public function

void

 

MarkPointVisibilityDirty()

This should to be called if any manual modification to individual points' visibility has been made.

Public function

void

 

QueueNode

(
    FLidarPointCloudOctreeNode* No...,
    float Lifetime
)

If bImmediate is true, the node will be loaded immediately, otherwise, it will be queued for async loading.

Public function

bool

 

RaycastMulti

(
    const FLidarPointCloudRay& Ray,
    const float& Radius,
    const bool& bVisibleOnly,
    const FTransform* LocalToWorld,
    TArray< FLidarPointCloudPoint >& O...
)

Performs a raycast test against the point cloud.

Public function

bool

 

RaycastMulti

(
    const FLidarPointCloudRay& Ray,
    const float& Radius,
    const bool& bVisibleOnly,
    TArray< FLidarPointCloudPoint*...
)

Performs a raycast test against the point cloud.

Public function

FLidarPointC...

 

RaycastSingle

(
    const FLidarPointCloudRay& Ray,
    const float& Radius,
    const bool& bVisibleOnly
)

Performs a raycast test against the point cloud. Returns the pointer if hit or nullptr otherwise.

Public function

void

 

RefreshBounds()

Recalculates and updates points bounds.

Public function

void

 

RegisterTraversalOctree

Adds the given traversal octree to the list of linked octrees.

Public function

void

 

ReleaseAllNodes

(
    bool bIncludePersistent
)

Releases all nodes. Optionally, releases persistent nodes too.

Public function

void

 

RemoveCollision()

Removes collision mesh data

Public function

void

 

RemoveHiddenPoints()

Removes all hidden points

Public function

void

 

RemovePoint

(
    const FLidarPointCloudPoint* P...
)

Attempts to remove the given point.

Public function

void

 

RemovePoint

(
    FLidarPointCloudPoint Point
)

Attempts to remove the given point.

Public function

void

 

RemovePoints

(
    TArray< FLidarPointCloudPoint*...
)

Removes points in bulk

Public function

void

 

RemovePointsByRay

(
    const FLidarPointCloudRay& Ray,
    const float& Radius,
    const bool& bVisibleOnly
)

Removes all points hit by the given ray

Public function

void

 

RemovePointsInBox

(
    const FBox& Box,
    const bool& bVisibleOnly
)

Removes all points within the given box

Public function

void

 

RemovePointsInSphere

(
    const FSphere& Sphere,
    const bool& bVisibleOnly
)

Removes all points within the given sphere

Public function

void

 

SetVisibilityOfFirstPointByRay

(
    const bool& bNewVisibility,
    const FLidarPointCloudRay& Ray,
    const float& Radius
)

Sets visibility of the first point hit by the given ray.

Public function

void

 

SetVisibilityOfPointsByRay

(
    const bool& bNewVisibility,
    const FLidarPointCloudRay& Ray,
    const float& Radius
)

Sets visibility of points hit by the given ray.

Public function

void

 

SetVisibilityOfPointsInBox

(
    const bool& bNewVisibility,
    const FBox& Box
)

Sets visibility of points within the given box.

Public function

void

 

SetVisibilityOfPointsInSphere

(
    const bool& bNewVisibility,
    const FSphere& Sphere
)

Sets visibility of points within the given sphere.

Public function

void

 

StreamQueuedNodes()

Streams all requested nodes

Public function

void

 

UnhideAll()

Marks all points visible

Public function

void

 

UnloadOldNodes

(
    const float& CurrentTime
)

Public function

void

 

UnregisterTraversalOctree

Removes the given traversal octree from the list

Operators

Name Description

Public function

FLidarPointC...

 

operator=

Public function

FLidarPointC...

 

operator=

(
    const FLidarPointCloudOctree&
)

Classes

Name

Description

Public struct

FSharedLODData

Stores shared per-LOD node data.

Constants

Name

Description

MaxBucketSize

Maximum number of unallocated points to keep inside the node before they need to be converted in to a full child node

MaxNodeDepth

Maximum allowed depth for any node

NodeGridResolution

Virtual grid resolution to divide the node into

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss