Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program BASSERT on add cubes #10

Open
geotyper opened this issue Jan 30, 2020 · 1 comment
Open

Program BASSERT on add cubes #10

geotyper opened this issue Jan 30, 2020 · 1 comment

Comments

@geotyper
Copy link

geotyper commented Jan 30, 2020

Screenshot at 2020-01-30 12-31-25
Screenshot at 2020-01-30 12-30-32
Screenshot at 2020-01-30 12-30-20

When add to t_voxelContainer some cubes(Edit::box) program stop on assert
voxelsPerTile = 24
This is situation when cube past in the border between tiles?

if create Cubes by press mouse button all is Ok

 quaternion rotation;
             rotation = rotation * quaternion(Ogre::Degree((float)handler.RandomInt(45,15)).valueDegrees(), Ogre::Degree((float)handler.RandomInt(45,15)).valueDegrees(), Ogre::Degree((float)handler.RandomInt(45,15)).valueDegrees(),
                                              Ogre::Degree((float)handler.RandomInt(45,15)).valueDegrees());
             //auto bb=t_editBox::create(handler.RandomInt(7,35), rotation);
             t_editBox::pointer boxEdit(t_editBox::create(handler.RandomInt(7,35), rotation));

             //bb.data()->diffuseToSet=colour(handler.RandomInt(50,190)/255.0f,handler.RandomInt(50,190)/255.0f,handler.RandomInt(50,190)/255.0f, 1.0);
             voxelContainer->editVoxel(boxEdit,transform(Ogre::Vector3(handler.targetPos.x, handler.RandomInt(7,25), handler.targetPos.z)));

where handler.targetPos.x and y mouse position on plane from picture

But if change last line to
voxelContainer->editVoxel(boxEdit,transform(Ogre::Vector3(handler.RandomInt(-250,250) , handler.RandomInt(7,25), handler.RandomInt(-250,250))));
error appears

@geotyper
Copy link
Author

and think the same problem
Screenshot at 2020-01-30 13-09-23

if create Cubes in loop, from number cubes more than 9 they lose there orientation


for(int i=0; i<19; i++)
        {
            rotation = rotation * quaternion(Ogre::Degree((float)handler.RandomInt(45,15)).valueDegrees(), Ogre::Degree((float)handler.RandomInt(45,15)).valueDegrees(), Ogre::Degree((float)handler.RandomInt(45,15)).valueDegrees(),
                                             Ogre::Degree((float)handler.RandomInt(45,15)).valueDegrees());
            t_editBox::pointer boxEdit(t_editBox::create(handler.RandomInt(7,35), rotation));
            voxelContainer->editVoxel(boxEdit,transform(Ogre::Vector3(handler.RandomInt(-250,250) , handler.RandomInt(7,25), handler.RandomInt(-250,250))));
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant