Documentation
¶
Index ¶
- type Camera
- func (camera *Camera) GetFront() GeometryMath.Vector3
- func (camera *Camera) GetFrustum() IFrustum
- func (camera *Camera) GetPosition() GeometryMath.Vector3
- func (camera *Camera) GetProjectionMatrix() GeometryMath.Matrix4x4
- func (camera *Camera) GetRight() GeometryMath.Vector3
- func (camera *Camera) GetUp() GeometryMath.Vector3
- func (camera *Camera) GetViewMatrix() GeometryMath.Matrix4x4
- func (camera *Camera) SetProjection(projection GeometryMath.IProjectionConfig)
- func (camera *Camera) Update(position GeometryMath.Vector3, front GeometryMath.Vector3, ...)
- type ICamera
- type IFrustum
- type PlaneFrustum
- func (frustum *PlaneFrustum) Contains(volume BoundingVolume.IBoundingVolume) bool
- func (frustum *PlaneFrustum) ContainsAABB(aabb BoundingVolume.AABB) bool
- func (frustum *PlaneFrustum) ContainsSphere(sphere BoundingVolume.Sphere) bool
- func (frustum *PlaneFrustum) GetAllPlanes() []GeometryMath.Plane3
- func (frustum *PlaneFrustum) GetProjectionConfig() GeometryMath.IProjectionConfig
- func (frustum *PlaneFrustum) Update(camera ICamera)
- func (frustum *PlaneFrustum) UpdateProjectionConfig(projectionConfig GeometryMath.IProjectionConfig)
- type RadarFrustum
- func (frustum *RadarFrustum) Contains(volume BoundingVolume.IBoundingVolume) bool
- func (frustum *RadarFrustum) ContainsAABB(aabb BoundingVolume.AABB) bool
- func (frustum *RadarFrustum) ContainsSphere(sphere BoundingVolume.Sphere) bool
- func (frustum *RadarFrustum) Update(position GeometryMath.Vector3, front GeometryMath.Vector3, ...)
- func (frustum *RadarFrustum) UpdateProjectionConfig(projectionConfig GeometryMath.PerspectiveConfig)
- type UBOCamera
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Camera ¶
type Camera struct {
// contains filtered or unexported fields
}
func (*Camera) GetFront ¶
func (camera *Camera) GetFront() GeometryMath.Vector3
func (*Camera) GetFrustum ¶
func (*Camera) GetPosition ¶
func (camera *Camera) GetPosition() GeometryMath.Vector3
func (*Camera) GetProjectionMatrix ¶
func (camera *Camera) GetProjectionMatrix() GeometryMath.Matrix4x4
func (*Camera) GetRight ¶
func (camera *Camera) GetRight() GeometryMath.Vector3
func (*Camera) GetUp ¶
func (camera *Camera) GetUp() GeometryMath.Vector3
func (*Camera) GetViewMatrix ¶
func (camera *Camera) GetViewMatrix() GeometryMath.Matrix4x4
func (*Camera) SetProjection ¶
func (camera *Camera) SetProjection(projection GeometryMath.IProjectionConfig)
func (*Camera) Update ¶
func (camera *Camera) Update(position GeometryMath.Vector3, front GeometryMath.Vector3, up GeometryMath.Vector3)
type ICamera ¶
type ICamera interface {
Update(position GeometryMath.Vector3, front GeometryMath.Vector3, up GeometryMath.Vector3)
GetPosition() GeometryMath.Vector3
GetFront() GeometryMath.Vector3
GetUp() GeometryMath.Vector3
GetRight() GeometryMath.Vector3
SetProjection(projection GeometryMath.IProjectionConfig)
GetProjectionMatrix() GeometryMath.Matrix4x4
GetViewMatrix() GeometryMath.Matrix4x4
GetFrustum() IFrustum
}
type IFrustum ¶
type IFrustum interface {
Update(camera ICamera)
UpdateProjectionConfig(projectionConfig GeometryMath.IProjectionConfig)
Contains(volume BoundingVolume.IBoundingVolume) bool
ContainsSphere(sphere BoundingVolume.Sphere) bool
ContainsAABB(aabb BoundingVolume.AABB) bool
GetProjectionConfig() GeometryMath.IProjectionConfig
}
type PlaneFrustum ¶
type PlaneFrustum struct {
Planes struct {
Far GeometryMath.Plane3
Near GeometryMath.Plane3
Top GeometryMath.Plane3
Bottom GeometryMath.Plane3
Right GeometryMath.Plane3
Left GeometryMath.Plane3
}
Dimensions struct {
FarHeight float32
FarWidth float32
NearHeight float32
NearWidth float32
}
ProjectionConfig GeometryMath.IProjectionConfig
}
func (*PlaneFrustum) Contains ¶
func (frustum *PlaneFrustum) Contains(volume BoundingVolume.IBoundingVolume) bool
func (*PlaneFrustum) ContainsAABB ¶
func (frustum *PlaneFrustum) ContainsAABB(aabb BoundingVolume.AABB) bool
func (*PlaneFrustum) ContainsSphere ¶
func (frustum *PlaneFrustum) ContainsSphere(sphere BoundingVolume.Sphere) bool
func (*PlaneFrustum) GetAllPlanes ¶
func (frustum *PlaneFrustum) GetAllPlanes() []GeometryMath.Plane3
func (*PlaneFrustum) GetProjectionConfig ¶
func (frustum *PlaneFrustum) GetProjectionConfig() GeometryMath.IProjectionConfig
func (*PlaneFrustum) Update ¶
func (frustum *PlaneFrustum) Update(camera ICamera)
func (*PlaneFrustum) UpdateProjectionConfig ¶
func (frustum *PlaneFrustum) UpdateProjectionConfig(projectionConfig GeometryMath.IProjectionConfig)
type RadarFrustum ¶
type RadarFrustum struct {
TanY float32
TanX float32
SphereFactorX float32
SphereFactorY float32
Position GeometryMath.Vector3
Front GeometryMath.Vector3
Up GeometryMath.Vector3
Right GeometryMath.Vector3
ProjectionConfig GeometryMath.PerspectiveConfig
}
func (*RadarFrustum) Contains ¶
func (frustum *RadarFrustum) Contains(volume BoundingVolume.IBoundingVolume) bool
func (*RadarFrustum) ContainsAABB ¶
func (frustum *RadarFrustum) ContainsAABB(aabb BoundingVolume.AABB) bool
TODO: check correct points of box
func (*RadarFrustum) ContainsSphere ¶
func (frustum *RadarFrustum) ContainsSphere(sphere BoundingVolume.Sphere) bool
func (*RadarFrustum) Update ¶
func (frustum *RadarFrustum) Update(position GeometryMath.Vector3, front GeometryMath.Vector3, up GeometryMath.Vector3)
func (*RadarFrustum) UpdateProjectionConfig ¶
func (frustum *RadarFrustum) UpdateProjectionConfig(projectionConfig GeometryMath.PerspectiveConfig)
type UBOCamera ¶
type UBOCamera struct {
Camera
Buffer.UniformBuffer
Buffer.DynamicBufferData
}
func (*UBOCamera) GetBufferData ¶
func (camera *UBOCamera) GetBufferData() interface{}
func (*UBOCamera) SetProjection ¶
func (camera *UBOCamera) SetProjection(projection GeometryMath.IProjectionConfig)
func (*UBOCamera) Update ¶
func (camera *UBOCamera) Update(position GeometryMath.Vector3, front GeometryMath.Vector3, up GeometryMath.Vector3)
Click to show internal directories.
Click to hide internal directories.