#usda 1.0
(
    customLayerData = {
        dictionary cameraSettings = {
            dictionary Front = {
                double3 position = (50000, 0, 0)
                double radius = 500
            }
            dictionary Perspective = {
                double3 position = (-16.38189457660255, 55.85219612425576, 23.738339607233087)
                double3 target = (-16.979798800480665, -224.22375291762214, -82.78510870452244)
            }
            dictionary Right = {
                double3 position = (0, -50000, 0)
                double radius = 500
            }
            dictionary Top = {
                double3 position = (0, 0, 50000)
                double radius = 500
            }
            string boundCamera = "/OmniverseKit_Persp"
        }
        dictionary omni_layer = {
            string authoring_layer = "./Tutorial3.usda"
            dictionary locked = {
            }
            dictionary muteness = {
            }
        }
        dictionary renderSettings = {
            float3 "rtx:debugView:pixelDebug:textColor" = (0, 1e18, 0)
            float3 "rtx:fog:fogColor" = (0.75, 0.75, 0.75)
            float3 "rtx:index:regionOfInterestMax" = (0, 0, 0)
            float3 "rtx:index:regionOfInterestMin" = (0, 0, 0)
            float3 "rtx:iray:environment_dome_ground_position" = (0, 0, 0)
            float3 "rtx:iray:environment_dome_ground_reflectivity" = (0, 0, 0)
            float3 "rtx:iray:environment_dome_rotation_axis" = (3.4028235e38, 3.4028235e38, 3.4028235e38)
            float3 "rtx:post:backgroundZeroAlpha:backgroundDefaultColor" = (0, 0, 0)
            float3 "rtx:post:colorcorr:contrast" = (1, 1, 1)
            float3 "rtx:post:colorcorr:gain" = (1, 1, 1)
            float3 "rtx:post:colorcorr:gamma" = (1, 1, 1)
            float3 "rtx:post:colorcorr:offset" = (0, 0, 0)
            float3 "rtx:post:colorcorr:saturation" = (1, 1, 1)
            float3 "rtx:post:colorgrad:blackpoint" = (0, 0, 0)
            float3 "rtx:post:colorgrad:contrast" = (1, 1, 1)
            float3 "rtx:post:colorgrad:gain" = (1, 1, 1)
            float3 "rtx:post:colorgrad:gamma" = (1, 1, 1)
            float3 "rtx:post:colorgrad:lift" = (0, 0, 0)
            float3 "rtx:post:colorgrad:multiply" = (1, 1, 1)
            float3 "rtx:post:colorgrad:offset" = (0, 0, 0)
            float3 "rtx:post:colorgrad:whitepoint" = (1, 1, 1)
            float3 "rtx:post:lensDistortion:lensFocalLengthArray" = (10, 30, 50)
            float3 "rtx:post:lensFlares:anisoFlareFalloffX" = (450, 475, 500)
            float3 "rtx:post:lensFlares:anisoFlareFalloffY" = (10, 10, 10)
            float3 "rtx:post:lensFlares:cutoffPoint" = (2, 2, 2)
            float3 "rtx:post:lensFlares:haloFlareFalloff" = (10, 10, 10)
            float3 "rtx:post:lensFlares:haloFlareRadius" = (75, 75, 75)
            float3 "rtx:post:lensFlares:isotropicFlareFalloff" = (50, 50, 50)
            float3 "rtx:post:tonemap:whitepoint" = (1, 1, 1)
            float3 "rtx:raytracing:inscattering:singleScatteringAlbedo" = (0.9, 0.9, 0.9)
            float3 "rtx:raytracing:inscattering:transmittanceColor" = (0.5, 0.5, 0.5)
            float3 "rtx:sceneDb:ambientLightColor" = (0.1, 0.1, 0.1)
        }
    }
    defaultPrim = "World"
    endTimeCode = 100
    metersPerUnit = 1
    startTimeCode = 0
    subLayers = [
        @../../data/TestTrackSystem.usda@
    ]
    timeCodesPerSecond = 60
    upAxis = "Z"
)

