Hello,
I have another question/request. Can somebody help me build a small example on how to use the AxisTranslationTool? I have looked inside the ContentTool class to see how to use it, but until now, I can not say that I was succesful. I need to be able to move objects only on integer 3d coordinates. Your help would be greatly appreciated.
snap to grid, AxisTranslationTool
Re: snap to grid, AxisTranslationTool
Do you want to translate to your own grid or to jReality default?
If you want to translate to jReality-default-axis (x/y/z direction) simply apply this Translation
dx, dy, dz is the change in each direction you want do. You can simply attach this to your tool.
If you want to translate to jReality-default-axis (x/y/z direction) simply apply this Translation
Code: Select all
MatrixBuilder.euclidean().translate(dx, dy, dz).assignTo(YOUR_SCENEGRAPHCOMPONENT);