Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagecpp
themeMidnightFadeToGrey
nsi.Create( "translation", "transform" );
nsi.Connect( "translation", NSI_SCENE_ROOT );
nsi.Connect( "simple polygon", "", "translation", "objects" );

double trs[16] =
{
	1., 0., 0., 0.,
	0., 1., 0., 0.,
	0., 0., 1., 0.,
	0., 1., 0., 1. /* transalte 1 unit in Y */
};

nsi.SetAttribute( "translation",
	NSI::DoubleMatrixArg("transformationmatrix", trs) );

...