예제 #1
0
 public EntityAttachment(EntityAttachmentTypes attachmentType, ITransformable3D target, vec3 position,
                         quat orientation)
 {
     AttachmentType = attachmentType;
     Target         = target;
     Position       = position;
     Orientation    = orientation;
 }
예제 #2
0
 public static T TranslateRotateScale <T>(this ITransformable3D <T> self, Vector3 pos, Quaternion rot, Vector3 scale) where T : ITransformable3D <T>
 => self.Translate(pos).Rotate(rot).Scale(scale);
예제 #3
0
 public static T RotateZ <T>(this ITransformable3D <T> self, float angle)
 => self.RotateAround(Vector3.UnitZ, angle);
예제 #4
0
 public static T Reflect <T>(this ITransformable3D <T> self, Plane plane)
 => self.Transform(Matrix4x4.CreateReflection(plane));
예제 #5
0
 public static T Rotate <T>(this ITransformable3D <T> self, float yaw, float pitch, float roll)
 => self.Transform(Matrix4x4.CreateFromYawPitchRoll(yaw, pitch, roll));
예제 #6
0
 public static T RotateAround <T>(this ITransformable3D <T> self, Vector3 axis, float angle)
 => self.Transform(Matrix4x4.CreateFromAxisAngle(axis, angle));
예제 #7
0
 public static T Transform <T>(this ITransformable3D <T> self, params Matrix4x4[] matrices)
 => self.Transform(Multiply(matrices));
예제 #8
0
 public abstract void Apply(ITransformable3D t);
예제 #9
0
 public static T ScaleY <T>(this ITransformable3D <T> self, float y)
 => self.Scale(0, y, 0);
예제 #10
0
 public static T ScaleX <T>(this ITransformable3D <T> self, float x)
 => self.Scale(x, 0, 0);
예제 #11
0
 public static T Scale <T>(this ITransformable3D <T> self, float x, float y, float z)
 => self.Scale(new Vector3(x, y, z));
예제 #12
0
 public static T Scale <T>(this ITransformable3D <T> self, Vector3 scales)
 => self.Transform(Matrix4x4.CreateScale(scales));
예제 #13
0
 public static T Scale <T>(this ITransformable3D <T> self, float scale)
 => self.Scale(new Vector3(scale, scale, scale));
예제 #14
0
 public static T Rotate <T>(this ITransformable3D <T> self, Quaternion q)
 => self.Transform(Matrix4x4.CreateRotation(q));
예제 #15
0
 public static T Translate <T>(this ITransformable3D <T> self, Vector3 offset)
 => self.Transform(Matrix4x4.CreateTranslation(offset));
예제 #16
0
 public override void Apply(ITransformable3D t)
 {
     t.Scale = CurrentValue;
 }
예제 #17
0
 public override void Apply(ITransformable3D t)
 {
     t.Position = CurrentValue;
 }
예제 #18
0
 public static T ScaleZ <T>(this ITransformable3D <T> self, float z)
 => self.Scale(0, 0, z);
예제 #19
0
 /// <summary>
 /// Sets the game audio emitter's source
 /// </summary>
 /// <param name="manipulator">Transformable instance</param>
 public void SetSource(ITransformable3D source)
 {
     SetSource(source.Manipulator);
 }
예제 #20
0
 public static T LookAt <T>(this ITransformable3D <T> self, Vector3 cameraPosition, Vector3 cameraTarget, Vector3 cameraUpVector)
 => self.Transform(Matrix4x4.CreateLookAt(cameraPosition, cameraTarget, cameraUpVector));