Documentation ¶
Index ¶
- type GravityDirection
- func (d *GravityDirection) Acceleration() float64
- func (d *GravityDirection) ApplyAcceleration(ctx solver.AccelerationContext)
- func (d *GravityDirection) Direction() dprec.Vec3
- func (d *GravityDirection) SetAcceleration(acceleration float64) *GravityDirection
- func (d *GravityDirection) SetDirection(direction dprec.Vec3) *GravityDirection
- type GravityPosition
- func (d *GravityPosition) Acceleration() float64
- func (d *GravityPosition) ApplyAcceleration(ctx solver.AccelerationContext)
- func (d *GravityPosition) Position() dprec.Vec3
- func (d *GravityPosition) SetAcceleration(acceleration float64) *GravityPosition
- func (d *GravityPosition) SetPosition(position dprec.Vec3) *GravityPosition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GravityDirection ¶
type GravityDirection struct {
// contains filtered or unexported fields
}
GravityDirection represents the solution for an acceleration that applies a constant force in a specific direction.
func NewGravityDirection ¶
func NewGravityDirection() *GravityDirection
NewGravityDirection creates a new GravityDirection acceleration that applies a constant force in a specific direction.
func (*GravityDirection) Acceleration ¶
func (d *GravityDirection) Acceleration() float64
Acceleration returns the acceleration of the gravity force.
func (*GravityDirection) ApplyAcceleration ¶
func (d *GravityDirection) ApplyAcceleration(ctx solver.AccelerationContext)
func (*GravityDirection) Direction ¶
func (d *GravityDirection) Direction() dprec.Vec3
Direction returns the direction of the gravity force.
func (*GravityDirection) SetAcceleration ¶
func (d *GravityDirection) SetAcceleration(acceleration float64) *GravityDirection
SetAcceleration changes the acceleration of the gravity force.
func (*GravityDirection) SetDirection ¶
func (d *GravityDirection) SetDirection(direction dprec.Vec3) *GravityDirection
SetDirection changes the direction of the gravity force.
type GravityPosition ¶
type GravityPosition struct {
// contains filtered or unexported fields
}
GravityPosition represents the solution for an acceleration that applies a constant force towards a specific position.
func NewGravityPosition ¶
func NewGravityPosition() *GravityPosition
NewGravityPosition creates a new GravityPosition acceleration that applies a constant force towards a specific position.
func (*GravityPosition) Acceleration ¶
func (d *GravityPosition) Acceleration() float64
Acceleration returns the acceleration of the gravity force.
func (*GravityPosition) ApplyAcceleration ¶
func (d *GravityPosition) ApplyAcceleration(ctx solver.AccelerationContext)
func (*GravityPosition) Position ¶
func (d *GravityPosition) Position() dprec.Vec3
Position returns the position of the gravity force.
func (*GravityPosition) SetAcceleration ¶
func (d *GravityPosition) SetAcceleration(acceleration float64) *GravityPosition
SetAcceleration changes the acceleration of the gravity force.
func (*GravityPosition) SetPosition ¶
func (d *GravityPosition) SetPosition(position dprec.Vec3) *GravityPosition
SetPosition changes the position of the gravity force.