Documentation
¶
Index ¶
- func CheckIntersection(first, second Placement, resultSet *IntersectionResultSet)
- func CheckIntersectionBoxBox(first, second Placement, resultSet *IntersectionResultSet)
- func CheckIntersectionBoxMesh(boxPlacement, meshPlacement Placement, resultSet *IntersectionResultSet)
- func CheckIntersectionBoxUnknown(first, second Placement, resultSet *IntersectionResultSet)
- func CheckIntersectionMeshMesh(first, second Placement, resultSet *IntersectionResultSet)
- func CheckIntersectionMeshUnknown(first, second Placement, resultSet *IntersectionResultSet)
- func CheckIntersectionSphereBox(first, second Placement, resultSet *IntersectionResultSet)
- func CheckIntersectionSphereMesh(spherePlacement, meshPlacement Placement, resultSet *IntersectionResultSet)
- func CheckIntersectionSphereSphere(first, second Placement, resultSet *IntersectionResultSet)
- func CheckIntersectionSphereUnknown(first, second Placement, resultSet *IntersectionResultSet)
- type Intersection
- type IntersectionResultSet
- type Placement
- type StaticBox
- type StaticLine
- type StaticMesh
- type StaticSphere
- type StaticTriangle
- func (t StaticTriangle) A() sprec.Vec3
- func (t StaticTriangle) Area() float32
- func (t StaticTriangle) B() sprec.Vec3
- func (t StaticTriangle) C() sprec.Vec3
- func (t StaticTriangle) ContainsPoint(point sprec.Vec3) bool
- func (t StaticTriangle) IsLookingTowards(direction sprec.Vec3) bool
- func (t StaticTriangle) Normal() sprec.Vec3
- func (t StaticTriangle) Transformed(translation sprec.Vec3, rotation sprec.Quat) StaticTriangle
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 StaticBox ¶
type StaticBox struct {
// contains filtered or unexported fields
}
func NewStaticBox ¶
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
Click to show internal directories.
Click to hide internal directories.