Documentation ¶
Overview ¶
Package vpbezier contains Bezier curves tools.
Index ¶
- Constants
- func F32Bernstein(n, i int, t float32) float32
- func F32BernsteinDerivative(n, i int, t float32) float32
- func F32CubicCurve1d(p0, p1, p2, p3 float32, t float32) (float32, float32)
- func F32CubicCurve2d(p0, p1, p2, p3 *vpvec2.F32, t float32) (*vpvec2.F32, *vpvec2.F32)
- func F32CubicCurve3d(p0, p1, p2, p3 *vpvec3.F32, t float32) (*vpvec3.F32, *vpvec3.F32)
- func F32CubicSurface1d(p [4][4]float32, u float32, v float32) (float32, float32, float32)
- func F32CubicSurface2d(p *[4][4]vpvec2.F32, u float32, v float32) (*vpvec2.F32, *vpvec2.F32, *vpvec2.F32)
- func F32CubicSurface3d(p *[4][4]vpvec3.F32, u float32, v float32) (*vpvec3.F32, *vpvec3.F32, *vpvec3.F32)
- func F32LinearCurve1d(p0, p1 float32, t float32) (float32, float32)
- func F32LinearCurve2d(p0, p1 *vpvec2.F32, t float32) (*vpvec2.F32, *vpvec2.F32)
- func F32LinearCurve3d(p0, p1 *vpvec3.F32, t float32) (*vpvec3.F32, *vpvec3.F32)
- func F32LinearSurface1d(p [2][2]float32, u, v float32) (float32, float32, float32)
- func F32LinearSurface2d(p *[2][2]vpvec2.F32, u, v float32) (*vpvec2.F32, *vpvec2.F32, *vpvec2.F32)
- func F32LinearSurface3d(p *[2][2]vpvec3.F32, u, v float32) (*vpvec3.F32, *vpvec3.F32, *vpvec3.F32)
- func F32QuadraticCurve1d(p0, p1, p2 float32, t float32) (float32, float32)
- func F32QuadraticCurve2d(p0, p1, p2 *vpvec2.F32, t float32) (*vpvec2.F32, *vpvec2.F32)
- func F32QuadraticCurve3d(p0, p1, p2 *vpvec3.F32, t float32) (*vpvec3.F32, *vpvec3.F32)
- func F32QuadraticSurface1d(p [3][3]float32, u float32, v float32) (float32, float32, float32)
- func F32QuadraticSurface2d(p *[3][3]vpvec2.F32, u float32, v float32) (*vpvec2.F32, *vpvec2.F32, *vpvec2.F32)
- func F32QuadraticSurface3d(p *[3][3]vpvec3.F32, u float32, v float32) (*vpvec3.F32, *vpvec3.F32, *vpvec3.F32)
Constants ¶
const PackageCopyright = "Copyright (C) 2015, 2016 Christian Mauduit <ufoot@ufoot.org>" // PackageCopyright set by version.sh
PackageCopyright contains a short copyright notice.
const PackageEmail = "ufoot@ufoot.org" // PackageEmail set by version.sh
PackageEmail contains a contact email for the package.
const PackageLicense = "GNU GPL v3" // PackageLicense set by version.sh
PackageLicense contains a short license information.
const PackageName = "Vapor Toolkit" // PackageName set by version.sh
PackageName contains a readable name of the package, suitable for display.
const PackageTarname = "vapor" // PackageTarname set by version.sh
PackageTarname contains a short name of the package, suitable for a filename.
const PackageURL = "https://github.com/ufoot/vapor" // PackageURL set by version.sh
PackageURL contains the address of the project homepage.
const VersionMajor = 0 // VersionMajor set by version.sh
VersionMajor is the project major version.
const VersionMinor = 3 // VersionMinor set by version.sh
VersionMinor is the project minor version.
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 F32Bernstein ¶
F32Bernstein returns a Berstein polynomial value.
func F32BernsteinDerivative ¶
F32BernsteinDerivative returns the derivative of the the Berstein polynomial func at a given point.
func F32CubicCurve1d ¶
F32CubicCurve1d returns the cubic Bezier curve from p0 to p3, going through p1 and p2. Points p1 and p2 are typically not reached, but they influence the curve, as it heads to p1 from p0, and conversely from p3 to p2. Works on float32 scalars. First returned value is the position, second is the derivative.
func F32CubicCurve2d ¶
F32CubicCurve2d returns the cubic Bezier curve from p0 to p3, going through p1 and p2. Points p1 and p2 are typically not reached, but they influence the curve, as it heads to p1 from p0, and conversely from p3 to p2. Works on float32 2d vectors. First returned value is the position, second is the derivative.
func F32CubicCurve3d ¶
F32CubicCurve3d returns the cubic Bezier curve from p0 to p3, going through p1 and p2. Points p1 and p2 are typically not reached, but they influence the curve, as it heads to p1 from p0, and conversely from p3 to p2. Works on float32 3d vectors. First returned value is the position, second is the derivative.
func F32CubicSurface1d ¶
F32CubicSurface1d returns a quadratic Bezier surface between 9 points.
func F32CubicSurface2d ¶
func F32CubicSurface2d(p *[4][4]vpvec2.F32, u float32, v float32) (*vpvec2.F32, *vpvec2.F32, *vpvec2.F32)
F32CubicSurface2d returns a quadratic Bezier surface between 9 points.
func F32CubicSurface3d ¶
func F32CubicSurface3d(p *[4][4]vpvec3.F32, u float32, v float32) (*vpvec3.F32, *vpvec3.F32, *vpvec3.F32)
F32CubicSurface3d returns a quadratic Bezier surface between 9 points.
func F32LinearCurve1d ¶
F32LinearCurve1d returns the linear Bezier curve from p0 to p1, which is basically a Lerp. Works on float32 scalars. First returned value is the position, second is the derivative.
func F32LinearCurve2d ¶
F32LinearCurve2d returns the linear Bezier curve from p0 to p1, which is basically a Lerp. Works on float32 2d vectors. First returned value is the position, second is the derivative.
func F32LinearCurve3d ¶
F32LinearCurve3d returns the linear Bezier curve from p0 to p1, which is basically a Lerp. Works on float32 3d vectors. First returned value is the position, second is the derivative.
func F32LinearSurface1d ¶
F32LinearSurface1d returns the linear Bezier surface between 4 points.
func F32LinearSurface2d ¶
F32LinearSurface2d returns the linear Bezier surface between 4 points.
func F32LinearSurface3d ¶
F32LinearSurface3d returns the linear Bezier surface between 4 points.
func F32QuadraticCurve1d ¶
F32QuadraticCurve1d returns the quadratic Bezier curve from p0 to p2, going through p1. Point p1 is typically not reached, but it influences the curve, as it heads to p1 from p0, and conversely from p2 to p1. Works on float32 scalars. First returned value is the position, second is the derivative.
func F32QuadraticCurve2d ¶
F32QuadraticCurve2d returns the quadratic Bezier curve from p0 to p2, going through p1. Point p1 is typically not reached, but it influences the curve, as it heads to p1 from p0, and conversely from p2 to p1. Works on float32 2d vectors. First returned value is the position, second is the derivative.
func F32QuadraticCurve3d ¶
F32QuadraticCurve3d returns the quadratic Bezier curve from p0 to p2, going through p1. Point p1 is typically not reached, but it influences the curve, as it heads to p1 from p0, and conversely from p2 to p1. Works on float32 3d vectors. First returned value is the position, second is the derivative.
func F32QuadraticSurface1d ¶
F32QuadraticSurface1d returns a quadratic Bezier surface between 9 points.
Types ¶
This section is empty.