public static ActorTargetedConstraint Read(Actor actor, BinaryReader reader, ActorTargetedConstraint component) { ActorConstraint.Read(actor, reader, component); component.m_TargetIdx = reader.ReadUInt16(); return(component); }
public static ActorRotationConstraint Read(Actor actor, BinaryReader reader, ActorRotationConstraint component = null) { if (component == null) { component = new ActorRotationConstraint(); } ActorTargetedConstraint.Read(actor, reader, component); if ((component.m_Copy = reader.ReadByte() == 1)) { component.m_Scale = reader.ReadSingle(); } if ((component.m_EnableMin = reader.ReadByte() == 1)) { component.m_Min = reader.ReadSingle(); } if ((component.m_EnableMax = reader.ReadByte() == 1)) { component.m_Max = reader.ReadSingle(); } component.m_Offset = reader.ReadByte() == 1; component.m_SourceSpace = (TransformSpace)reader.ReadByte(); component.m_DestSpace = (TransformSpace)reader.ReadByte(); component.m_MinMaxSpace = (TransformSpace)reader.ReadByte(); return(component); }
public static ActorIKConstraint Read(Actor actor, BinaryReader reader, ActorIKConstraint component = null) { if (component == null) { component = new ActorIKConstraint(); } ActorTargetedConstraint.Read(actor, reader, component); component.m_InvertDirection = reader.ReadByte() == 1; int numInfluencedBones = (int)reader.ReadByte(); if (numInfluencedBones > 0) { component.m_InfluencedBones = new InfluencedBone[numInfluencedBones]; for (int i = 0; i < numInfluencedBones; i++) { InfluencedBone ib = new InfluencedBone(); ib.m_BoneIdx = reader.ReadUInt16(); component.m_InfluencedBones[i] = ib; } } return(component); }
public static ActorTransformConstraint Read(Actor actor, BinaryReader reader, ActorTransformConstraint component = null) { if (component == null) { component = new ActorTransformConstraint(); } ActorTargetedConstraint.Read(actor, reader, component); component.m_SourceSpace = (TransformSpace)reader.ReadByte(); component.m_DestSpace = (TransformSpace)reader.ReadByte(); return(component); }
public static ActorDistanceConstraint Read(Actor actor, BinaryReader reader, ActorDistanceConstraint component = null) { if (component == null) { component = new ActorDistanceConstraint(); } ActorTargetedConstraint.Read(actor, reader, component); component.m_Distance = reader.ReadSingle(); component.m_Mode = (Mode)reader.ReadByte(); return(component); }
public static ActorAxisConstraint Read(Actor actor, BinaryReader reader, ActorAxisConstraint component) { ActorTargetedConstraint.Read(actor, reader, component); if ((component.m_CopyX = reader.ReadByte() == 1)) { component.m_ScaleX = reader.ReadSingle(); } if ((component.m_EnableMinX = reader.ReadByte() == 1)) { component.m_MinX = reader.ReadSingle(); } if ((component.m_EnableMaxX = reader.ReadByte() == 1)) { component.m_MaxX = reader.ReadSingle(); } // Y Axis if ((component.m_CopyY = reader.ReadByte() == 1)) { component.m_ScaleY = reader.ReadSingle(); } if ((component.m_EnableMinY = reader.ReadByte() == 1)) { component.m_MinY = reader.ReadSingle(); } if ((component.m_EnableMaxY = reader.ReadByte() == 1)) { component.m_MaxY = reader.ReadSingle(); } component.m_Offset = reader.ReadByte() == 1; component.m_SourceSpace = (TransformSpace)reader.ReadByte(); component.m_DestSpace = (TransformSpace)reader.ReadByte(); component.m_MinMaxSpace = (TransformSpace)reader.ReadByte(); return(component); }
public void Copy(ActorTargetedConstraint node, Actor resetActor) { base.Copy(node, resetActor); m_TargetIdx = node.m_TargetIdx; }