Documentation
¶
Index ¶
- Constants
- Variables
- type AxeDrawingElement
- type ConnectionDrawingElement
- func (c ConnectionDrawingElement) Color(blinkValue float64) int32
- func (c ConnectionDrawingElement) Dimmer(blinkValue float64) float32
- func (c ConnectionDrawingElement) Display(filter SpaceDrawingFilter) bool
- func (c ConnectionDrawingElement) Key() ObjectType
- func (c ConnectionDrawingElement) Pos() *m3point.Point
- type DisplayWorld
- func (world *DisplayWorld) CheckMax() bool
- func (world *DisplayWorld) CreateDrawingElements()
- func (world *DisplayWorld) CreateDrawingElementsMap() int
- func (world DisplayWorld) DisplaySettings()
- func (world *DisplayWorld) EventOutgrowthThresholdDecrease()
- func (world *DisplayWorld) EventOutgrowthThresholdIncrease()
- func (world *DisplayWorld) ForwardTime()
- func (world *DisplayWorld) RedrawAxesElementsMap()
- func (world *DisplayWorld) RedrawConnectionsElementsMap()
- func (world *DisplayWorld) RedrawNodesElementsMap()
- func (world *DisplayWorld) SetMatrices()
- func (world *DisplayWorld) Tick(glfwTime float64)
- type DrawingElementsCreator
- type GLObject
- type NodeDrawingElement
- type ObjectType
- type OpenGLDrawingElement
- type Segment
- type SizeVar
- type SpaceDrawingColor
- type SpaceDrawingElement
- type SpaceDrawingFilter
- type Sphere
- type TimeAutoVar
- type Triangle
- type TriangleFiller
Constants ¶
View Source
const ( FloatSize = 4 IntSize = 2 FloatPerVertices = 6 // PPPNNN IntPerVertices = 1 // C )
OpenGL const
View Source
const (
AxeExtraLength = 3
)
QSM DrawingElementsMap const
Variables ¶
View Source
var CircleForLine = make([]mgl64.Vec2, circlePartsLine)
View Source
var CircleForSphere = make([]mgl64.Vec2, circlePartsSphere)
View Source
var LineWidth = SizeVar{0.05, 0.5, 0.1}
View Source
var Log = m3util.NewLogger("m3gl", m3util.INFO)
View Source
var Origin = mgl64.Vec3{0.0, 0.0, 0.0}
View Source
var SphereRadius = SizeVar{0.1, 0.8, 0.4}
View Source
var XH = mgl64.Vec3{1.0, 0.0, 0.0}
View Source
var YH = mgl64.Vec3{0.0, 1.0, 0.0}
View Source
var ZH = mgl64.Vec3{0.0, 0.0, 1.0}
Functions ¶
This section is empty.
Types ¶
type AxeDrawingElement ¶
type AxeDrawingElement struct {
// contains filtered or unexported fields
}
func (AxeDrawingElement) Color ¶
func (a AxeDrawingElement) Color(blinkValue float64) int32
func (AxeDrawingElement) Dimmer ¶
func (a AxeDrawingElement) Dimmer(blinkValue float64) float32
func (AxeDrawingElement) Display ¶
func (a AxeDrawingElement) Display(filter SpaceDrawingFilter) bool
func (AxeDrawingElement) Key ¶
func (a AxeDrawingElement) Key() ObjectType
AxeDrawingElement functions
func (AxeDrawingElement) Pos ¶
func (a AxeDrawingElement) Pos() *m3point.Point
type ConnectionDrawingElement ¶
type ConnectionDrawingElement struct {
// contains filtered or unexported fields
}
func MakeConnectionDrawingElement ¶
func MakeConnectionDrawingElement(space *m3space.Space, point m3point.Point, connId m3point.ConnectionId) *ConnectionDrawingElement
func (ConnectionDrawingElement) Color ¶
func (c ConnectionDrawingElement) Color(blinkValue float64) int32
func (ConnectionDrawingElement) Dimmer ¶
func (c ConnectionDrawingElement) Dimmer(blinkValue float64) float32
func (ConnectionDrawingElement) Display ¶
func (c ConnectionDrawingElement) Display(filter SpaceDrawingFilter) bool
func (ConnectionDrawingElement) Key ¶
func (c ConnectionDrawingElement) Key() ObjectType
ConnectionDrawingElement functions
func (ConnectionDrawingElement) Pos ¶
func (c ConnectionDrawingElement) Pos() *m3point.Point
type DisplayWorld ¶
type DisplayWorld struct { Max m3point.CInt WorldSpace *m3space.Space Filter SpaceDrawingFilter Elements []SpaceDrawingElement NbVertices int OpenGLBuffer []float32 DrawingElementsMap map[ObjectType]OpenGLDrawingElement TopCornerDist float64 Width, Height int EyeDist SizeVar FovAngle SizeVar LightDirection mgl32.Vec3 LightColor mgl32.Vec3 Projection mgl32.Mat4 Camera mgl32.Mat4 Model mgl32.Mat4 Angle TimeAutoVar Blinker TimeAutoVar // contains filtered or unexported fields }
func MakeWorld ¶
func MakeWorld(env *m3db.QsmEnvironment, Max int64, glfwTime float64) DisplayWorld
func (*DisplayWorld) CheckMax ¶
func (world *DisplayWorld) CheckMax() bool
func (*DisplayWorld) CreateDrawingElements ¶
func (world *DisplayWorld) CreateDrawingElements()
func (*DisplayWorld) CreateDrawingElementsMap ¶
func (world *DisplayWorld) CreateDrawingElementsMap() int
func (DisplayWorld) DisplaySettings ¶
func (world DisplayWorld) DisplaySettings()
func (*DisplayWorld) EventOutgrowthThresholdDecrease ¶
func (world *DisplayWorld) EventOutgrowthThresholdDecrease()
func (*DisplayWorld) EventOutgrowthThresholdIncrease ¶
func (world *DisplayWorld) EventOutgrowthThresholdIncrease()
func (*DisplayWorld) ForwardTime ¶
func (world *DisplayWorld) ForwardTime()
func (*DisplayWorld) RedrawAxesElementsMap ¶
func (world *DisplayWorld) RedrawAxesElementsMap()
func (*DisplayWorld) RedrawConnectionsElementsMap ¶
func (world *DisplayWorld) RedrawConnectionsElementsMap()
func (*DisplayWorld) RedrawNodesElementsMap ¶
func (world *DisplayWorld) RedrawNodesElementsMap()
func (*DisplayWorld) SetMatrices ¶
func (world *DisplayWorld) SetMatrices()
func (*DisplayWorld) Tick ¶
func (world *DisplayWorld) Tick(glfwTime float64)
type DrawingElementsCreator ¶
type DrawingElementsCreator struct {
// contains filtered or unexported fields
}
func (*DrawingElementsCreator) VisitLink ¶
func (creator *DrawingElementsCreator) VisitLink(space *m3space.Space, srcPoint m3point.Point, connId m3point.ConnectionId)
type GLObject ¶
type GLObject interface { Key() ObjectType NumberOfVertices() int ExtractTriangles() []Triangle }
type NodeDrawingElement ¶
type NodeDrawingElement struct {
// contains filtered or unexported fields
}
func MakeNodeDrawingElement ¶
func MakeNodeDrawingElement(space *m3space.Space, node m3space.Node) *NodeDrawingElement
func (NodeDrawingElement) Color ¶
func (n NodeDrawingElement) Color(blinkValue float64) int32
func (NodeDrawingElement) Dimmer ¶
func (n NodeDrawingElement) Dimmer(blinkValue float64) float32
func (NodeDrawingElement) Display ¶
func (n NodeDrawingElement) Display(filter SpaceDrawingFilter) bool
func (NodeDrawingElement) Key ¶
func (n NodeDrawingElement) Key() ObjectType
NodeDrawingElement functions
func (NodeDrawingElement) Pos ¶
func (n NodeDrawingElement) Pos() *m3point.Point
type ObjectType ¶
type ObjectType uint8
const ( AxeX ObjectType = iota AxeY AxeZ NodeEmpty NodeActive Connection00 )
func (ObjectType) IsAxe ¶
func (ot ObjectType) IsAxe() bool
func (ObjectType) IsConnection ¶
func (ot ObjectType) IsConnection() bool
func (ObjectType) IsNode ¶
func (ot ObjectType) IsNode() bool
type OpenGLDrawingElement ¶
type Segment ¶
type Segment struct {
A, B mgl64.Vec3
T ObjectType
}
func MakeSegment ¶
func MakeSegment(p1, p2 m3point.Point, t ObjectType) Segment
func (Segment) ExtractTriangles ¶
func (Segment) Key ¶
func (s Segment) Key() ObjectType
func (Segment) NumberOfVertices ¶
type SpaceDrawingColor ¶
type SpaceDrawingColor struct {
// contains filtered or unexported fields
}
type SpaceDrawingElement ¶
type SpaceDrawingElement interface { // Key of the drawing element to point to the OpenGL buffer to render Key() ObjectType // The translation point to apply to the OpenGL model, since all the above are drawn at the origin Pos() *m3point.Point // Return the obj_color int for the shader program Color(blinkValue float64) int32 // Return the obj_dimmer int for the shader program Dimmer(blinkValue float64) float32 // Display flag Display(filter SpaceDrawingFilter) bool }
type SpaceDrawingFilter ¶
type SpaceDrawingFilter struct { // Display grey empty nodes or not DisplayEmptyNodes bool // Display grey empty connections or not DisplayEmptyConnections bool // The events of certain colors to display. This is a mask. EventColorMask uint8 // The outgrowth events with how many colors to display. EventOutgrowthManyColorsThreshold uint8 // The space the filter apply to Space *m3space.Space }
func (*SpaceDrawingFilter) ColorMaskSwitch ¶
func (filter *SpaceDrawingFilter) ColorMaskSwitch(color m3space.EventColor)
func (*SpaceDrawingFilter) DisplaySettings ¶
func (filter *SpaceDrawingFilter) DisplaySettings()
func (*SpaceDrawingFilter) EventOutgrowthColorsDecrease ¶
func (filter *SpaceDrawingFilter) EventOutgrowthColorsDecrease()
func (*SpaceDrawingFilter) EventOutgrowthColorsIncrease ¶
func (filter *SpaceDrawingFilter) EventOutgrowthColorsIncrease()
type Sphere ¶
type Sphere struct { C mgl64.Vec3 R float64 T ObjectType }
func MakeSphere ¶
func MakeSphere(t ObjectType) Sphere
func (Sphere) ExtractTriangles ¶
func (Sphere) Key ¶
func (s Sphere) Key() ObjectType
func (Sphere) NumberOfVertices ¶
type TimeAutoVar ¶
type TimeAutoVar struct { Enabled bool Threshold float64 Ratio float64 Value float64 // contains filtered or unexported fields }
func (*TimeAutoVar) Tick ¶
func (t *TimeAutoVar) Tick(glfwTime float64)
type Triangle ¶
type Triangle struct {
// contains filtered or unexported fields
}
func MakeTriangle ¶
type TriangleFiller ¶
type TriangleFiller struct {
// contains filtered or unexported fields
}