Add PostProcess enum

This commit is contained in:
bloeys
2021-11-19 09:03:35 +04:00
parent 8bf9dc9121
commit fb9d44beca
3 changed files with 39 additions and 2 deletions

View File

@ -52,7 +52,7 @@ type Scene struct {
Cameras []*Camera Cameras []*Camera
} }
func ImportFile(file string, postProcessFlags uint) (*Scene, error) { func ImportFile(file string, postProcessFlags PostProcess) (*Scene, error) {
cstr := C.CString(file) cstr := C.CString(file)
defer C.free(unsafe.Pointer(cstr)) defer C.free(unsafe.Pointer(cstr))

View File

@ -21,3 +21,40 @@ const (
//Relative morphing between morph targets //Relative morphing between morph targets
MorphMethodMorphRelative = 0x3 MorphMethodMorphRelative = 0x3
) )
//PostProcess defines the flags for all possible post processing steps.
type PostProcess int64
const (
PostProcessCalcTangentSpace PostProcess = 0x1
PostProcessJoinIdenticalVertices PostProcess = 0x2
PostProcessMakeLeftHanded PostProcess = 0x4
PostProcessTriangulate PostProcess = 0x8
PostProcessRemoveComponent PostProcess = 0x10
PostProcessGenNormals PostProcess = 0x20
PostProcessGenSmoothNormals PostProcess = 0x40
PostProcessSplitLargeMeshes PostProcess = 0x80
PostProcessPreTransformVertices PostProcess = 0x100
PostProcessLimitBoneWeights PostProcess = 0x200
PostProcessValidateDataStructure PostProcess = 0x400
PostProcessImproveCacheLocality PostProcess = 0x800
PostProcessRemoveRedundantMaterials PostProcess = 0x1000
PostProcessFixInfacingNormals PostProcess = 0x2000
PostProcessSortByPType PostProcess = 0x8000
PostProcessFindDegenerates PostProcess = 0x10000
PostProcessFindInvalidData PostProcess = 0x20000
PostProcessGenUVCoords PostProcess = 0x40000
PostProcessTransformUVCoords PostProcess = 0x80000
PostProcessFindInstances PostProcess = 0x100000
PostProcessOptimizeMeshes PostProcess = 0x200000
PostProcessOptimizeGraph PostProcess = 0x400000
PostProcessFlipUVs PostProcess = 0x800000
PostProcessFlipWindingOrder PostProcess = 0x1000000
PostProcessSplitByBoneCount PostProcess = 0x2000000
PostProcessDebone PostProcess = 0x4000000
PostProcessGlobalScale PostProcess = 0x8000000
PostProcessEmbedTextures PostProcess = 0x10000000
PostProcessForceGenNormals PostProcess = 0x20000000
PostProcessDropNormals PostProcess = 0x40000000
PostProcessGenBoundingBoxes PostProcess = 0x80000000
)

View File

@ -8,7 +8,7 @@ import (
func main() { func main() {
scene, err := asig.ImportFile("objz.obj", 0) scene, err := asig.ImportFile("obj.obj", asig.PostProcessTriangulate)
if err != nil { if err != nil {
panic(err) panic(err)
} }