Get RAPTOR

RaptorMovingParts

The bake's rules for moving parts.

NamespaceAssemblyKindStability
Raptor.EditorToolsRaptor.Editorclasspreview, since 0.1.0
public static class RaptorMovingParts

Methods

ApplyElementStatics

public static void ApplyElementStatics(Transform elementRoot)

Reapplies the static flags of every moving part inside an element. The room bake calls this once per element.

ParameterTypeDescription
elementRootTransformThe element's root.

ApplyPartStatics

public static void ApplyPartStatics(Transform partRoot)

Sets a moving part's static flags. A probe-lit part is made fully non-static. A part baked at rest is also made non-static, and then the renderers in its baked Object container are set to ContributeGI only. The root's live preview is left non-static because it has no lightmap UVs.

ParameterTypeDescription
partRootTransformThe part's root.

ContributesGIAtRest

public static bool ContributesGIAtRest(Transform part)

Whether part is a moving part lit "Baked at rest", meaning it has an IRaptorMovingPart that contributes GI at its rest pose.

ParameterTypeDescription
partTransformThe part's root.

Returns: True for a moving part baked at rest.

IsPart

public static bool IsPart(RaptorModel model)

Whether model is the model of a moving part, meaning its root has an IRaptorMovingPart.

ParameterTypeDescription
modelRaptorModelThe model.

Returns: True when it is.

LocalPoseIn

public static Matrix4x4 LocalPoseIn(Transform part, Transform roomRoot)

Gets the part's pose in its room root's space, composed from local transforms only. The result is bit-identical wherever the room root is, matching how ComputeGeometryHash excludes the root.

ParameterTypeDescription
partTransformThe part's root.
roomRootTransformThe room's root.

Returns: The matrix.