Hydrax wave settings
please some one can help me with changing wave strength through the command line input
is there a place to download Hydrax editor source code
Afaik this works over Hydrax::Module::setOptions(), just make a options struct for your Module via the default constructor and set the strength to the value you got from the command line, then initialise your Module with these options.
If you want to do it while hydrax is running, like in the editor, maybe you can save the options with Module::getOptions(), then change the strength and set them back. Haven't tried it though.
but i couldn't make it if you can please provide me with a code example
that would be a big help
Which part bothers you? The setting of the options or the passing of an argument via command line?
problem is setting the options
visual c++ tells "setOptions' : is not a member of 'Hydrax::Module::Module"
please help me
ah yes sorry, it is part of either ProjectedGrid or SimpleGrid, depends on which module you use. This is taken and adapted from my Hydrax initialisation code. Hope it helps.
Hydrax::Module::ProjectedGrid::Options options = Hydrax::Module::ProjectedGrid::Options();
options.Strength = yourStrength;
Hydrax::Module::ProjectedGrid *mModule = new Hydrax::Module::ProjectedGrid(mHydrax,
it works perfectly
i'll try to get the command line input
i want to change it like hydrax editor
while hydrax is running is there a way to do that?
Yes, I just tried it. This is the setStrength function I used for my ProjectedGrid. SimpleGrid should work just like that.
void setStrength(float strength)
// mHydrax is of course your Hydrax pointer
Hydrax::Module::ProjectedGrid* module = static_cast<Hydrax::Module::ProjectedGrid*>(mHydrax->getModule());
Hydrax::Module::ProjectedGrid::Options options = module->getOptions();
options.Strength = strength;
ill try it out. sorry for the lateness to reply.
ill try to integrate it to
there is a problem on recursive calling to method any way thanks!!!!!!!!!!!!!!!!!!
please if you can send me the complete code you have written
This post was really helpful for me and can you please tell where should be the 'setStrength(value);' method called.
@chethaka Umm, I don't exactly understand the question. In my test I called it in a frame listener in frameStarted. But I'm pretty sure you can call it everywhere in your code and it will work just fine, as long as Hydrax is initialized.
@hvalola this is the complete code I wrote to change the strength. It should pretty much work on its own, except for the Hydrax pointer you have to provide.
we cannot continually update the scene through the command line only once how to resolve it