public Rotation2(Rotation2 arg) : this(kdlPINVOKE.new_Rotation2__SWIG_3(Rotation2.getCPtr(arg)), true) { if (kdlPINVOKE.SWIGPendingException.Pending) { throw kdlPINVOKE.SWIGPendingException.Retrieve(); } }
public static Rotation2 operator +(Rotation2 r1, Rotation2 r2) { Rotation2 result = new Rotation2(r1); result.LeftBy(r2); return(result); }
void Start() { mainCamera = GameObject.Find(CAMERA_NAME).GetComponent <Camera>(); inputFlags = new bool[INPUT_DICT.Count]; mousePosition = new Vector2(); mouseRotation = new Rotation2(); }
public static void Draw(Texture2D texture, Rectangle rectPosition, Rotation2 rotation) { Resources.Put(texture.GetHashCode().ToString(), texture); var ScaledRect = ScaleRectangle(rectPosition); _spriteBatch.Draw(texture, null, ScaledRect, null, new Vector2(ScaledRect.Width / 2, ScaledRect.Height / 2), rotation.Value * .017453292519f, new Vector2(1, 1)); }
public Representable(string prefabName, Vector2 defaultPosition) { this.defaultPosition = new Vector2(defaultPosition.x, defaultPosition.y); SetRepresentationPrefab(prefabName); SetRepresentationSprite(null); position = new Vector2(this.defaultPosition.x, this.defaultPosition.y); rotation = new Rotation2(); }
public Rotation2 Inverse() { Rotation2 ret = new Rotation2(kdlPINVOKE.Rotation2_Inverse__SWIG_0(swigCPtr), true); if (kdlPINVOKE.SWIGPendingException.Pending) { throw kdlPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static Rotation2 Identity() { Rotation2 ret = new Rotation2(kdlPINVOKE.Rotation2_Identity(), true); if (kdlPINVOKE.SWIGPendingException.Pending) { throw kdlPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static Rotation2 Rot(double angle) { Rotation2 ret = new Rotation2(kdlPINVOKE.Rotation2_Rot(angle), true); if (kdlPINVOKE.SWIGPendingException.Pending) { throw kdlPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public OverlapBox(Vec2 pos, Vec2 size, float rot, bool centerAtTheBottom) { CenterAtTheBottom = centerAtTheBottom; Size = size; var hSize = size / 2; var polygon = false ? new Polygon2(new[] { new Vector2(-hSize.X, 0), new Vector2(hSize.X, 0), new Vector2(hSize.X, size.Y), new Vector2(-hSize.X, size.Y) }, new Vector2(0, 0)) : new Polygon2(new[] { new Vector2(-hSize.X, -hSize.Y), new Vector2(hSize.X, -hSize.Y), new Vector2(hSize.X, hSize.Y), new Vector2(-hSize.X, hSize.Y) }); var rotation = new Rotation2((float)(Math.PI * (rot / 180))); var position = new Vector2(pos.X, pos.Y); Poly = polygon; Rot = rotation; Pos = position; RotAngles = rot; }
public Projection(Vector2 coordinates, float scale, Rotation2 rotation) { _coordinates = coordinates; _scale = scale; _rotation = rotation; }
public RotoTranslation2(Rotation2 rotation) : this(rotation, Vector2.Zero) { }
public RotoTranslation2(Rotation2 rotation, Vector2 translation) { _rotation = rotation; _translation = translation; }
public void RightBy(Rotation2 rotation) { valueInRads -= rotation.valueInRads; Clamp(); }
public void Set(Rotation2 rotation) { valueInRads = rotation.valueInRads; }
public Transform(Rotation2 rot, Vector2 trans) { T = trans; R = rot; }
public void SetRotation(Rotation2 rotation) { this.rotation = rotation; }
public void AdjustRotation(Rotation2 delta) { rotation += delta; }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Rotation2 obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
public RectangleCollisionShape2(Vector2 position, Rotation2 rotation) : base(Shape.RECT, position, rotation) { }
public ColoredCone() { color = Color.Orange; transform = new Transform2(new Size2(400, 400)); angle = new Rotation2(90); }
public Rotation2(Rotation2 rotation) { Set(rotation); }
public static RotoTranslation2 ComputeRotationAboutPoint(Rotation2 rotation, Vector2 point) { return(new RotoTranslation2(rotation, point - rotation.Apply(point))); }
public void LeftBy(Rotation2 rotation) { valueInRads += rotation.valueInRads; Clamp(); }
public void SetRepresentationRotation(Rotation2 rotation) { this.rotation = rotation; }
public ConeTexture(int range, Rotation2 angle, Color color) { _range = range; _color = color; _angle = angle; }
public Entity(string prefabName) : base(prefabName) { position = new Vector2(); rotation = new Rotation2(); }
public CollisionShape2(Shape shape, Vector2 pos, Rotation2 rot) { this.shape = shape; this.pos = new Vector2(position.X, position.Y); this.rot = new Rotation2(rot); }
public static void DrawCenteredWithOffset(string imageName, Vector2 widthHeight, Vector2 offSet, Rotation2 rotation) { _spriteBatch.Draw(Resources.Load <Texture2D>(imageName), null, new Rectangle(ScalePoint(_display.GameWidth / 2 / _display.Scale - widthHeight.X / 2 + offSet.X, _display.GameHeight / 2 / _display.Scale - widthHeight.Y / 2 + offSet.Y), ScalePoint(widthHeight.X, widthHeight.Y)), null, null, rotation.Value * .017453292519f, new Vector2(1, 1)); }