commands

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BboxCommand = &cli.Command{
	Name:   "bbox",
	Usage:  "Calculate the bounding box",
	Action: BboxAction,
}

BboxCommand displays bounding box of the given REXfile

View Source
var ExportCommand = &cli.Command{
	Name:   "export",
	Usage:  "Exports the REX mesh geometry into an OBJ file (no material!)",
	Action: ExportAction,
}

ExportCommand moves the geometry according to the given parameters

View Source
var ImageCommand = &cli.Command{
	Name:   "image",
	Usage:  "Extracts an image, if no output file given, content will be dumped to stdout",
	Action: ImageAction,
	Flags: []cli.Flag{
		&cli.IntFlag{
			Name:  "id",
			Usage: "Image block ID",
		},
		&cli.StringFlag{
			Name:    "out",
			Aliases: []string{"o"},
			Usage:   "output file",
		},
	},
}

ImageCommand extract an image from the image block

View Source
var InfoCommand = &cli.Command{
	Name:   "info",
	Usage:  "Show file information",
	Action: InfoAction,
}

InfoCommand displays file information

View Source
var LineSetCommand = &cli.Command{
	Name:   "lines",
	Usage:  "Display a lineset data block",
	Action: LineSetAction,
	Flags: []cli.Flag{
		&cli.IntFlag{
			Name:  "id",
			Usage: "LineSet block ID",
		},
	},
}

LineSetCommand displays a lineset block

View Source
var MeshCommand = &cli.Command{
	Name:   "mesh",
	Usage:  "Display a mesh data block",
	Action: MeshAction,
	Flags: []cli.Flag{
		&cli.IntFlag{
			Name:  "id",
			Usage: "Mesh block ID",
		},
	},
}

MeshCommand displays a mesh block

View Source
var PointsCommand = &cli.Command{
	Name:   "points",
	Usage:  "Display a points data block",
	Action: PointsAction,
	Flags: []cli.Flag{
		&cli.IntFlag{
			Name:  "id",
			Usage: "Points block ID",
		},
	},
}

PointsCommand displays a points block

View Source
var ScaleCommand = &cli.Command{
	Name:   "scale",
	Usage:  "Scales all mesh blocks with the given factor",
	Action: ScaleAction,
	Flags: []cli.Flag{
		&cli.Float64Flag{
			Name:  "factor",
			Value: 1.0,
			Usage: "Scaling factor (1.0 means no scaling)",
		},
	},
}

ScaleCommand scales all meshes in the given file

View Source
var TextCommand = &cli.Command{
	Name:   "text",
	Usage:  "Display a text data block",
	Action: TextAction,
	Flags: []cli.Flag{
		&cli.IntFlag{
			Name:  "id",
			Usage: "Text block ID",
		},
	},
}

TextCommand displays a text block

View Source
var TrackCommand = &cli.Command{
	Name:   "track",
	Usage:  "Display a track data block",
	Action: TrackAction,
	Flags: []cli.Flag{
		&cli.IntFlag{
			Name:  "id",
			Usage: "Track block ID",
		},
	},
}

TrackCommand displays a track block

View Source
var TranslateCommand = &cli.Command{
	Name:   "translate",
	Usage:  "Translates the whole REXfile",
	Action: TranslateAction,
	Flags: []cli.Flag{
		&cli.Float64Flag{
			Name:  "x",
			Usage: "x translation in world space [m]",
		},
		&cli.Float64Flag{
			Name:  "y",
			Usage: "y translation in world space [m]",
		},
		&cli.Float64Flag{
			Name:  "z",
			Usage: "z translation in world space (up) [m]",
		},
	},
}

TranslateCommand moves the geometry according to the given parameters

Functions

func BboxAction

func BboxAction(ctx *cli.Context) error

BboxAction calculates the bounding box

func ExportAction added in v0.4.0

func ExportAction(ctx *cli.Context) error

ExportAction exports REXmesh geometries into an OBJ file

func ImageAction

func ImageAction(ctx *cli.Context) error

ImageAction calculates the bounding box

func InfoAction

func InfoAction(ctx *cli.Context) error

InfoAction is the default action, therefore it is set to public

func LineSetAction added in v0.3.0

func LineSetAction(ctx *cli.Context) error

LineSetAction calculates the bounding box

func MeshAction

func MeshAction(ctx *cli.Context) error

MeshAction calculates the bounding box

func OpenRexFileFromContext

func OpenRexFileFromContext(ctx *cli.Context) (*rexfile.Header, *rexfile.File, error)

OpenRexFileFromContext tries to open up a REX file and performs all the error handling

func PointsAction added in v0.4.0

func PointsAction(ctx *cli.Context) error

PointsAction calculates the bounding box

func ScaleAction

func ScaleAction(ctx *cli.Context) error

ScaleAction calculates the bounding box

func TextAction added in v0.3.0

func TextAction(ctx *cli.Context) error

TextAction calculates the bounding box

func TrackAction added in v0.3.0

func TrackAction(ctx *cli.Context) error

TrackAction calculates the bounding box

func TranslateAction

func TranslateAction(ctx *cli.Context) error

TranslateAction calculates the bounding box

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL