package
0.0.0-20240611102818-a37d2b102beb
Repository: https://github.com/euphoricrhino/go-common.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
No description provided by the author
No description provided by the author
IdentityTransform returns an identity transform of a vector.
LoadHeatmap loads the heatmap from the given PNG file, uses its first row of pixels as color spectrum, and returns the gamma-corrected color spectrum.
NewAxisAngleRotation creates a transform that rotates a point around axis n by theta.
NewCamera creates a new Camera given view transform, projector and screen.
NewCircularCameraOrbit creates a circular camera orbit with normal n, and numPositions positions equally distributed along the circular orbit.
No description provided by the author
NewOrtho2DCamera returns a camera in canonical position (sitting at +z, looking at -z with y as up), given the screen mapping.
No description provided by the author
NewPerspective returns a perspective projector with respect to the canonical camera position, i.e., the camera is positioned at origin, forward is -z, up is +y.
No description provided by the author
NewScreen creates a Screen with dimension width and height, mapping into the rectangle [x0,x1)×(y0,y1].
NewStationaryCamera returns a CameraOrbit with only one position.
No description provided by the author
NewViewTransform creates a ViewTransform with camera position at pos, looking into the forward direction and pointing up to the up direction.
RandColor returns a full-saturation color of random hue.
# Interfaces
CameraOrbit represents an orbiting camera with a finite number of positions defined by the position index.
Projector defines an interface projecting a Vec3 into a Projection.
Transform defines a 3D transformation.
# Type aliases
Projection defines a projected Vec3.
No description provided by the author
Vec3 represents a 3D vector.