Documentation ¶
Index ¶
- func Project(vec *math.Vector3, camera *Camera)
- func UnProject(vec *math.Vector3, camera *Camera)
- type Camera
- func (camera *Camera) Clone() *Camera
- func (camera *Camera) Copy(source *Camera, recursive bool)
- func (camera *Camera) GetMatrixWorldInverse() *math.Matrix4
- func (camera *Camera) GetProjectionMatrix() *math.Matrix4
- func (camera *Camera) GetProjectionMatrixInverse() *math.Matrix4
- func (camera *Camera) GetWorldDirection(target *math.Vector3) *math.Vector3
- func (camera *Camera) IsCamera() bool
- func (camera *Camera) UpdateMatrixWorld(force bool)
- type CameraObject
- type Face3
- type Geometry
- func (geo *Geometry) ApplyMatrix(matrix *math.Matrix4)
- func (geo *Geometry) Center()
- func (geo *Geometry) GetBoundingBox() *math.Box3
- func (geo *Geometry) GetBoundingSphere() *math.Sphere
- func (geo *Geometry) LookAt(vector *math.Vector3)
- func (geo *Geometry) Normalize()
- func (geo *Geometry) RotateX(angle math.Angle)
- func (geo *Geometry) RotateY(angle math.Angle)
- func (geo *Geometry) RotateZ(angle math.Angle)
- func (geo *Geometry) Scale(x, y, z float32)
- func (geo *Geometry) Translate(x, y, z float32)
- func (geo *Geometry) TranslateVector3(v *math.Vector3)
- type IGeometry
- type Id
- type IdGenerator
- type Intersection
- type Layers
- type Light
- type Material
- type Object3
- func (obj *Object3) Add(object *Object3)
- func (obj *Object3) AddAll(objects []*Object3)
- func (obj *Object3) ApplyMatrix(matrix *math.Matrix4)
- func (obj *Object3) ApplyQuaternion(q *math.Quaternion)
- func (obj *Object3) Clone(recursive bool) *Object3
- func (obj *Object3) Copy(source *Object3, recursive bool)
- func (obj *Object3) CopyWorldDirection(target *math.Vector3)
- func (obj *Object3) CopyWorldPosition(target *math.Vector3)
- func (obj *Object3) CopyWorldQuaternion(target *math.Quaternion)
- func (obj *Object3) CopyWorldScale(target *math.Vector3)
- func (obj *Object3) GetChildren() []*Object3
- func (obj *Object3) GetChildrenById(id Id) *Object3
- func (obj *Object3) GetChildrenByName(name string) *Object3
- func (obj *Object3) GetId() Id
- func (obj *Object3) GetMatrixWorld() *math.Matrix4
- func (obj *Object3) GetParent() *Object3
- func (obj *Object3) GetWorldDirection() *math.Vector3
- func (obj *Object3) GetWorldPosition() *math.Vector3
- func (obj *Object3) GetWorldQuaternion() *math.Quaternion
- func (obj *Object3) GetWorldScale() *math.Vector3
- func (obj *Object3) IsCamera() bool
- func (obj *Object3) IsVisible() bool
- func (obj *Object3) LocalToWorld(vector *math.Vector3)
- func (obj *Object3) LookAt(x *math.Vector3)
- func (obj *Object3) LookAtComponents(x, y, z float32)
- func (obj *Object3) OnAfterRender() *event.Handler
- func (obj *Object3) OnBeforeRender() *event.Handler
- func (obj *Object3) Remove(object *Object3)
- func (obj *Object3) RemoveAll(objects []*Object3)
- func (obj *Object3) RotateOnAxis(axis *math.Vector3, angle math.Angle)
- func (obj *Object3) RotateOnWorldAxis(axis *math.Vector3, angle math.Angle)
- func (obj *Object3) RotateX(angle math.Angle)
- func (obj *Object3) RotateY(angle math.Angle)
- func (obj *Object3) RotateZ(angle math.Angle)
- func (obj *Object3) SetRotationFromAxisAngle(axis *math.Vector3, angle math.Angle)
- func (obj *Object3) SetRotationFromEuler(euler *math.Euler)
- func (obj *Object3) SetRotationFromMatrix(m *math.Matrix4)
- func (obj *Object3) SetRotationFromQuaternion(q *math.Quaternion)
- func (obj *Object3) TranslateOnAxis(axis *math.Vector3, distance float32)
- func (obj *Object3) TranslateX(distance float32)
- func (obj *Object3) TranslateY(distance float32)
- func (obj *Object3) TranslateZ(distance float32)
- func (obj *Object3) TraverseAncestorsIterator() *object3Iterator
- func (obj *Object3) TraverseIterator(onlyVisible bool) *object3Iterator
- func (obj *Object3) UpdateMatrix()
- func (obj *Object3) UpdateMatrixWorld(force bool)
- func (obj *Object3) WorldToLocal(vector *math.Vector3)
- type RaycastCamera
- type RaycastObject
- type Raycaster
- func (ray *Raycaster) IntersectObject(object interface{ ... }, recursive bool) []Intersection
- func (ray *Raycaster) IntersectObjects(objects []interface{ ... }, recursive bool) []Intersection
- func (ray *Raycaster) Set(origin *math.Vector3, direction *math.Vector3)
- func (ray *Raycaster) SetFromCamera(coordinates *math.Vector2, camera RaycastCamera)
- type Scene
- type SortableIntersections
- type Texture
- type TextureOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Camera ¶
type Camera struct { Object3 // contains filtered or unexported fields }
func (*Camera) GetMatrixWorldInverse ¶
func (*Camera) GetProjectionMatrix ¶
func (*Camera) GetProjectionMatrixInverse ¶
func (*Camera) GetWorldDirection ¶
func (*Camera) UpdateMatrixWorld ¶
type CameraObject ¶
type CameraObject interface {
IsCamera() bool
}
type Face3 ¶
type Face3 struct { A math.Vector3 B math.Vector3 C math.Vector3 Normal math.Vector3 VertexNormals [3]math.Vector3 Color math.Color MaterialIndex uint }
func NewDefaultFace3 ¶
type Geometry ¶
type Geometry struct { IGeometry // contains filtered or unexported fields }
The basic geometry
func (*Geometry) ApplyMatrix ¶
func (*Geometry) GetBoundingBox ¶
func (*Geometry) GetBoundingSphere ¶
func (*Geometry) TranslateVector3 ¶
type IdGenerator ¶
type IdGenerator struct {
// contains filtered or unexported fields
}
func (*IdGenerator) Next ¶
func (id *IdGenerator) Next() Id
type Intersection ¶
type Intersection struct {
// contains filtered or unexported fields
}
type Light ¶
type Light struct { Object3 // contains filtered or unexported fields }
func (*Light) GetIntensity ¶
type Material ¶
func NewMaterial ¶
func NewMaterial() *Material
type Object3 ¶
type Object3 struct { Name string Position math.Vector3 Rotation math.Euler Scale math.Vector3 Visible bool RenderOrder uint // contains filtered or unexported fields }
func (*Object3) ApplyMatrix ¶
func (*Object3) ApplyQuaternion ¶
func (obj *Object3) ApplyQuaternion(q *math.Quaternion)
func (*Object3) CopyWorldDirection ¶
func (*Object3) CopyWorldPosition ¶
func (*Object3) CopyWorldQuaternion ¶
func (obj *Object3) CopyWorldQuaternion(target *math.Quaternion)
func (*Object3) CopyWorldScale ¶
func (*Object3) GetChildren ¶
func (*Object3) GetChildrenById ¶
func (*Object3) GetChildrenByName ¶
func (*Object3) GetMatrixWorld ¶
func (*Object3) GetWorldDirection ¶
func (*Object3) GetWorldPosition ¶
func (*Object3) GetWorldQuaternion ¶
func (obj *Object3) GetWorldQuaternion() *math.Quaternion
func (*Object3) GetWorldScale ¶
func (*Object3) LocalToWorld ¶
func (*Object3) LookAtComponents ¶
func (*Object3) OnAfterRender ¶
func (*Object3) OnBeforeRender ¶
func (*Object3) RotateOnAxis ¶
func (*Object3) RotateOnWorldAxis ¶
func (*Object3) SetRotationFromAxisAngle ¶
func (*Object3) SetRotationFromEuler ¶
func (*Object3) SetRotationFromMatrix ¶
func (*Object3) SetRotationFromQuaternion ¶
func (obj *Object3) SetRotationFromQuaternion(q *math.Quaternion)
func (*Object3) TranslateOnAxis ¶
func (*Object3) TranslateX ¶
func (*Object3) TranslateY ¶
func (*Object3) TranslateZ ¶
func (*Object3) TraverseAncestorsIterator ¶
func (obj *Object3) TraverseAncestorsIterator() *object3Iterator
func (*Object3) TraverseIterator ¶
func (*Object3) UpdateMatrix ¶
func (obj *Object3) UpdateMatrix()
func (*Object3) UpdateMatrixWorld ¶
func (*Object3) WorldToLocal ¶
type RaycastObject ¶
type RaycastObject interface { IsVisible() bool RayCast(*Raycaster) []Intersection GetChildren() []*Object3 }
type Raycaster ¶
type Raycaster struct {
// contains filtered or unexported fields
}
func NewDefaultRaycaster ¶
func NewRaycaster ¶
func (*Raycaster) IntersectObject ¶
func (ray *Raycaster) IntersectObject(object interface{ RaycastObject }, recursive bool) []Intersection
func (*Raycaster) IntersectObjects ¶
func (ray *Raycaster) IntersectObjects(objects []interface{ RaycastObject }, recursive bool) []Intersection
func (*Raycaster) SetFromCamera ¶
func (ray *Raycaster) SetFromCamera(coordinates *math.Vector2, camera RaycastCamera)
type SortableIntersections ¶
type SortableIntersections []Intersection
func (SortableIntersections) Len ¶
func (s SortableIntersections) Len() int
func (SortableIntersections) Less ¶
func (s SortableIntersections) Less(i, j int) bool
func (SortableIntersections) Swap ¶
func (s SortableIntersections) Swap(i, j int)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.