AI3DHGeometry Class Reference

instant3Dhub: AI3DHGeometry Class Reference
instant3Dhub

#include "I3DHGeometry.h"

+ Inheritance diagram for AI3DHGeometry:
+ Collaboration diagram for AI3DHGeometry:

Detailed Description

Actor containing mesh components used to represent instant3Dhub geometry.

Note
With the exeption of the API defined in AI3DHGeometry, any state of the geometry actors should be considered an implementation detail. In particular:
  • The lifetime of the actors is managed by the plugin.
    • Actors are created dynamically when the 3D data is streamed in.
    • Because we use advanced visibility computations including remote (server-side) culling to optimize rendering performance, actors can also be destroyed dynamically and it is never guaranteed that the complete geometry is available.
    • Do not create or destroy actors yourself.
    • Do not store references to actors across frame boundaries.
  • The actor's transforms are managed by the plugin.
  • The actor's material is also managed by plugin based on selected and hovered states.
  • The mapping between the structure represented in instant3Dhub and the structure of actors and components is an implementation detail. It should not be relied upon and might change in the future.
    • Because of this, we explicitly do not provide APIs to find geometry actors based on node ids. If you need this, please contact us with your use case.
Experimental
Working with the I3DH Geometry class is only necessary for advanced use-cases. How we expose geometry data is suspected to change in the future.

Public Member Functions

AI3DHConnectorGetHubConnector () const
 
int32 GetNodeId () const
 
bool IsSelectedNode () const
 
void OnHoverStart ()
 
void OnHoverEnd ()
 

Static Public Attributes

static constexpr int32 NumReservedCustomPrimitiveDataFloats = 4
 

Protected Attributes

UMaterialInterfaceGeometryDefaultMaterial
 
UMaterialInterfaceGeometryAppearanceMaterial
 
UMaterialInterfaceGeometryHighlightMaterial
 
UMaterialInterfaceGeometryAppearanceHighlightMaterial
 

Member Function Documentation

◆ GetHubConnector()

AI3DHConnector * AI3DHGeometry::GetHubConnector ( ) const
inline

Returns the hub connector this geometry belongs to.

Returns
The hub connector.

◆ GetNodeId()

int32 AI3DHGeometry::GetNodeId ( ) const
inline

Returns the RootNodeId of the instance represented by this actor.

Returns
The node identifier.

◆ IsSelectedNode()

bool AI3DHGeometry::IsSelectedNode ( ) const
inline

Returns whether the actor corresponds to a selected node.

Returns
True if selected, false if not.

◆ OnHoverEnd()

void AI3DHGeometry::OnHoverEnd ( )

OnHoverEnd should be called if this Geometry Actor is no longer hovered to revert its Material.

Deprecated
Deprecated in v1.0.0. "Replaced by HoverAPI. Use GetConnector()->GetAPI()->GetHoverAPI()->ClearHoveredNodes() instead."
Please update your code to the new instant3Dhub API before upgrading to the next release, otherwise your project will no longer compile.

◆ OnHoverStart()

void AI3DHGeometry::OnHoverStart ( )

OnHoverStart should be called if this Geometry Actor is hovered to change its Material to one that visualizes the Hovered State.

Deprecated
Deprecated in v1.0.0. "Replaced by HoverAPI. Use GetConnector()->GetAPI()->GetHoverAPI()->SetHoveredNode(GetNodeId()) instead."
Please update your code to the new instant3Dhub API before upgrading to the next release, otherwise your project will no longer compile.

Member Data Documentation

◆ GeometryAppearanceHighlightMaterial

UMaterialInterface* AI3DHGeometry::GeometryAppearanceHighlightMaterial
protected

Material variant used when geometry is rendered with custom appearance and is highlighted.

◆ GeometryAppearanceMaterial

UMaterialInterface* AI3DHGeometry::GeometryAppearanceMaterial
protected

Material variant used when geometry is rendered with custom appearance.

◆ GeometryDefaultMaterial

UMaterialInterface* AI3DHGeometry::GeometryDefaultMaterial
protected

Default material used to render streamed instant3Dhub geometry with vertex colors.

Supports features such as clip planes.

Note
If you replace this material, ensure the material logic mirrors the original. Otherwise, features like clip planes, selection, hovering, or appearance will not work.

◆ GeometryHighlightMaterial

UMaterialInterface* AI3DHGeometry::GeometryHighlightMaterial
protected

Material variant used when geometry is highlighted (selected or hovered).

◆ NumReservedCustomPrimitiveDataFloats

int32 AI3DHGeometry::NumReservedCustomPrimitiveDataFloats = 4
staticconstexpr

Number of CustomPrimitiveData floats reserved by instant3Dhub for core geometry features.

If you customize geometry materials and also need CustomPrimitiveData you need to offset your data:

MeshComponent->SetCustomPrimitiveDataFloat(NumReservedCustomPrimitiveDataFloats + 0, MyValue0);
static constexpr int32 NumReservedCustomPrimitiveDataFloats
Number of CustomPrimitiveData floats reserved by instant3Dhub for core geometry features.
Definition I3DHGeometry.h:178

The documentation for this class was generated from the following file: