public BlendShapeVertex(ObjectReader reader) { vertex = reader.ReadVector3(); normal = reader.ReadVector3(); tangent = reader.ReadVector3(); index = reader.ReadUInt32(); }
public xform(ObjectReader reader) { var version = reader.version; t = version[0] > 5 || (version[0] == 5 && version[1] >= 4) ? (object)reader.ReadVector3() : (object)reader.ReadVector4(); //5.4 and up q = reader.ReadQuaternion(); s = version[0] > 5 || (version[0] == 5 && version[1] >= 4) ? (object)reader.ReadVector3() : (object)reader.ReadVector4(); //5.4 and up }
public Limit(ObjectReader reader) { var version = reader.version; if (version[0] > 5 || (version[0] == 5 && version[1] >= 4))//5.4 and up { m_Min = reader.ReadVector3(); m_Max = reader.ReadVector3(); } else { m_Min = reader.ReadVector4(); m_Max = reader.ReadVector4(); } }
public Transform(ObjectReader reader) : base(reader) { m_LocalRotation = reader.ReadQuaternion(); m_LocalPosition = reader.ReadVector3(); m_LocalScale = reader.ReadVector3(); int m_ChildrenCount = reader.ReadInt32(); m_Children = new PPtr <Transform> [m_ChildrenCount]; for (int i = 0; i < m_ChildrenCount; i++) { m_Children[i] = new PPtr <Transform>(reader); } m_Father = new PPtr <Transform>(reader); }
public SpriteVertex(ObjectReader reader) { var version = reader.version; pos = reader.ReadVector3(); if (version[0] < 4 || (version[0] == 4 && version[1] <= 3)) //4.3 and down { uv = reader.ReadVector2(); } }
public MeshBlendShape(ObjectReader reader) { var version = reader.version; if (version[0] == 4 && version[1] < 3) //4.3 down { var name = reader.ReadAlignedString(); } firstVertex = reader.ReadUInt32(); vertexCount = reader.ReadUInt32(); if (version[0] == 4 && version[1] < 3) //4.3 down { var aabbMinDelta = reader.ReadVector3(); var aabbMaxDelta = reader.ReadVector3(); } hasNormals = reader.ReadBoolean(); hasTangents = reader.ReadBoolean(); if (version[0] > 4 || (version[0] == 4 && version[1] >= 3)) //4.3 and up { reader.AlignStream(); } }
public Axes(ObjectReader reader) { var version = reader.version; m_PreQ = reader.ReadVector4(); m_PostQ = reader.ReadVector4(); if (version[0] > 5 || (version[0] == 5 && version[1] >= 4)) //5.4 and up { m_Sgn = reader.ReadVector3(); } else { m_Sgn = reader.ReadVector4(); } m_Limit = new Limit(reader); m_Length = reader.ReadSingle(); m_Type = reader.ReadUInt32(); }
public ValueArray(ObjectReader reader) { var version = reader.version; if (version[0] < 5 || (version[0] == 5 && version[1] < 5)) //5.5 down { m_BoolValues = reader.ReadBooleanArray(); reader.AlignStream(); m_IntValues = reader.ReadInt32Array(); m_FloatValues = reader.ReadSingleArray(); } if (version[0] < 4 || (version[0] == 4 && version[1] < 3)) //4.3 down { m_VectorValues = reader.ReadVector4Array(); } else { int numPosValues = reader.ReadInt32(); m_PositionValues = new Vector3[numPosValues]; for (int i = 0; i < numPosValues; i++) { m_PositionValues[i] = version[0] > 5 || (version[0] == 5 && version[1] >= 4) ? reader.ReadVector3() : (Vector3)reader.ReadVector4(); //5.4 and up } m_QuaternionValues = reader.ReadVector4Array(); int numScaleValues = reader.ReadInt32(); m_ScaleValues = new Vector3[numScaleValues]; for (int i = 0; i < numScaleValues; i++) { m_ScaleValues[i] = version[0] > 5 || (version[0] == 5 && version[1] >= 4) ? reader.ReadVector3() : (Vector3)reader.ReadVector4(); //5.4 and up } if (version[0] > 5 || (version[0] == 5 && version[1] >= 5)) //5.5 and up { m_FloatValues = reader.ReadSingleArray(); m_IntValues = reader.ReadInt32Array(); m_BoolValues = reader.ReadBooleanArray(); reader.AlignStream(); } } }
public ValueArray(ObjectReader reader) { var version = reader.version; if (version[0] < 5 || (version[0] == 5 && version[1] < 5)) //5.5 down { int numBools = reader.ReadInt32(); m_BoolValues = new bool[numBools]; for (int i = 0; i < numBools; i++) { m_BoolValues[i] = reader.ReadBoolean(); } reader.AlignStream(4); m_IntValues = reader.ReadInt32Array(reader.ReadInt32()); m_FloatValues = reader.ReadSingleArray(reader.ReadInt32()); } int numPosValues = reader.ReadInt32(); m_PositionValues = new object[numPosValues]; for (int i = 0; i < numPosValues; i++) { m_PositionValues[i] = version[0] > 5 || (version[0] == 5 && version[1] >= 4) ? (object)reader.ReadVector3() : (object)reader.ReadVector4(); //5.4 and up } m_QuaternionValues = reader.ReadVector4Array(reader.ReadInt32()); int numScaleValues = reader.ReadInt32(); m_ScaleValues = new object[numScaleValues]; for (int i = 0; i < numScaleValues; i++) { m_ScaleValues[i] = version[0] > 5 || (version[0] == 5 && version[1] >= 4) ? (object)reader.ReadVector3() : (object)reader.ReadVector4(); //5.4 adn up } if (version[0] > 5 || (version[0] == 5 && version[1] >= 5)) //5.5 and up { m_FloatValues = reader.ReadSingleArray(reader.ReadInt32()); m_IntValues = reader.ReadInt32Array(reader.ReadInt32()); int numBools = reader.ReadInt32(); m_BoolValues = new bool[numBools]; for (int i = 0; i < numBools; i++) { m_BoolValues[i] = reader.ReadBoolean(); } reader.AlignStream(4); } }
public ClipMuscleConstant(ObjectReader reader) { var version = reader.version; m_DeltaPose = new HumanPose(reader); m_StartX = new xform(reader); if (version[0] > 5 || (version[0] == 5 && version[1] >= 5))//5.5 and up { m_StopX = new xform(reader); } m_LeftFootStartX = new xform(reader); m_RightFootStartX = new xform(reader); if (version[0] < 5)//5.0 down { m_MotionStartX = new xform(reader); m_MotionStopX = new xform(reader); } m_AverageSpeed = version[0] > 5 || (version[0] == 5 && version[1] >= 4) ? (object)reader.ReadVector3() : (object)reader.ReadVector4();//5.4 and up m_Clip = new Clip(reader); m_StartTime = reader.ReadSingle(); m_StopTime = reader.ReadSingle(); m_OrientationOffsetY = reader.ReadSingle(); m_Level = reader.ReadSingle(); m_CycleOffset = reader.ReadSingle(); m_AverageAngularSpeed = reader.ReadSingle(); int numIndices = reader.ReadInt32(); m_IndexArray = reader.ReadInt32Array(numIndices); if (version[0] < 4 || (version[0] == 4 && version[1] < 3)) //4.3 down { int numAdditionalCurveIndexs = reader.ReadInt32(); var m_AdditionalCurveIndexArray = new List <int>(numAdditionalCurveIndexs); for (int i = 0; i < numAdditionalCurveIndexs; i++) { m_AdditionalCurveIndexArray.Add(reader.ReadInt32()); } } int numDeltas = reader.ReadInt32(); m_ValueArrayDelta = new List <ValueDelta>(numDeltas); for (int i = 0; i < numDeltas; i++) { m_ValueArrayDelta.Add(new ValueDelta(reader)); } if (version[0] > 5 || (version[0] == 5 && version[1] >= 3))//5.3 and up { m_ValueArrayReferencePose = reader.ReadSingleArray(reader.ReadInt32()); } m_Mirror = reader.ReadBoolean(); m_LoopTime = reader.ReadBoolean(); m_LoopBlend = reader.ReadBoolean(); m_LoopBlendOrientation = reader.ReadBoolean(); m_LoopBlendPositionY = reader.ReadBoolean(); m_LoopBlendPositionXZ = reader.ReadBoolean(); if (version[0] > 5 || (version[0] == 5 && version[1] >= 5))//5.5 and up { m_StartAtOrigin = reader.ReadBoolean(); } m_KeepOriginalOrientation = reader.ReadBoolean(); m_KeepOriginalPositionY = reader.ReadBoolean(); m_KeepOriginalPositionXZ = reader.ReadBoolean(); m_HeightFromFeet = reader.ReadBoolean(); reader.AlignStream(4); }
public HumanPose(ObjectReader reader) { var version = reader.version; m_RootX = new xform(reader); m_LookAtPosition = version[0] > 5 || (version[0] == 5 && version[1] >= 4) ? (object)reader.ReadVector3() : (object)reader.ReadVector4();//5.4 and up m_LookAtWeight = reader.ReadVector4(); int numGoals = reader.ReadInt32(); m_GoalArray = new List <HumanGoal>(numGoals); for (int i = 0; i < numGoals; i++) { m_GoalArray.Add(new HumanGoal(reader)); } m_LeftHandPose = new HandPose(reader); m_RightHandPose = new HandPose(reader); int numDoFs = reader.ReadInt32(); m_DoFArray = reader.ReadSingleArray(numDoFs); if (version[0] > 5 || (version[0] == 5 && version[1] >= 2))//5.2 and up { int numTDof = reader.ReadInt32(); m_TDoFArray = new object[numTDof]; for (int i = 0; i < numTDof; i++) { m_TDoFArray[i] = version[0] > 5 || (version[0] == 5 && version[1] >= 4) ? (object)reader.ReadVector3() : (object)reader.ReadVector4();//5.4 and up } } }
public HumanGoal(ObjectReader reader) { var version = reader.version; m_X = new xform(reader); m_WeightT = reader.ReadSingle(); m_WeightR = reader.ReadSingle(); if (version[0] >= 5) //5.0 and up { m_HintT = version[0] > 5 || (version[0] == 5 && version[1] >= 4) ? (object)reader.ReadVector3() : (object)reader.ReadVector4(); //5.4 and up m_HintWeightT = reader.ReadSingle(); } }
public AABB(ObjectReader reader) { m_Center = reader.ReadVector3(); m_Extend = reader.ReadVector3(); }
public HumanPose(ObjectReader reader) { var version = reader.version; m_RootX = new xform(reader); m_LookAtPosition = version[0] > 5 || (version[0] == 5 && version[1] >= 4) ? reader.ReadVector3() : (Vector3)reader.ReadVector4();//5.4 and up m_LookAtWeight = reader.ReadVector4(); var numGoals = reader.ReadInt32(); m_GoalArray = new HumanGoal[numGoals]; for (var i = 0; i < numGoals; i++) { m_GoalArray[i] = new HumanGoal(reader); } m_LeftHandPose = new HandPose(reader); m_RightHandPose = new HandPose(reader); m_DoFArray = reader.ReadSingleArray(); if (version[0] > 5 || (version[0] == 5 && version[1] >= 2))//5.2 and up { var numTDof = reader.ReadInt32(); m_TDoFArray = new Vector3[numTDof]; for (var i = 0; i < numTDof; i++) { m_TDoFArray[i] = version[0] > 5 || (version[0] == 5 && version[1] >= 4) ? reader.ReadVector3() : (Vector3)reader.ReadVector4();//5.4 and up } } }