polar

package
v0.0.0-...-ddc071b Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: GPL-3.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PolarAzimuth

func PolarAzimuth(vec vector.Vec) float64

Calculates azimuth from vector

func Priority

func Priority(t []*Intersection) float32

func Sphere2Vec

func Sphere2Vec(x Polar) (vector.Vec, error)

Spherical Coordinate to Vector with adjusted Azimuthal Vectors

Types

type Intersection

type Intersection struct {
	T float32
}

func RaySphereIntersect

func RaySphereIntersect(r vector.Vec, o vector.Vec, s Polar) []*Intersection

type Polar

type Polar struct {
	Sphere vector.Vec
	Origin vector.Vec
}

(radial, azimuth, polar angle)

func NewPolar

func NewPolar(rad float32) Polar

func Vec2Sphere

func Vec2Sphere(x vector.Vec) (Polar, error)

Converts Vector to Spherical Coordinates Atan2 errors with az parameter on 0

func (Polar) Add

func (s Polar) Add(b Polar) Polar

func (Polar) AddAzimuth

func (s Polar) AddAzimuth(b float32) Polar

Add Azimuth Angle

func (Polar) AddAzimuthDegrees

func (s Polar) AddAzimuthDegrees(b float32) Polar

Add azimuth in degrees

func (Polar) AddPolar

func (s Polar) AddPolar(b float32) Polar

Add inclination angle

func (Polar) AddPolarDegrees

func (s Polar) AddPolarDegrees(b float32) Polar

Add inclination angle in degrees

func (Polar) Azimuth

func (s Polar) Azimuth() float32

func (Polar) Copy

func (s Polar) Copy() Polar

func (Polar) Polar

func (s Polar) Polar() float32

func (Polar) Radius

func (s Polar) Radius() float32

Jump to

Keyboard shortcuts

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