func (parent H3DNode) AddMeshNode(name string, materialRes H3DRes, batchStart int, batchCount int, vertRStart int, vertEnd int) H3DNode { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) return H3DNode(C.h3dAddMeshNode(C.H3DNode(parent), cName, C.H3DRes(materialRes), C.int(batchStart), C.int(batchCount), C.int(vertRStart), C.int(vertEnd))) }
func PickRay(cameraNode H3DNode, nwx float32, nwy float32, ox *float32, oy *float32, oz *float32, dx *float32, dy *float32, dz *float32) { C.h3dutPickRay(C.H3DNode(cameraNode), C.float(nwx), C.float(nwy), (*C.float)(unsafe.Pointer(ox)), (*C.float)(unsafe.Pointer(oy)), (*C.float)(unsafe.Pointer(oz)), (*C.float)(unsafe.Pointer(dx)), (*C.float)(unsafe.Pointer(dy)), (*C.float)(unsafe.Pointer(dz))) }
func (node H3DNode) AABB(minX *float32, minY *float32, minZ *float32, maxX *float32, maxY *float32, maxZ *float32) { C.h3dGetNodeAABB(C.H3DNode(node), (*C.float)(unsafe.Pointer(minX)), (*C.float)(unsafe.Pointer(minY)), (*C.float)(unsafe.Pointer(minZ)), (*C.float)(unsafe.Pointer(maxX)), (*C.float)(unsafe.Pointer(maxY)), (*C.float)(unsafe.Pointer(maxZ))) }
func (parent H3DNode) AddEmitterNode(name string, materialRes H3DRes, particleEffectRes H3DRes, maxParticleCount int, respawnCount int) H3DNode { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) return H3DNode(C.h3dAddEmitterNode(C.H3DNode(parent), cName, C.H3DRes(materialRes), C.H3DRes(particleEffectRes), C.int(maxParticleCount), C.int(respawnCount))) }
func (node H3DNode) Transform(tx *float32, ty *float32, tz *float32, rx *float32, ry *float32, rz *float32, sx *float32, sy *float32, sz *float32) { C.h3dGetNodeTransform(C.H3DNode(node), (*C.float)(unsafe.Pointer(tx)), (*C.float)(unsafe.Pointer(ty)), (*C.float)(unsafe.Pointer(tz)), (*C.float)(unsafe.Pointer(rx)), (*C.float)(unsafe.Pointer(ry)), (*C.float)(unsafe.Pointer(rz)), (*C.float)(unsafe.Pointer(sx)), (*C.float)(unsafe.Pointer(sy)), (*C.float)(unsafe.Pointer(sz))) }
func SetupModelAnimStage(modelNode H3DNode, stage int, animationRes H3DRes, layer int, startNode string, additive bool) { cStartNode := C.CString(startNode) defer C.free(unsafe.Pointer(cStartNode)) C.h3dSetupModelAnimStage(C.H3DNode(modelNode), C.int(stage), C.H3DRes(animationRes), C.int(layer), cStartNode, Int[additive]) }
func (parent H3DNode) AddLightNode(name string, materialRes H3DRes, lightingContext string, shadowContext string) H3DNode { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) cLightingContext := C.CString(lightingContext) defer C.free(unsafe.Pointer(cLightingContext)) cShadowContext := C.CString(shadowContext) defer C.free(unsafe.Pointer(cShadowContext)) return H3DNode(C.h3dAddLightNode(C.H3DNode(parent), cName, C.H3DRes(materialRes), cLightingContext, cShadowContext)) }
func (node H3DNode) TransMats(relMat *[16]float32, absMat *[16]float32) { var rel **C.float var abs **C.float if relMat != nil { rel = (**C.float)(unsafe.Pointer(&relMat[0])) } if absMat != nil { abs = (**C.float)(unsafe.Pointer(&absMat[0])) } C.h3dGetNodeTransMats(C.H3DNode(node), rel, abs) if relMat != nil { C.CopyFloatArray(*rel, (*C.float)(&relMat[0]), 16) //prepSlice(unsafe.Pointer(&relMat), unsafe.Pointer(*rel), 16) } if absMat != nil { C.CopyFloatArray(*abs, (*C.float)(&absMat[0]), 16) //prepSlice(unsafe.Pointer(&absMat), unsafe.Pointer(*abs), 16) } }
func FindNodes(node H3DNode, name string, nodeType int) int { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) return int(C.h3dFindNodes(C.H3DNode(node), cName, C.int(nodeType))) }
func (node H3DNode) SetFlags(flags int, recursive bool) { C.h3dSetNodeFlags(C.H3DNode(node), C.int(flags), Int[recursive]) }
func (node H3DNode) Parent() H3DNode { return H3DNode(C.h3dGetNodeParent(C.H3DNode(node))) }
func (node H3DNode) SetNodeParamStr(param int, value string) { cValue := C.CString(value) C.free(unsafe.Pointer(cValue)) C.h3dSetNodeParamStr(C.H3DNode(node), C.int(param), cValue) }
func (node H3DNode) Flags() int { return int(C.h3dGetNodeFlags(C.H3DNode(node))) }
func (node H3DNode) SetNodeParamF(param int, compIdx int, value float32) { C.h3dSetNodeParamF(C.H3DNode(node), C.int(param), C.int(compIdx), C.float(value)) }
func (node H3DNode) NodeParamStr(param int) string { value := C.h3dGetNodeParamStr(C.H3DNode(node), C.int(param)) return C.GoString(value) }
func (node H3DNode) SetParent(parent H3DNode) bool { return Bool[int(C.h3dSetNodeParent(C.H3DNode(node), C.H3DNode(parent)))] }
func (node H3DNode) NodeParamF(param int, compIdx int) float32 { return float32(C.h3dGetNodeParamF(C.H3DNode(node), C.int(param), C.int(compIdx))) }
func (parent H3DNode) AddGroupNode(name string) H3DNode { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) return H3DNode(C.h3dAddGroupNode(C.H3DNode(parent), cName)) }
func (node H3DNode) Child(index int) H3DNode { return H3DNode(C.h3dGetNodeChild(C.H3DNode(node), C.int(index))) }
func (node H3DNode) CastRay(ox float32, oy float32, oz float32, dx float32, dy float32, dz float32, numNearest int) int { return int(C.h3dCastRay(C.H3DNode(node), C.float(ox), C.float(oy), C.float(oz), C.float(dx), C.float(dy), C.float(dz), C.int(numNearest))) }
func (node H3DNode) SetTransform(tx float32, ty float32, tz float32, rx float32, ry float32, rz float32, sx float32, sy float32, sz float32) { C.h3dSetNodeTransform(C.H3DNode(node), C.float(tx), C.float(ty), C.float(tz), C.float(rx), C.float(ry), C.float(rz), C.float(sx), C.float(sy), C.float(sz)) }
func (parent H3DNode) AddNodes(sceneGraphRes H3DRes) H3DNode { return H3DNode(C.h3dAddNodes(C.H3DNode(parent), C.H3DRes(sceneGraphRes))) }
func (node H3DNode) CheckNodeTransFlag(reset bool) bool { return Bool[int(C.h3dCheckNodeTransFlag(C.H3DNode(node), Int[reset]))] }
func (node H3DNode) Remove() { C.h3dRemoveNode(C.H3DNode(node)) }
func (node H3DNode) CheckNodeVisibility(cameraNode H3DNode, checkOcclusion bool, calcLod bool) int { return int(C.h3dCheckNodeVisibility(C.H3DNode(node), C.H3DNode(cameraNode), Int[checkOcclusion], Int[calcLod])) }
func (node H3DNode) SetNodeTransMat(mat4x4 *[16]float32) { C.h3dSetNodeTransMat(C.H3DNode(node), (*C.float)(unsafe.Pointer(&mat4x4[0]))) }
func (parent H3DNode) AddModelNode(name string, geometryRes H3DRes) H3DNode { cName := C.CString(name) defer C.free(unsafe.Pointer(cName)) return H3DNode(C.h3dAddModelNode(C.H3DNode(parent), cName, C.H3DRes(geometryRes))) }
func (node H3DNode) NodeParamI(param int) int { return int(C.h3dGetNodeParamI(C.H3DNode(node), C.int(param))) }
func PickNode(cameraNode H3DNode, nwx float32, nwy float32) H3DNode { return H3DNode(C.h3dutPickNode(C.H3DNode(cameraNode), C.float(nwx), C.float(nwy))) }
func (node H3DNode) SetNodeParamI(param int, value int) { C.h3dSetNodeParamI(C.H3DNode(node), C.int(param), C.int(value)) }