ngm/geometry

Search:
Group by:
Source   Edit  

Types

Point2D = distinct Vec2
Source   Edit  
Point3D = distinct Vec3
Source   Edit  
Rect = object
  x*, y*: Real
  w*, h*: Real
Source   Edit  

Procs

func `$`(p: Point2D): string {.borrow, inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func `$`(p: Point3D): string {.borrow, inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func `$`(r: Rect): string {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func `*`(m: Mat3; p: Point2D): Point2D {.inline, ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
func `*`(m: Mat4; p: Point3D): Point3D {.inline, ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
func `*`(p: Point2D; s: Real): Point2D {.borrow, inline, ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
func `*`(p: Point3D; s: Real): Point3D {.borrow, inline, ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
func `*`(r: Rect; s: Real): Rect {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func `*`(s: Real; p: Point2D): Point2D {.borrow, inline, ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
func `*`(s: Real; p: Point3D): Point3D {.borrow, inline, ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
func `*`(s: Real; r: Rect): Rect {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func `*=`(p: var Point2D; s: Real) {.borrow, inline, ...raises: [], tags: [],
                                     forbids: [].}
Source   Edit  
func `*=`(p: var Point3D; s: Real) {.borrow, inline, ...raises: [], tags: [],
                                     forbids: [].}
Source   Edit  
func `*=`(r: var Rect; s: Real) {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func `+`(p: Point2D; v: Vec2): Point2D {.borrow, inline, ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
func `+`(p: Point3D; v: Vec3): Point3D {.borrow, inline, ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
func `+`(r: Rect; v: Vec2): Rect {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func `+=`(p: var Point2D; v: Vec2) {.borrow, inline, ...raises: [], tags: [],
                                     forbids: [].}
Source   Edit  
func `+=`(p: var Point3D; v: Vec3) {.borrow, inline, ...raises: [], tags: [],
                                     forbids: [].}
Source   Edit  
func `+=`(r: var Rect; v: Vec2) {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func `-`(p1, p2: Point2D): Vec2 {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func `-`(p1, p2: Point3D): Vec3 {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func `-`(p: Point2D): Point2D {.borrow, inline, ...raises: [], tags: [],
                                forbids: [].}
Source   Edit  
func `-`(p: Point3D): Point3D {.borrow, inline, ...raises: [], tags: [],
                                forbids: [].}
Source   Edit  
func `-`(r: Rect; v: Vec2): Rect {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func `-=`(p: var Point2D; v: Vec2) {.borrow, inline, ...raises: [], tags: [],
                                     forbids: [].}
Source   Edit  
func `-=`(p: var Point3D; v: Vec3) {.borrow, inline, ...raises: [], tags: [],
                                     forbids: [].}
Source   Edit  
func `-=`(r: var Rect; v: Vec2) {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func `/`(r: Rect; s: Real): Rect {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func `/=`(r: var Rect; s: Real) {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func `==`(p1, p2: Point2D): bool {.borrow, inline, ...raises: [], tags: [],
                                   forbids: [].}
Source   Edit  
func `==`(p1, p2: Point3D): bool {.borrow, inline, ...raises: [], tags: [],
                                   forbids: [].}
Source   Edit  
func `==`(r1, r2: Rect): bool {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func `=~`(p1, p2: Point2D): bool {.borrow, inline, ...raises: [], tags: [],
                                   forbids: [].}
Source   Edit  
func `=~`(p1, p2: Point3D): bool {.borrow, inline, ...raises: [], tags: [],
                                   forbids: [].}
Source   Edit  
func `=~`(r1, r2: Rect): bool {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func `[]`(p: Point2D; i: range[0 .. 1]): Real {.inline, ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
func `[]`(p: Point3D; i: range[0 .. 2]): Real {.inline, ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
func `[]=`(p: var Point2D; i: range[0 .. 1]; val: Real) {.inline, ...raises: [],
    tags: [], forbids: [].}
Source   Edit  
func `[]=`(p: var Point3D; i: range[0 .. 2]; val: Real) {.inline, ...raises: [],
    tags: [], forbids: [].}
Source   Edit  
func arr(r: Rect): array[4, Real] {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func centre(r: Rect): Point2D {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func centre[T: Point2D | Point3D](p1, p2: T): T {.inline.}
Source   Edit  
func contains(r: Rect; p: Point2D): bool {.inline, ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
func intersection(r1, r2: Rect): Rect {.inline, ...raises: [], tags: [],
                                        forbids: [].}
Source   Edit  
func intersects(r1, r2: Rect): bool {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func mag(p: Point2D): Real {.borrow, inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func mag(p: Point3D): Real {.borrow, inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func norm(p: Point2D): Real {.borrow, inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func norm(p: Point3D): Real {.borrow, inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func point(x, y, z: Real): Point3D {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func point(x, y: Real): Point2D {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func rect(p1, p2: Point2D): Rect {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func rect(x: SomeNumber; y: SomeNumber; w: SomeNumber; h: SomeNumber): Rect {.
    inline.}
Source   Edit  
func repr(p: Point2D): string {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func repr(p: Point3D): string {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func repr(r: Rect): string {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func vec(p: Point2D): Vec3 {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func vec(p: Point3D): Vec4 {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func x(p: Point2D | Point3D): Real {.inline.}
Source   Edit  
func y(p: Point2D | Point3D): Real {.inline.}
Source   Edit  
func z(p: Point3D): Real {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func ∩(r1, r2: Rect): Rect {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
func ∪(r1, r2: Rect): Rect {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit