shape

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIntersection

func CheckIntersection(first, second Placement, resultSet *IntersectionResultSet)

func CheckIntersectionBoxBox

func CheckIntersectionBoxBox(first, second Placement, resultSet *IntersectionResultSet)

func CheckIntersectionBoxMesh

func CheckIntersectionBoxMesh(boxPlacement, meshPlacement Placement, resultSet *IntersectionResultSet)

func CheckIntersectionBoxUnknown

func CheckIntersectionBoxUnknown(first, second Placement, resultSet *IntersectionResultSet)

func CheckIntersectionMeshMesh

func CheckIntersectionMeshMesh(first, second Placement, resultSet *IntersectionResultSet)

func CheckIntersectionMeshUnknown

func CheckIntersectionMeshUnknown(first, second Placement, resultSet *IntersectionResultSet)

func CheckIntersectionSphereBox

func CheckIntersectionSphereBox(first, second Placement, resultSet *IntersectionResultSet)

func CheckIntersectionSphereMesh

func CheckIntersectionSphereMesh(spherePlacement, meshPlacement Placement, resultSet *IntersectionResultSet)

func CheckIntersectionSphereSphere

func CheckIntersectionSphereSphere(first, second Placement, resultSet *IntersectionResultSet)

func CheckIntersectionSphereUnknown

func CheckIntersectionSphereUnknown(first, second Placement, resultSet *IntersectionResultSet)

Types

type Intersection

type Intersection struct {
	Depth                float32
	FirstContact         sprec.Vec3
	FirstDisplaceNormal  sprec.Vec3
	SecondContact        sprec.Vec3
	SecondDisplaceNormal sprec.Vec3
}

func (Intersection) Flipped

func (i Intersection) Flipped() Intersection

type IntersectionResultSet

type IntersectionResultSet struct {
	// contains filtered or unexported fields
}

func NewIntersectionResultSet

func NewIntersectionResultSet(capacity int) *IntersectionResultSet

func (*IntersectionResultSet) Add

func (s *IntersectionResultSet) Add(intersection Intersection)

func (*IntersectionResultSet) AddFlipped

func (s *IntersectionResultSet) AddFlipped(flipped bool)

func (*IntersectionResultSet) Found

func (s *IntersectionResultSet) Found() bool

func (*IntersectionResultSet) Intersections

func (s *IntersectionResultSet) Intersections() []Intersection

func (*IntersectionResultSet) Reset

func (s *IntersectionResultSet) Reset()

type Placement

type Placement struct {
	Position    sprec.Vec3
	Orientation sprec.Quat
	Shape       interface{}
}

func (Placement) Transformed

func (p Placement) Transformed(translation sprec.Vec3, rotation sprec.Quat) Placement

type StaticBox

type StaticBox struct {
	// contains filtered or unexported fields
}

func NewStaticBox

func NewStaticBox(width, height, length float32) StaticBox

func (StaticBox) Height

func (b StaticBox) Height() float32

func (StaticBox) Length

func (b StaticBox) Length() float32

func (StaticBox) Width

func (b StaticBox) Width() float32

type StaticLine

type StaticLine struct {
	// contains filtered or unexported fields
}

func NewStaticLine

func NewStaticLine(a, b sprec.Vec3) StaticLine

func (StaticLine) A

func (l StaticLine) A() sprec.Vec3

func (StaticLine) B

func (l StaticLine) B() sprec.Vec3

func (StaticLine) Length

func (l StaticLine) Length() float32

func (StaticLine) SqrLength

func (l StaticLine) SqrLength() float32

type StaticMesh

type StaticMesh struct {
	// contains filtered or unexported fields
}

func NewStaticMesh

func NewStaticMesh(triangles []StaticTriangle) StaticMesh

func (StaticMesh) BoundingSphereRadius

func (m StaticMesh) BoundingSphereRadius() float32

func (StaticMesh) Triangles

func (m StaticMesh) Triangles() []StaticTriangle

type StaticSphere

type StaticSphere struct {
	// contains filtered or unexported fields
}

func NewStaticSphere

func NewStaticSphere(radius float32) StaticSphere

func (StaticSphere) Radius

func (s StaticSphere) Radius() float32

type StaticTriangle

type StaticTriangle struct {
	// contains filtered or unexported fields
}

func NewStaticTriangle

func NewStaticTriangle(a, b, c sprec.Vec3) StaticTriangle

func (StaticTriangle) A

func (t StaticTriangle) A() sprec.Vec3

func (StaticTriangle) Area

func (t StaticTriangle) Area() float32

func (StaticTriangle) B

func (t StaticTriangle) B() sprec.Vec3

func (StaticTriangle) C

func (t StaticTriangle) C() sprec.Vec3

func (StaticTriangle) ContainsPoint

func (t StaticTriangle) ContainsPoint(point sprec.Vec3) bool

func (StaticTriangle) IsLookingTowards

func (t StaticTriangle) IsLookingTowards(direction sprec.Vec3) bool

func (StaticTriangle) Normal

func (t StaticTriangle) Normal() sprec.Vec3

func (StaticTriangle) Transformed

func (t StaticTriangle) Transformed(translation sprec.Vec3, rotation sprec.Quat) StaticTriangle

Jump to

Keyboard shortcuts

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