Documentation
¶
Index ¶
- Constants
- func IntersectionAABBAndPoint(box AABB, point Point) bool
- func IntersectionAABBandAABB(box1, box2 AABB) bool
- func IntersectionPointAndPoint(point1, point2 Point) bool
- func IntersectionSphereAndAABB(sphere Sphere, box AABB) bool
- func IntersectionSphereAndPoint(sphere Sphere, point Point) bool
- func IntersectionSphereAndSphere(sphere1, sphere2 Sphere) bool
- type AABB
- type IBoundingVolume
- type ICollisionObject
- type Point
- type Ptr
- type Sphere
Constants ¶
View Source
const ( Yaml_key_aabb = "AABB" Yaml_key_sphere = "sphere" Yaml_key_point = "point" Yaml_key_empty = "" )
Variables ¶
This section is empty.
Functions ¶
func IntersectionAABBandAABB ¶
Types ¶
type AABB ¶
type AABB struct {
Min GeometryMath.Vector3 `yaml:"min"`
Max GeometryMath.Vector3 `yaml:"max"`
}
func NewAABB ¶
func NewAABB(vertices []GeometryMath.Vector3) AABB
func NewDefaultAABB ¶
func NewDefaultAABB() AABB
func (AABB) GetCenter ¶
func (aabb AABB) GetCenter() GeometryMath.Vector3
func (AABB) IntersectsWith ¶
func (aabb AABB) IntersectsWith(volume IBoundingVolume) bool
func (AABB) Transform ¶
func (aabb AABB) Transform(mat GeometryMath.Matrix4x4) IBoundingVolume
type IBoundingVolume ¶
type IBoundingVolume interface {
GetCenter() GeometryMath.Vector3
Transform(mat GeometryMath.Matrix4x4) IBoundingVolume
IntersectsWith(volume IBoundingVolume) bool
}
func NewBoundingVolumeAABB ¶
func NewBoundingVolumeAABB(vertices []GeometryMath.Vector3) IBoundingVolume
func NewBoundingVolumeSphere ¶
func NewBoundingVolumeSphere(vertices []GeometryMath.Vector3) IBoundingVolume
type ICollisionObject ¶
type ICollisionObject interface {
GetBoundingVolume() IBoundingVolume
}
type Point ¶
type Point GeometryMath.Vector3
func NewDefaultPoint ¶
func NewDefaultPoint() Point
func (Point) GetCenter ¶
func (point Point) GetCenter() GeometryMath.Vector3
func (Point) IntersectsWith ¶
func (point Point) IntersectsWith(volume IBoundingVolume) bool
func (Point) Transform ¶
func (point Point) Transform(mat GeometryMath.Matrix4x4) IBoundingVolume
type Ptr ¶
type Ptr struct {
IBoundingVolume
}
type Sphere ¶
type Sphere struct {
Center GeometryMath.Vector3 `yaml:"center"`
Radius float32 `yaml:"radius"`
}
func NewDefaultSphere ¶
func NewDefaultSphere() Sphere
func NewSphere ¶
func NewSphere(vertices []GeometryMath.Vector3) Sphere
func NewSphereWithCenter ¶
func NewSphereWithCenter(center GeometryMath.Vector3, vertices []GeometryMath.Vector3) Sphere
func (Sphere) GetCenter ¶
func (sphere Sphere) GetCenter() GeometryMath.Vector3
func (Sphere) IntersectsWith ¶
func (sphere Sphere) IntersectsWith(volume IBoundingVolume) bool
func (Sphere) Transform ¶
func (sphere Sphere) Transform(mat GeometryMath.Matrix4x4) IBoundingVolume
Click to show internal directories.
Click to hide internal directories.