def Xform "World"
{
    float3 xformOp:rotateXYZ = (0, 0, 0)
    float3 xformOp:scale = (1, 1, 1)
    double3 xformOp:translate = (0, 0, 0)
    uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]

    def Xform "Train"
    {
        double3 xformOp:rotateXYZ = (0, 0, 0)
        double3 xformOp:scale = (1, 1, 1)
        double3 xformOp:translate = (0, 0, 0)
        uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]

        def "TRAXX147" (
            prepend payload = @../../data/B_B_/TRAXX147.usda@
        )
        {
            over "TRAXX_147"
            {
                quatd xformOp:orient = (1, 0, 0, 0)
                double3 xformOp:scale = (0.01, 0.01, 0.01)
                double3 xformOp:translate = (0, 0, 0)
                uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"]

                over "WheelFrameNorth"
                {
                    over "WheelFrame"
                    {
                        string physics:targetVelocity = "-50km/h"

                        over "trackJoint"
                        {
                            rel physics:trackSystem = </World/TrackSystem0>
                        }
                    }
                }

                over "WheelFrameSouth"
                {
                    over "WheelFrame"
                    {
                        string physics:targetVelocity = "-50km/h"

                        over "trackJoint"
                        {
                            rel physics:trackSystem = </World/TrackSystem0>
                        }
                    }
                }

                over "BogieBase"
                {
                }
            }
        }

        def "LogWagon" (
            prepend payload = @../../data/2_2_/LogWagon.usda@
        )
        {
            over "LogWagon"
            {
                quatd xformOp:orient = (1, 0, 0, 0)
                double3 xformOp:scale = (0.01, 0.01, 0.01)
                double3 xformOp:translate = (-19.75, 0, 0)
                uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"]

                over "WheelFrameNorth"
                {
                    over "WheelFrame"
                    {
                        string physics:targetVelocity = "50km/h"

                        over "trackJoint"
                        {
                            rel physics:trackSystem = </World/TrackSystem0>
                        }
                    }
                }

                over "WheelFrameSouth"
                {
                    over "WheelFrame"
                    {
                        string physics:targetVelocity = "50km/h"

                        over "trackJoint"
                        {
                            rel physics:trackSystem = </World/TrackSystem0>
                        }
                    }
                }

                over "BogieBase"
                {
                }
            }
        }

        def PhysicsDistanceJoint "DistanceJoint"
        {
            rel physics:body0 = </World/Train/TRAXX147/TRAXX_147/BogieBase>
            rel physics:body1 = </World/Train/LogWagon/LogWagon/BogieBase>
            float physics:breakForce = inf
            float physics:breakTorque = inf
            point3f physics:localPos0 = (-958.4219, 0, 98.35059)
            point3f physics:localPos1 = (1016.5781, 0, 98.35059)
            quatf physics:localRot0 = (1, 0, 0, 0)
            quatf physics:localRot1 = (1, 0, 0, 0)
            float physics:maxDistance = 0.5
            float physics:minDistance = 0
        }

        def "LogWagon_01" (
            prepend payload = @../../data/2_2_/LogWagon.usda@
        )
        {
            over "LogWagon"
            {
                quatd xformOp:orient = (1, 0, 0, 0)
                double3 xformOp:scale = (0.01, 0.01, 0.01)
                double3 xformOp:translate = (-40, 0, 0)
                uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"]

                over "WheelFrameNorth"
                {
                    over "WheelFrame"
                    {
                        string physics:targetVelocity = "50km/h"

                        over "trackJoint"
                        {
                            rel physics:trackSystem = </World/TrackSystem0>
                        }
                    }
                }

                over "WheelFrameSouth"
                {
                    over "WheelFrame"
                    {
                        string physics:targetVelocity = "50km/h"

                        over "trackJoint"
                        {
                            rel physics:trackSystem = </World/TrackSystem0>
                        }
                    }
                }

                over "BogieBase"
                {
                }
            }
        }

        def PhysicsDistanceJoint "DistanceJoint_01"
        {
            rel physics:body0 = </World/Train/LogWagon/LogWagon/BogieBase>
            rel physics:body1 = </World/Train/LogWagon_01/LogWagon/BogieBase>
            float physics:breakForce = inf
            float physics:breakTorque = inf
            point3f physics:localPos0 = (-1012.6387, 0, 98.35059)
            point3f physics:localPos1 = (1012.3613, 0, 98.35059)
            quatf physics:localRot0 = (1, 0, 0, 0)
            quatf physics:localRot1 = (1, 0, 0, 0)
            float physics:maxDistance = 0.5
            float physics:minDistance = 0
        }
    }
}

def Xform "Environment"
{
    double3 xformOp:rotateXYZ = (0, 0, 0)
    double3 xformOp:scale = (1, 1, 1)
    double3 xformOp:translate = (0, 0, 0)
    uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]

    def DomeLight "DomeLight" (
        prepend apiSchemas = ["ShapingAPI"]
    )
    {
        float inputs:intensity = 1000
        float inputs:shaping:cone:angle = 180
        float inputs:shaping:cone:softness
        float inputs:shaping:focus
        color3f inputs:shaping:focusTint
        asset inputs:shaping:ies:file
        token inputs:texture:format = "latlong"
        double3 xformOp:rotateXYZ = (0, 0, 0)
        double3 xformOp:scale = (1, 1, 1)
        double3 xformOp:translate = (0, 0, 0)
        uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"]
    }
}

