- java.lang.Object
- com.anylogic.engine.omniverse_connector.AbstractUsdRepresentation<OverheadCrane<?>>
- com.anylogic.engine.omniverse_connector.OverheadCraneUsdRepresentation
- All Implemented Interfaces:
UsdRepresentation<OverheadCrane<?>>
public class OverheadCraneUsdRepresentation extends AbstractUsdRepresentation<OverheadCrane<?>>
Associates an overhead crane with a prim.
Constructor | Description |
---|---|
OverheadCraneUsdRepresentation |
Default crane hierarchy should be as follows
|
Modifier and Type | Method | Description |
---|---|---|
OverheadCraneUsdRepresentation | enableBridgeVariant() |
Adds a variant updater (a set of alternative configurations) to bridge prim.
|
OverheadCraneUsdRepresentation | enableCraneVariant |
Sets a variant updater (a set of alternative configurations) for a crane trolley prim
|
OverheadCraneUsdRepresentation | enableHookVariant() |
The method adds VariantUpdater to hook prim.
|
OverheadCraneUsdRepresentation | enableTrolleyVariant() |
Adds a variant updater (a set of alternative configurations) to trolley prim.
|
void | fillFrame | |
OverheadCraneUsdRepresentation | setBridgePathProvider |
Sets function to provide path to crane bridge USD primitive
|
OverheadCraneUsdRepresentation | setBrigdeVariantUpdater |
Sets a variant updater (a set of alternative configurations) for a crane trolley prim
|
OverheadCraneUsdRepresentation | setHookPathProvider |
Sets function to provide path for crane hook USD primitive
|
OverheadCraneUsdRepresentation | setHookVariantUpdater |
Sets a variant updater (a set of alternative configurations) for a crane hook prim
|
OverheadCraneUsdRepresentation | setTrolleyPathProvider |
Sets function to provide path to crane trolley USD primitive
|
OverheadCraneUsdRepresentation | setTrolleyVariantUpdater |
Sets a variant updater (a set of alternative configurations) for a crane trolley prim
|
OverheadCraneUsdRepresentation | syncCraneRootPosition() |
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
@AnyLogicInternalAPI public void fillFrame(OmniFrame frame)
- Specified by:
fillFrame
in interfaceUsdRepresentation<OverheadCrane<?>>
- Overrides:
fillFrame
in classAbstractUsdRepresentation<OverheadCrane<?>>
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
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
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:
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
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:
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
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:
public OverheadCraneUsdRepresentation syncCraneRootPosition()
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:
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:
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: