Skip to content

osg.Box Constructor Parameters Issue #115

Description

@carlsonp

I think perhaps this may be an issue upstream with the osgLua binding but I'm not sure.

osg.Box can have a couple constructors.

box = osg.Box(Vecf(0,0,0), 10, 5, 5)
print(box.HalfLengths)
-- 5 5 5 .... this is wrong...

It looks like if you specify both the center and each of width, height, and depth... it incorrectly is using the constructor for center and width. Running the help() method on the box appears to show that all constructors are bound. I am not sure what order or how luabind evaluates the multiple constructor options that are available.

The workaround right now is manually creating a box using the empty constructor and then manually setting the center and dimensions of the box using the provided methods.

Thanks to @CDiss for finding this one.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions