Documentation ¶
Index ¶
- Variables
- type Rectangle
- type Vector2
- func (*Vector2) Descriptor() ([]byte, []int)deprecated
- func (m *Vector2) DistanceTo(o *Vector2) float64
- func (x *Vector2) GetX() float32
- func (x *Vector2) GetY() float32
- func (m *Vector2) Length() float64
- func (*Vector2) ProtoMessage()
- func (x *Vector2) ProtoReflect() protoreflect.Message
- func (x *Vector2) Reset()
- func (x *Vector2) String() string
- func (m *Vector2) StringPretty() string
- func (m *Vector2) Sub(o *Vector2) *Vector2
- func (m *Vector2) X64() float64
- func (m *Vector2) Y64() float64
- type Vector3
- func (*Vector3) Descriptor() ([]byte, []int)deprecated
- func (x *Vector3) GetX() float32
- func (x *Vector3) GetY() float32
- func (x *Vector3) GetZ() float32
- func (*Vector3) ProtoMessage()
- func (x *Vector3) ProtoReflect() protoreflect.Message
- func (x *Vector3) Reset()
- func (x *Vector3) String() string
- func (m *Vector3) ToVector2() *Vector2
Constants ¶
This section is empty.
Variables ¶
View Source
var File_ssl_gc_geometry_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Rectangle ¶ added in v0.2.0
type Rectangle struct {
// contains filtered or unexported fields
}
func NewRectangleFromCenter ¶ added in v0.2.0
NewRectangleFromCenter creates a new rectangle from a center and the x- and y-extent
func NewRectangleFromPoints ¶ added in v0.2.0
NewRectangleFromPoints creates a new rectangle from two points
func (*Rectangle) IsPointInside ¶ added in v0.2.0
IsPointInside returns true if the given point is inside the rectangle
func (*Rectangle) WithMargin ¶ added in v0.2.0
WithMargin creates a new rectangle with the added/subtracted margin
type Vector2 ¶
type Vector2 struct { X *float32 `protobuf:"fixed32,1,req,name=x" json:"x,omitempty"` Y *float32 `protobuf:"fixed32,2,req,name=y" json:"y,omitempty"` // contains filtered or unexported fields }
A vector with two dimensions
func NewVector2 ¶
NewVector2 creates a new Vector2 from float64 values
func NewVector2Float32 ¶
NewVector2Float32 creates a new Vector2 from float32 values
func (*Vector2) Descriptor
deprecated
func (*Vector2) DistanceTo ¶
DistanceTo returns the distance between this vector and the given one
func (*Vector2) ProtoMessage ¶
func (*Vector2) ProtoMessage()
func (*Vector2) ProtoReflect ¶
func (x *Vector2) ProtoReflect() protoreflect.Message
func (*Vector2) StringPretty ¶
StringPretty converts the vector into a pretty printed string
type Vector3 ¶
type Vector3 struct { X *float32 `protobuf:"fixed32,1,req,name=x" json:"x,omitempty"` Y *float32 `protobuf:"fixed32,2,req,name=y" json:"y,omitempty"` Z *float32 `protobuf:"fixed32,3,req,name=z" json:"z,omitempty"` // contains filtered or unexported fields }
A vector with three dimensions
func (*Vector3) Descriptor
deprecated
func (*Vector3) ProtoMessage ¶
func (*Vector3) ProtoMessage()
func (*Vector3) ProtoReflect ¶
func (x *Vector3) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.