MCPcopy
hub / github.com/g3n/engine / IShape

Interface IShape

experimental/collision/shape/shape.go:11–18  ·  view source on GitHub ↗

IShape is the interface for all collision shapes. Shapes in this package satisfy this interface and also geometry.Geometry.

Source from the content-addressed store, hash-verified

9// IShape is the interface for all collision shapes.
10// Shapes in this package satisfy this interface and also geometry.Geometry.
11type IShape interface {
12 BoundingBox() math32.Box3
13 BoundingSphere() math32.Sphere
14 Area() float32
15 Volume() float32
16 RotationalInertia(mass float32) math32.Matrix3
17 ProjectOntoAxis(localAxis *math32.Vector3) (float32, float32)
18}
19
20// Shape is a collision shape.
21// It can be an analytical geometry such as a sphere, plane, etc.. or it can be defined by a polygonal Geometry.

Callers 8

FindCollisionPairsMethod · 0.65
BoundingBoxMethod · 0.65
RaycastMeshMethod · 0.65
RaycastPointsMethod · 0.65
RaycastMeshMethod · 0.65
lineRaycastFunction · 0.65
UpdateMassPropertiesMethod · 0.65
ProjectOntoWorldAxisMethod · 0.65

Implementers 3

Geometrygeometry/geometry.go
Planeexperimental/collision/shape/plane.go
Sphereexperimental/collision/shape/sphere.go

Calls

no outgoing calls

Tested by

no test coverage detected