vpwire

package
v0.0.0-...-bf055c7 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package vpwire implements basic wireframe rendering, mostly for testing purposes.

Index

Constants

View Source
const DemoHeight int = 900

DemoHeight is the height used for demo/test rendering.

View Source
const DemoWidth int = 1600

DemoWidth is the width used for demo/test rendering.

View Source
const PackageCopyright = "Copyright (C)  2015, 2016  Christian Mauduit <ufoot@ufoot.org>" // PackageCopyright set by version.sh

PackageCopyright contains a short copyright notice.

View Source
const PackageEmail = "ufoot@ufoot.org" // PackageEmail set by version.sh

PackageEmail contains a contact email for the package.

View Source
const PackageLicense = "GNU GPL v3" // PackageLicense set by version.sh

PackageLicense contains a short license information.

View Source
const PackageName = "Vapor Toolkit" // PackageName set by version.sh

PackageName contains a readable name of the package, suitable for display.

View Source
const PackageTarname = "vapor" // PackageTarname set by version.sh

PackageTarname contains a short name of the package, suitable for a filename.

View Source
const PackageURL = "https://github.com/ufoot/vapor" // PackageURL set by version.sh

PackageURL contains the address of the project homepage.

View Source
const VersionMajor = 0 // VersionMajor set by version.sh

VersionMajor is the project major version.

View Source
const VersionMinor = 4 // VersionMinor set by version.sh

VersionMinor is the project minor version.

View Source
const VersionStamp = "c6a4298" // VersionStamp set by version.sh

VersionStamp is the project stamp, possibly changes for each build.

Variables

This section is empty.

Functions

func F64Demo

func F64Demo(line *vpline3.F64) draw.Image

F64Demo draws a line for demo purposes, creates an image on the fly, with default point-of-view, perspective and other parameters, can typically be used for testing, not testing this package, but possibly testing out point transformations functions (Bezier curves is an example).

func F64Draw

func F64Draw(img draw.Image, line *vpline3.F64, proj *vpmat4x4.F64, mode DrawMode, col color.Color) draw.Image

F64Draw draws a line on an image, the image is modified in-place, and returned modified.

func F64Proj

func F64Proj(line *vpline3.F64, img *image.RGBA, dir *vpvec3.F64) *vpmat4x4.F64

F64Proj calculates the projection for a line, so that all points in the line are visible, given a direction for the center "ray".

Types

type DrawMode

type DrawMode int

DrawMode defines how to draw stuff, including lines. Inspired from OpenGL GL_POINTS, GL_LINES or GL_TRIANGLES.

const (
	// DrawPoints causes all points to be drawn individually, as points.
	DrawPoints DrawMode = iota
	// DrawLines is used to to draw lines with odd index points considered
	// as the begin point of line number index/2 and even index points considered
	// as the end point of line (index-1)/2.
	DrawLines
	// DrawTriangles groups points by pack of three, and then draws a triangle
	// joining these three points.
	DrawTriangles
)

Jump to

Keyboard shortcuts

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