src/computesim/vectors

Search:
Group by:
Source   Edit  

Types

BVec2 = TVec2[bool]
Source   Edit  
BVec3 = TVec3[bool]
Source   Edit  
BVec4 = TVec4[bool]
Source   Edit  
DVec2 = TVec2[float64]
Source   Edit  
DVec3 = TVec3[float64]
Source   Edit  
DVec4 = TVec4[float64]
Source   Edit  
IVec2 = TVec2[int32]
Source   Edit  
IVec3 = TVec3[int32]
Source   Edit  
IVec4 = TVec4[int32]
Source   Edit  
TVec[N; T] = object
Source   Edit  
TVec2[T] = TVec[2, T]
Source   Edit  
TVec3[T] = TVec[3, T]
Source   Edit  
TVec4[T] = TVec[4, T]
Source   Edit  
UVec2 = TVec2[uint32]
Source   Edit  
UVec3 = TVec3[uint32]
Source   Edit  
UVec4 = TVec4[uint32]
Source   Edit  
Vec2 = TVec2[float32]
Source   Edit  
Vec3 = TVec3[float32]
Source   Edit  
Vec4 = TVec4[float32]
Source   Edit  

Procs

proc `$`[T](v: TVec2[T]): string
Source   Edit  
proc `$`[T](v: TVec3[T]): string
Source   Edit  
proc `$`[T](v: TVec4[T]): string
Source   Edit  
proc `[]`[N, T](v: TVec[N, T]; i: int): T {.inline.}
Source   Edit  
proc `[]=`[N, T](v: var TVec[N, T]; i: int; val: T) {.inline.}
Source   Edit  
proc bvec2(v: bool): BVec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 with the same value for both components Source   Edit  
proc bvec2(v: BVec3): BVec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 from first two components of Vec3 Source   Edit  
proc bvec2(v: BVec4): BVec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 from first two components of Vec4 Source   Edit  
proc bvec2(x, y: bool): BVec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 from two components Source   Edit  
proc bvec3(v: bool): BVec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 with the same value for all components Source   Edit  
proc bvec3(v: BVec2; z: bool): BVec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 from Vec2 and a z component Source   Edit  
proc bvec3(v: BVec4): BVec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 from first three components of Vec4 Source   Edit  
proc bvec3(x, y, z: bool): BVec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 from three components Source   Edit  
proc bvec4(v: bool): BVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 with the same value for all components Source   Edit  
proc bvec4(v: BVec2; z, w: bool): BVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from Vec2 and z, w components Source   Edit  
proc bvec4(v: BVec3; w: bool): BVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from Vec3 and w component Source   Edit  
proc bvec4(x, y, z, w: bool): BVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from four components Source   Edit  
proc bvec4(xy: BVec2; zw: BVec2): BVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from two Vec2 components Source   Edit  
proc dvec2(v: DVec3): DVec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 from first two components of Vec3 Source   Edit  
proc dvec2(v: DVec4): DVec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 from first two components of Vec4 Source   Edit  
proc dvec2(v: float64): DVec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 with the same value for both components Source   Edit  
proc dvec2(x, y: float64): DVec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 from two components Source   Edit  
proc dvec3(v: DVec2; z: float64): DVec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 from Vec2 and a z component Source   Edit  
proc dvec3(v: DVec4): DVec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 from first three components of Vec4 Source   Edit  
proc dvec3(v: float64): DVec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 with the same value for all components Source   Edit  
proc dvec3(x, y, z: float64): DVec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 from three components Source   Edit  
proc dvec4(v: DVec2; z, w: float64): DVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from Vec2 and z, w components Source   Edit  
proc dvec4(v: DVec3; w: float64): DVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from Vec3 and w component Source   Edit  
proc dvec4(v: float64): DVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 with the same value for all components Source   Edit  
proc dvec4(x, y, z, w: float64): DVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from four components Source   Edit  
proc dvec4(xy: DVec2; zw: DVec2): DVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from two Vec2 components Source   Edit  
proc ivec2(v: int32): IVec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 with the same value for both components Source   Edit  
proc ivec2(v: IVec3): IVec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 from first two components of Vec3 Source   Edit  
proc ivec2(v: IVec4): IVec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 from first two components of Vec4 Source   Edit  
proc ivec2(x, y: int32): IVec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 from two components Source   Edit  
proc ivec3(v: int32): IVec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 with the same value for all components Source   Edit  
proc ivec3(v: IVec2; z: int32): IVec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 from Vec2 and a z component Source   Edit  
proc ivec3(v: IVec4): IVec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 from first three components of Vec4 Source   Edit  
proc ivec3(x, y, z: int32): IVec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 from three components Source   Edit  
proc ivec4(v: int32): IVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 with the same value for all components Source   Edit  
proc ivec4(v: IVec2; z, w: int32): IVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from Vec2 and z, w components Source   Edit  
proc ivec4(v: IVec3; w: int32): IVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from Vec3 and w component Source   Edit  
proc ivec4(x, y, z, w: int32): IVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from four components Source   Edit  
proc ivec4(xy: IVec2; zw: IVec2): IVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from two Vec2 components Source   Edit  
proc uvec2(v: uint32): UVec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 with the same value for both components Source   Edit  
proc uvec2(v: UVec3): UVec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 from first two components of Vec3 Source   Edit  
proc uvec2(v: UVec4): UVec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 from first two components of Vec4 Source   Edit  
proc uvec2(x, y: uint32): UVec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 from two components Source   Edit  
proc uvec3(v: uint32): UVec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 with the same value for all components Source   Edit  
proc uvec3(v: UVec2; z: uint32): UVec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 from Vec2 and a z component Source   Edit  
proc uvec3(v: UVec4): UVec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 from first three components of Vec4 Source   Edit  
proc uvec3(x, y, z: uint32): UVec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 from three components Source   Edit  
proc uvec4(v: uint32): UVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 with the same value for all components Source   Edit  
proc uvec4(v: UVec2; z, w: uint32): UVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from Vec2 and z, w components Source   Edit  
proc uvec4(v: UVec3; w: uint32): UVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from Vec3 and w component Source   Edit  
proc uvec4(x, y, z, w: uint32): UVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from four components Source   Edit  
proc uvec4(xy: UVec2; zw: UVec2): UVec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from two Vec2 components Source   Edit  
proc vec2(v: float32): Vec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 with the same value for both components Source   Edit  
proc vec2(v: Vec3): Vec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 from first two components of Vec3 Source   Edit  
proc vec2(v: Vec4): Vec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 from first two components of Vec4 Source   Edit  
proc vec2(x, y: float32): Vec2 {....raises: [], tags: [], forbids: [].}
Constructs Vec2 from two components Source   Edit  
proc vec3(v: float32): Vec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 with the same value for all components Source   Edit  
proc vec3(v: Vec2; z: float32): Vec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 from Vec2 and a z component Source   Edit  
proc vec3(v: Vec4): Vec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 from first three components of Vec4 Source   Edit  
proc vec3(x, y, z: float32): Vec3 {....raises: [], tags: [], forbids: [].}
Constructs Vec3 from three components Source   Edit  
proc vec4(v: float32): Vec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 with the same value for all components Source   Edit  
proc vec4(v: Vec2; z, w: float32): Vec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from Vec2 and z, w components Source   Edit  
proc vec4(v: Vec3; w: float32): Vec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from Vec3 and w component Source   Edit  
proc vec4(x, y, z, w: float32): Vec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from four components Source   Edit  
proc vec4(xy: Vec2; zw: Vec2): Vec4 {....raises: [], tags: [], forbids: [].}
Constructs Vec4 from two Vec2 components Source   Edit  

Templates

template w(v: TVec): untyped
Source   Edit  
template w=(v: TVec; val: typed)
Source   Edit  
template x(v: TVec): untyped
Source   Edit  
template x=(v: TVec; val: typed)
Source   Edit  
template y(v: TVec): untyped
Source   Edit  
template y=(v: TVec; val: typed)
Source   Edit  
template z(v: TVec): untyped
Source   Edit  
template z=(v: TVec; val: typed)
Source   Edit