Documentation ¶
Index ¶
- Constants
- func EqualWithEpsilon(a float32, b float32, epsilon float64) bool
- func InRangeWithEpsilon(value float32, min float32, max float32, epsilon float32) bool
- func IntersectQuad(r Ray, q Quad) (bool, float32)
- func Swap(a *float32, b *float32)
- type Module
- func (m *Module) HandleDagazGetDebugInfo(ctx context.Context, respond hwebsocket.ResponseSender, msg hwebsocket.Msg) error
- func (m *Module) HandleDagazGetGroundPlane(ctx context.Context, respond hwebsocket.ResponseSender, msg hwebsocket.Msg) error
- func (m *Module) HandleDagazGetRegion(ctx context.Context, respond hwebsocket.ResponseSender, msg hwebsocket.Msg) error
- func (m *Module) HandleDagazQuadSample(ctx context.Context, msg hwebsocket.Msg) error
- func (m *Module) HandleDisconnect()
- func (m *Module) HandleMsg(ctx context.Context, respond hwebsocket.ResponseSender, msg hwebsocket.Msg) error
- func (m *Module) Init(s *models.Session, p *models.Participant)
- func (m *Module) Name() string
- type Quad
- type Ray
- type RegularGrid
- type SpatialDebugInfo
- type SpatialPartition
- type State
- type Vector3f
- func Add(a Vector3f, b Vector3f) Vector3f
- func Cross(a Vector3f, b Vector3f) Vector3f
- func Mul(a Vector3f, s float32) Vector3f
- func NewVector3f(x, y, z float32) Vector3f
- func NewVector3fFromProtobuf(point *dagazpb.Point) Vector3f
- func Normalized(a Vector3f) Vector3f
- func Sub(a Vector3f, b Vector3f) Vector3f
- func (v1 *Vector3f) Add(v2 Vector3f)
- func (a *Vector3f) Dot(b Vector3f) float32
- func (v1 *Vector3f) Equal(v2 Vector3f) bool
- func (v1 Vector3f) EqualWithEpsilon(v2 Vector3f, epsilon float64) bool
- func (v1 *Vector3f) GreaterOrEqualThan(v2 Vector3f) bool
- func (v1 *Vector3f) GreaterThan(v2 Vector3f) bool
- func (a *Vector3f) Length() float64
- func (v1 *Vector3f) LesserOrEqualThan(v2 Vector3f) bool
- func (v1 *Vector3f) LesserThan(v2 Vector3f) bool
- func (a *Vector3f) NormalizeInPlace()
- func (v *Vector3f) ToProtobuf() *dagazpb.Point
Constants ¶
View Source
const MERGE_EPSILON = (float32)(0.6)
Variables ¶
This section is empty.
Functions ¶
func InRangeWithEpsilon ¶
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) HandleDagazGetDebugInfo ¶
func (m *Module) HandleDagazGetDebugInfo(ctx context.Context, respond hwebsocket.ResponseSender, msg hwebsocket.Msg) error
func (*Module) HandleDagazGetGroundPlane ¶
func (m *Module) HandleDagazGetGroundPlane(ctx context.Context, respond hwebsocket.ResponseSender, msg hwebsocket.Msg) error
func (*Module) HandleDagazGetRegion ¶
func (m *Module) HandleDagazGetRegion(ctx context.Context, respond hwebsocket.ResponseSender, msg hwebsocket.Msg) error
func (*Module) HandleDagazQuadSample ¶
func (*Module) HandleDisconnect ¶
func (m *Module) HandleDisconnect()
func (*Module) HandleMsg ¶
func (m *Module) HandleMsg(ctx context.Context, respond hwebsocket.ResponseSender, msg hwebsocket.Msg) error
type Quad ¶
type Quad struct { Center Vector3f Extents Vector3f // Half-Extents! // implicit Normal Vector3f MergeCount uint32 }
func NewQuadFromProtobuf ¶
func (*Quad) ToProtobuf ¶
type Ray ¶
func NewRayFromProtobuf ¶
type RegularGrid ¶
type RegularGrid struct { Resolution uint PlaneCount uint32 MergeCount uint32 Min Vector3f Max Vector3f Grid [][][]*Quad }
func NewRegularGrid ¶
func NewRegularGrid(numCols uint, numRows uint, resolution uint) *RegularGrid
func (*RegularGrid) ExpandToFitPoint ¶
func (grid *RegularGrid) ExpandToFitPoint(p *Vector3f)
NOTE(jhenriques): the cells limits are in the range [0..1[ meaning, for a resolution of 1, the "unit 1" is in "cell index" 1
func (*RegularGrid) GetDebugInfo ¶
func (grid *RegularGrid) GetDebugInfo() SpatialDebugInfo
func (*RegularGrid) GetRegion ¶
func (grid *RegularGrid) GetRegion(min Vector3f, max Vector3f) []*Quad
func (*RegularGrid) InsertQuad ¶
func (grid *RegularGrid) InsertQuad(q Quad)
func (*RegularGrid) IntersectQuad ¶
func (grid *RegularGrid) IntersectQuad(r Ray) (*Quad, float32)
This is a very specialized quad intersection method to work with our 2D uniformely sessiond grid.
type SpatialDebugInfo ¶
type SpatialPartition ¶
type State ¶
type State struct {
SpatialPartition SpatialPartition
}
type Vector3f ¶
type Vector3f struct {
// contains filtered or unexported fields
}
func NewVector3f ¶
func NewVector3fFromProtobuf ¶
func Normalized ¶
func (Vector3f) EqualWithEpsilon ¶
func (*Vector3f) GreaterOrEqualThan ¶
func (*Vector3f) GreaterThan ¶
func (*Vector3f) LesserOrEqualThan ¶
func (*Vector3f) LesserThan ¶
func (*Vector3f) NormalizeInPlace ¶
func (a *Vector3f) NormalizeInPlace()
func (*Vector3f) ToProtobuf ¶
Click to show internal directories.
Click to hide internal directories.