Documentation ¶
Index ¶
- func AddScalar(a *mat64.Vector, scalar float64)
- func Distance(a, b *mat64.Vector) float64
- func DistanceSquared(a, b *mat64.Vector) float64
- func Dot(a, b *mat64.Vector) float64
- func Length(a *mat64.Vector) float64
- func MaxVec(a, b *mat64.Vector) *mat64.Vector
- func MinVec(a, b *mat64.Vector) *mat64.Vector
- func MultiplyScalar(a *mat64.Vector, scalar float64)
- func NewVector3(x, y, z float64) *mat64.Vector
- func Normalize(a *mat64.Vector)
- func VecToXYs(vectors []*mat64.Vector, xIndex, yIndex int) plotter.XYs
- type Box3
- func (b3 *Box3) ContainsPoint(point *mat64.Vector) bool
- func (b3 *Box3) Empty()
- func (b3 *Box3) ExpandByPoint(vector *mat64.Vector)
- func (b3 *Box3) ExpandByScalar(scalar float64)
- func (b3 *Box3) GetCenter() *mat64.Vector
- func (b3 *Box3) GetSize() *mat64.Vector
- func (b3 *Box3) SetFromCenterAndSize(center, size *mat64.Vector)
- func (b3 *Box3) SetFromPoints(points []*mat64.Vector)
- func (b3 *Box3) Volume() float64
- type CatmullRome3
- type CubicPoly
- type PassThroughFilter
- type Plane3
- func (p *Plane3) DistanceToPoint(point *mat64.Vector) float64
- func (p *Plane3) ProjectPoint(point *mat64.Vector) *mat64.Vector
- func (p *Plane3) Set(normal *mat64.Vector, constant float64)
- func (p *Plane3) SetComponents(x, y, z, w float64)
- func (p *Plane3) SetFromNormalAndCoplanarPoint(normal *mat64.Vector, point *mat64.Vector)
- type PointCloud
- func (pC *PointCloud) Add(vec ...*mat64.Vector)
- func (pC *PointCloud) FillRandom(count int)
- func (pC *PointCloud) FindNearestNeighbors(point *mat64.Vector, k int) PointCloud
- func (pC *PointCloud) Length() int
- func (pC *PointCloud) ReadPCD(path string) error
- func (pC *PointCloud) SavePLY(path string) error
- func (pC *PointCloud) ShowInMeshlab() error
- func (pC *PointCloud) Transform(transMat *TransMat)
- type Ray
- type Sphere3
- type TransMat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DistanceSquared ¶
DistanceSquared returns the squared distance of two given points
func MultiplyScalar ¶
func NewVector3 ¶
NewVector3 Creates a new mat64 Vector in 3d
Types ¶
type Box3 ¶
Box3 describes a box in 3d by min and max vector
func (*Box3) ExpandByPoint ¶
func (*Box3) ExpandByScalar ¶
func (*Box3) SetFromCenterAndSize ¶
func (*Box3) SetFromPoints ¶
type CatmullRome3 ¶
type CatmullRome3 struct {
// contains filtered or unexported fields
}
func NewCatmullRome3 ¶
func NewCatmullRome3(pc PointCloud) *CatmullRome3
func (*CatmullRome3) IntersectPlane ¶
func (cr *CatmullRome3) IntersectPlane(plane *Plane3) (*mat64.Vector, bool)
type CubicPoly ¶
type CubicPoly struct {
// contains filtered or unexported fields
}
func NewCubicPoly ¶
func NewCubicPoly() *CubicPoly
type PassThroughFilter ¶
PassThroughFilter filters Pointclouds by upper and lower limit
func (*PassThroughFilter) Filter ¶
func (ptf *PassThroughFilter) Filter(pc PointCloud) PointCloud
Filter returns a filtered PointCloud of a Input PoinCloud
func (*PassThroughFilter) SetCenterLimit ¶
func (ptf *PassThroughFilter) SetCenterLimit(center, limit float64)
SetCenterLimit sets the lower and upper limits by center and +/- limit
func (*PassThroughFilter) SetFilterFieldName ¶
func (ptf *PassThroughFilter) SetFilterFieldName(field string)
SetFilterFieldName sets the Normal Vector by axis-name
type Plane3 ¶
Plane3 Struct
func (*Plane3) DistanceToPoint ¶
DistanceToPoint calculates the Distance from the Plane to a given Point
func (*Plane3) ProjectPoint ¶
ProjectPoint projects a point on the plane
func (*Plane3) SetComponents ¶
SetComponents sets the Planes components
type PointCloud ¶
PointCloud Represents an array of vectors
func (*PointCloud) Add ¶
func (pC *PointCloud) Add(vec ...*mat64.Vector)
Add adds a Vector to Pointcloud
func (*PointCloud) FillRandom ¶
func (pC *PointCloud) FillRandom(count int)
FillRandom fills pointcloud with random vectors
func (*PointCloud) FindNearestNeighbors ¶
func (pC *PointCloud) FindNearestNeighbors(point *mat64.Vector, k int) PointCloud
FindNearestNeighbors finds the closest k-Points to a given point
func (*PointCloud) Length ¶
func (pC *PointCloud) Length() int
Length returns the amount of vertices in PoinCloud
func (*PointCloud) ReadPCD ¶
func (pC *PointCloud) ReadPCD(path string) error
ReadPCD reads in PCD data from Point Cloud Library
func (*PointCloud) SavePLY ¶
func (pC *PointCloud) SavePLY(path string) error
SavePLY saves a Pointcloud to PLY file
func (*PointCloud) ShowInMeshlab ¶
func (pC *PointCloud) ShowInMeshlab() error
ShowInMeshlab shows the Pointcloudobject in meshlab
func (*PointCloud) Transform ¶
func (pC *PointCloud) Transform(transMat *TransMat)
Transform transforms pointcloud with transformation matrix
type Ray ¶
Ray represents the Ray object
func NewRayFromPoints ¶
NewRayFromPoints creates a Ray from two points
type Sphere3 ¶
Sphere3 describes a 3D sphere by center and radius
func (*Sphere3) SetFromPoints ¶
SetFromPoints sets Center and Radius from Points
type TransMat ¶
TransMat is the Transformation Matrix representation.
func NewTransMat ¶
func NewTransMat() *TransMat
NewTransMat creates a new Transformation Matrix which an 4x4 Idendity.
func (*TransMat) Translation ¶
Translation applies a Translation.