AnyLogic
Expand
Font size
All Implemented Interfaces:
UsdRepresentation<OverheadCrane<?>>

public class OverheadCraneUsdRepresentation
extends AbstractUsdRepresentation<OverheadCrane<?>>
Associates an overhead crane with a prim.

Field Summary

Fields inherited from class com.anylogic.engine.omniverse_connector.AbstractUsdRepresentation

USD_ATTR_VISIBILITY

Constructor Summary

ConstructorDescription
OverheadCraneUsdRepresentation(UsdContext context, OverheadCrane<?> crane, String cranePrimPath)
Default crane hierarchy should be as follows

Method Summary

Modifier and TypeMethodDescription
OverheadCraneUsdRepresentationenableBridgeVariant()
Adds a variant updater (a set of alternative configurations) to bridge prim.
OverheadCraneUsdRepresentationenableCraneVariant(String varsetName, Function<OverheadCrane<?>,String> provider)
Sets a variant updater (a set of alternative configurations) for a crane trolley prim
OverheadCraneUsdRepresentationenableHookVariant()
The method adds VariantUpdater to hook prim.
OverheadCraneUsdRepresentationenableTrolleyVariant()
Adds a variant updater (a set of alternative configurations) to trolley prim.
voidfillFrame(OmniFrame frame) 
OverheadCraneUsdRepresentationsetBridgePathProvider(Function<Integer,String> bridgePathProvider)
Sets function to provide path to crane bridge USD primitive
OverheadCraneUsdRepresentationsetBrigdeVariantUpdater(String varsetName, Function<Integer,String> provider)
Sets a variant updater (a set of alternative configurations) for a crane trolley prim
OverheadCraneUsdRepresentationsetHookPathProvider(Function<Integer,String> hookPathProvider)
Sets function to provide path for crane hook USD primitive
OverheadCraneUsdRepresentationsetHookVariantUpdater(String varsetName, Function<Integer,String> provider)
Sets a variant updater (a set of alternative configurations) for a crane hook prim
OverheadCraneUsdRepresentationsetTrolleyPathProvider(Function<Integer,String> trolleyPathProvider)
Sets function to provide path to crane trolley USD primitive
OverheadCraneUsdRepresentationsetTrolleyVariantUpdater(String varsetName, Function<Integer,String> provider)
Sets a variant updater (a set of alternative configurations) for a crane trolley prim
OverheadCraneUsdRepresentationsyncCraneRootPosition() 

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

OverheadCraneUsdRepresentation

public OverheadCraneUsdRepresentation(UsdContext context,
 OverheadCrane<?> crane,
 String cranePrimPath)
Default crane hierarchy should be as follows
 /World
/CraneRootPrim - hierarchy to crane root prim is not matter
/BRIDGE_0 - bridge prim is a direct child of crane root prim, named exactly as shown
/TROLLEY - trolley prim is a direct child of trolley prim, named exactly as shown
/HOOK - hook prim is a direct child of trolley prim, named exactly as shown
/BRDIGE_1
/TROLLEY
/HOOK
etc...

If your crane has another hierarchy or namings, you should provide a functions to get in-crane-paths for bridge, trolley and hook by bridge's index (zero-based). See:

WARNING: Bridge, trolley and hook prims should have trivial (identity) transformations (scale, rotate, translate, etc.).

Parameters:
crane -
cranePrimPath - in-scene path to crane prim

Method Details

fillFrame

@AnyLogicInternalAPI
public void fillFrame(OmniFrame frame)
Specified by:
fillFrame in interface UsdRepresentation<OverheadCrane<?>>
Overrides:
fillFrame in class AbstractUsdRepresentation<OverheadCrane<?>>

enableCraneVariant

public OverheadCraneUsdRepresentation enableCraneVariant(String varsetName,
 Function<OverheadCrane<?>,String> provider)
Sets a variant updater (a set of alternative configurations) for a crane trolley prim
Parameters:
varsetName - The name of the variant set.
provider - The function that generates the name of the USD prim variant depending on the state of the element.
Returns:
Returns the reconfigured OverheadCraneUsdRepresentation object

setBrigdeVariantUpdater

public OverheadCraneUsdRepresentation setBrigdeVariantUpdater(String varsetName,
 Function<Integer,String> provider)
Sets a variant updater (a set of alternative configurations) for a crane trolley prim
Parameters:
varsetName - The name of the variant set.
provider - The function that generates the name of the USD prim variant depending on the state of the element.
Returns:
Returns the reconfigured OverheadCraneUsdRepresentation object

enableBridgeVariant

public OverheadCraneUsdRepresentation enableBridgeVariant()
Adds a variant updater (a set of alternative configurations) to bridge prim. Default behavior of updater: acquire bridge's state via bridge.getState(), then set variant with exactly same name in prim's variant set with name "anylogic_state". Attention: bridge prim should have predefined variant set with specified name. To change default behavior, use #setBridgeVariantUpdater(Function, String) method.
Returns:

setTrolleyVariantUpdater

public OverheadCraneUsdRepresentation setTrolleyVariantUpdater(String varsetName,
 Function<Integer,String> provider)
Sets a variant updater (a set of alternative configurations) for a crane trolley prim
Parameters:
varsetName - The name of the variant set.
provider - The function that generates the name of the USD prim variant depending on the state of the element.
Returns:
Returns the reconfigured OverheadCraneUsdRepresentation object

enableTrolleyVariant

public OverheadCraneUsdRepresentation enableTrolleyVariant()
Adds a variant updater (a set of alternative configurations) to trolley prim. Default behavior of updater: acquire bridge's state via bridge.getState(), then set variant with exactly same name in prim's variant set with name "anylogic_state". Attention: trolley prim should have predefined variant set with specified name. To change default behavior, use #setTrolleyVariantUpdater(Function, String) method.
Returns:

setHookVariantUpdater

public OverheadCraneUsdRepresentation setHookVariantUpdater(String varsetName,
 Function<Integer,String> provider)
Sets a variant updater (a set of alternative configurations) for a crane hook prim
Parameters:
varsetName - The name of the variant set.
provider - The function that generates the name of the USD prim variant depending on the state of the element.
Returns:
Returns the reconfigured OverheadCraneUsdRepresentation object

enableHookVariant

public OverheadCraneUsdRepresentation enableHookVariant()
The method adds VariantUpdater to hook prim. Default behavior of updater: acquire bridge's state via bridge.getState(), then set variant with exactly same name in prim's variant set with name "anylogic_state". Attention: hook prim should have predefined variant set with specified name. To change default behavior, use #setHookVariantUpdater(Function, String) method.
Returns:

syncCraneRootPosition

public OverheadCraneUsdRepresentation syncCraneRootPosition()

setBridgePathProvider

public OverheadCraneUsdRepresentation setBridgePathProvider(Function<Integer,String> bridgePathProvider)
Sets function to provide path to crane bridge USD primitive
Parameters:
bridgePathProvider - The function that generates the name of the USD prim variant depending on the state of the element.
Returns:

setTrolleyPathProvider

public OverheadCraneUsdRepresentation setTrolleyPathProvider(Function<Integer,String> trolleyPathProvider)
Sets function to provide path to crane trolley USD primitive
Parameters:
trolleyPathProvider - The function that generates the name of the USD prim variant depending on the state of the element.
Returns:

setHookPathProvider

public OverheadCraneUsdRepresentation setHookPathProvider(Function<Integer,String> hookPathProvider)
Sets function to provide path for crane hook USD primitive
Parameters:
hookPathProvider - The function that generates the name of the USD prim variant depending on the state of the element.
Returns: