vec3

package
v0.0.0-...-ae8aae0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package vec3 provides GPU operations on three-component floating-point vectors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Distance

func Distance(a, b XYZ) gpu.Float

func Dot

func Dot(a, b XYZ) gpu.Float

func Equal

func Equal(a, b XYZ) gpu.Vec3b

func FloatBitsToInt

func FloatBitsToInt[A gpu.AnyFloat](a A) gpu.Vec3i

func FloatBitsToUint

func FloatBitsToUint[A gpu.AnyFloat](a A) gpu.Vec3u

func GreaterThan

func GreaterThan(a, b XYZ) gpu.Vec3b

func GreaterThanEqual

func GreaterThanEqual(a, b XYZ) gpu.Vec3b

func IsInf

func IsInf(a XYZ) gpu.Vec3b

func IsNaN

func IsNaN(a XYZ) gpu.Vec3b

func Length

func Length(a XYZ) gpu.Float

func LessThan

func LessThan(a, b XYZ) gpu.Vec3b

func LessThanEqual

func LessThanEqual(a, b XYZ) gpu.Vec3b

func Modf

func Modf(a XYZ) (XYZ, XYZ)

func NotEqual

func NotEqual(a, b XYZ) gpu.Vec3b

Types

type RGB

type RGB gpu.RGB

RGB is a three-component vector of red, green, and blue color values on the GPU.

type XYZ

type XYZ gpu.Vec3

XYZ is a three-component vector of floating-point values on the GPU.

func Abs

func Abs(a XYZ) XYZ

func Acos

func Acos(a XYZ) XYZ

func Acosh

func Acosh(a XYZ) XYZ

func Add

func Add[T gpu.AnyFloat | XYZ](a XYZ, b T) XYZ

func Asin

func Asin(a XYZ) XYZ

func Asinh

func Asinh(a XYZ) XYZ

func Atan

func Atan(a XYZ) XYZ

func Atan2

func Atan2(a, b XYZ) XYZ

func Atanh

func Atanh(a XYZ) XYZ

func Ceil

func Ceil(a XYZ) XYZ

func ClampX

func ClampX[A, B gpu.AnyFloat](a XYZ, min A, max B) XYZ

func Clmap

func Clmap(a, min, max XYZ) XYZ

func Cos

func Cos(a XYZ) XYZ

func Cosh

func Cosh(a XYZ) XYZ

func Cross

func Cross(a, b, c XYZ) XYZ

func DFdx

func DFdx(a XYZ) XYZ

func DFdy

func DFdy(a XYZ) XYZ

func Degrees

func Degrees(a XYZ) XYZ

func Div

func Div[T gpu.AnyFloat | XYZ](a XYZ, b T) XYZ

func Exp

func Exp(a XYZ) XYZ

func Exp2

func Exp2(a XYZ) XYZ

func FaceForward

func FaceForward(a, b, n XYZ) XYZ

func Floor

func Floor(a XYZ) XYZ

func Fract

func Fract(a XYZ) XYZ

func Fwidth

func Fwidth(a XYZ) XYZ

func InverseSqrt

func InverseSqrt(a XYZ) XYZ

func Log

func Log(a XYZ) XYZ

func Log2

func Log2(a XYZ) XYZ

func Max

func Max[T gpu.AnyFloat | XYZ](a XYZ, b T) XYZ

func Min

func Min[T gpu.AnyFloat | XYZ](a XYZ, b T) XYZ

func Mix

func Mix[T gpu.AnyFloat | XYZ](a XYZ, b, t T) XYZ

func Mod

func Mod[T gpu.AnyFloat | XYZ](a XYZ, b T) XYZ

func Mul

func Mul[T gpu.AnyFloat | XYZ](a XYZ, b T) XYZ

func Neg

func Neg(a XYZ) XYZ

func New

func New[X, Y, Z gpu.AnyFloat](x X, y Y, z Z) XYZ

func Normalize

func Normalize(a XYZ) XYZ

func Pow

func Pow(a, b XYZ) XYZ

func Radians

func Radians(a XYZ) XYZ

func Reflect

func Reflect(a, b XYZ) XYZ

func Refract

func Refract[T gpu.AnyFloat](a, b XYZ, eta T) XYZ

func Round

func Round(a XYZ) XYZ

func RoundEven

func RoundEven(a XYZ) XYZ

func Sign

func Sign(a XYZ) XYZ

func Sin

func Sin(a XYZ) XYZ

func Sinh

func Sinh(a XYZ) XYZ

func SmoothStep

func SmoothStep[T gpu.AnyFloat | XYZ](a, b T, x XYZ) XYZ

func Sqrt

func Sqrt(a XYZ) XYZ

func Step

func Step[T gpu.AnyFloat | XYZ](a T, x XYZ) XYZ

func Sub

func Sub[T gpu.AnyFloat | XYZ](a XYZ, b T) XYZ

func Tan

func Tan(a XYZ) XYZ

func Tanh

func Tanh(a XYZ) XYZ

func Trunc

func Trunc(a XYZ) XYZ

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL