Documentation
¶
Index ¶
- func CreateB2Vec2Array(va []Vector) []box2d.B2Vec2
- type Body
- type BodyType
- type ChainShapeProperties
- type CircleShapeProperties
- type Color
- type CustomProperties
- func (cp CustomProperties) GetBool(name string) (bool, bool)
- func (cp CustomProperties) GetBoolDefault(name string, defaultValue bool) bool
- func (cp CustomProperties) GetColor(name string) (Color, bool)
- func (cp CustomProperties) GetColorDefault(name string, defaultValue Color) Color
- func (cp CustomProperties) GetFloat(name string) (float64, bool)
- func (cp CustomProperties) GetFloatDefault(name string, defaultValue float64) float64
- func (cp CustomProperties) GetInt(name string) (int, bool)
- func (cp CustomProperties) GetIntDefault(name string, defaultValue int) int
- func (cp CustomProperties) GetString(name string) (string, bool)
- func (cp CustomProperties) GetStringDefault(name string, defaultValue string) string
- func (cp CustomProperties) GetVector(name string) (Vector, bool)
- func (cp CustomProperties) GetVectorDefault(name string, defaultValue Vector) Vector
- type CustomProperty
- type CustomPropertyType
- type DistanceJointProperties
- type Filter
- type Fixture
- type FrictionJointProperties
- type Image
- type ImageFilter
- type Joint
- type JointType
- type MassData
- type MotorJointProperties
- type Object
- type PolygonShapeProperties
- type PrismaticJointProperties
- type RevoluteJointProperties
- type RopeJointProperties
- type Scene
- func (s Scene) CreateB2Bodies(world *box2d.B2World) []*box2d.B2Body
- func (s Scene) CreateB2BodiesJoints(world *box2d.B2World) ([]*box2d.B2Body, []*box2d.B2JointInterface)
- func (s Scene) CreateB2Joints(world *box2d.B2World, bodies []*box2d.B2Body) []*box2d.B2JointInterface
- func (s Scene) CreateB2World() *box2d.B2World
- func (s Scene) CreateB2WorldBodiesJoints() (*box2d.B2World, []*box2d.B2Body, []*box2d.B2JointInterface)
- type Shape
- type ShapeType
- type Vector
- type WeldJointProperties
- type WheelJointProperties
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Body ¶
type Body struct { Active bool AllowSleep bool Angle float64 AngularDamping float64 AngularVelocity float64 Awake bool Bullet bool CustomProperties CustomProperties FixedRotation bool Fixtures []Fixture GravityScale float64 LinearDamping float64 LinearVelocity Vector MassData MassData Name string Position Vector Type BodyType }
Body type
type BodyType ¶
type BodyType int
BodyType type
func (BodyType) CreateB2BodyType ¶
CreateB2BodyType func
type ChainShapeProperties ¶
type ChainShapeProperties struct { HasNextVertex bool HasPrevVertex bool NextVertex Vector PrevVertex Vector Vertices []Vector }
ChainShapeProperties type
type CircleShapeProperties ¶
CircleShapeProperties type
type CustomProperties ¶
type CustomProperties map[string]interface{}
CustomProperties type
func (CustomProperties) GetBool ¶
func (cp CustomProperties) GetBool(name string) (bool, bool)
GetBool func
func (CustomProperties) GetBoolDefault ¶
func (cp CustomProperties) GetBoolDefault(name string, defaultValue bool) bool
GetBoolDefault func
func (CustomProperties) GetColor ¶
func (cp CustomProperties) GetColor(name string) (Color, bool)
GetColor func
func (CustomProperties) GetColorDefault ¶
func (cp CustomProperties) GetColorDefault(name string, defaultValue Color) Color
GetColorDefault func
func (CustomProperties) GetFloat ¶
func (cp CustomProperties) GetFloat(name string) (float64, bool)
GetFloat func
func (CustomProperties) GetFloatDefault ¶
func (cp CustomProperties) GetFloatDefault(name string, defaultValue float64) float64
GetFloatDefault func
func (CustomProperties) GetInt ¶
func (cp CustomProperties) GetInt(name string) (int, bool)
GetInt func
func (CustomProperties) GetIntDefault ¶
func (cp CustomProperties) GetIntDefault(name string, defaultValue int) int
GetIntDefault func
func (CustomProperties) GetString ¶
func (cp CustomProperties) GetString(name string) (string, bool)
GetString func
func (CustomProperties) GetStringDefault ¶
func (cp CustomProperties) GetStringDefault(name string, defaultValue string) string
GetStringDefault func
func (CustomProperties) GetVector ¶
func (cp CustomProperties) GetVector(name string) (Vector, bool)
GetVector func
func (CustomProperties) GetVectorDefault ¶
func (cp CustomProperties) GetVectorDefault(name string, defaultValue Vector) Vector
GetVectorDefault func
type CustomProperty ¶
type CustomProperty struct { Name string Type CustomPropertyType Value interface{} }
CustomProperty type
type CustomPropertyType ¶
type CustomPropertyType int
CustomPropertyType type
const ( BoolType CustomPropertyType = iota ColorType FloatType IntType StringType VectorType )
CustomPropertyType const
type DistanceJointProperties ¶
DistanceJointProperties type
type Fixture ¶
type Fixture struct { CustomProperties CustomProperties Density float64 Filter Filter Friction float64 IsSensor bool Name string Restitution float64 Shape Shape }
Fixture type
func (Fixture) CreateB2FixtureDef ¶
func (f Fixture) CreateB2FixtureDef() *box2d.B2FixtureDef
CreateB2FixtureDef func
type FrictionJointProperties ¶
FrictionJointProperties type
type Image ¶
type Image struct { Angle float64 AspectScale float64 Body int Center Vector ColorTint Color Corners []Vector CustomProperties CustomProperties File string Filter ImageFilter Flip bool GlDrawElements []int GlTexCoordPointer []int GlVertexPointer []float64 Name string Opacity float64 RenderOrder float64 Scale float64 }
Image type
type ImageFilter ¶
type ImageFilter int
ImageFilter type
const ( LinearFilter ImageFilter = iota NearestFilter )
ImageFilter const
type Joint ¶
type Joint struct { BodyA int BodyB int CollideConnected bool CustomProperties CustomProperties LocalAnchorA Vector LocalAnchorB Vector Name string Properties interface{} Type JointType }
Joint type
func (Joint) CreateB2JointDef ¶
func (j Joint) CreateB2JointDef(bodies []*box2d.B2Body) box2d.B2JointDefInterface
CreateB2JointDef func
type MotorJointProperties ¶
type MotorJointProperties struct { AngularOffset float64 CorrectionFactor float64 LinearOffset Vector MaxForce float64 MaxTorque float64 }
MotorJointProperties type
type Object ¶
type Object struct { Angle float64 CustomProperties CustomProperties Flip bool Name string Position Vector Scale float64 }
Object type
type PolygonShapeProperties ¶
type PolygonShapeProperties struct {
Vertices []Vector
}
PolygonShapeProperties type
type PrismaticJointProperties ¶
type PrismaticJointProperties struct { EnableLimit bool EnableMotor bool LocalAxisA Vector LowerTranslation float64 MaxMotorForce float64 MotorSpeed float64 ReferenceAngle float64 UpperTranslation float64 }
PrismaticJointProperties type
type RevoluteJointProperties ¶
type RevoluteJointProperties struct { EnableLimit bool EnableMotor bool LowerAngle float64 MaxMotorTorque float64 MotorSpeed float64 ReferenceAngle float64 UpperAngle float64 }
RevoluteJointProperties type
type RopeJointProperties ¶
type RopeJointProperties struct {
MaxLength float64
}
RopeJointProperties type
type Scene ¶
type Scene struct { AllowSleep bool AutoClearForces bool Bodies []Body CollisionBitPlanes []string ContinuousPhysics bool CustomProperties CustomProperties Gravity Vector Images []Image Joints []Joint Objects []Object PositionIterations int StepsPerSecond float64 SubStepping bool VelocityIterations int WarmStarting bool }
Scene type
func (Scene) CreateB2Bodies ¶
CreateB2Bodies func
func (Scene) CreateB2BodiesJoints ¶
func (s Scene) CreateB2BodiesJoints(world *box2d.B2World) ([]*box2d.B2Body, []*box2d.B2JointInterface)
CreateB2BodiesJoints func
func (Scene) CreateB2Joints ¶
func (s Scene) CreateB2Joints(world *box2d.B2World, bodies []*box2d.B2Body) []*box2d.B2JointInterface
CreateB2Joints func
func (Scene) CreateB2WorldBodiesJoints ¶
func (s Scene) CreateB2WorldBodiesJoints() (*box2d.B2World, []*box2d.B2Body, []*box2d.B2JointInterface)
CreateB2WorldBodiesJoints func
type Shape ¶
type Shape struct { Properties interface{} Type ShapeType }
Shape type
func (Shape) CreateB2Shape ¶
func (s Shape) CreateB2Shape() box2d.B2ShapeInterface
CreateB2Shape func
type WeldJointProperties ¶
WeldJointProperties type