Jump to content

[SOLVED] I'm trying to rewrite the "app_vive_00" in C#


photo

Recommended Posts

Hi,

I find that there are "Mat4" and "mat4" in the "app_vive_00.cpp", what is the difference between them and what equals to them in C#?

thanks!
 

Link to comment

Hi Cheng,

mat4 represents a matrix of sixteen (4x4) float components. In C#  => Unigine.mat4

dmat4 represents a matrix of twelve (3x4) double components. In C#  => Unigine.dmat4

Mat4 represents:

  • mat4 - if your project uses single precision
  • dmat4 - if your project uses double precision

For more information see the article about single and double precision coordinates.

So, You can use the following code in C#:

#if UNIGINE_DOUBLE
	using Mat4 = Unigine.dmat4;
#else
    using Mat4 = Unigine.mat4;
#endif

Thanks!

Link to comment
  • silent changed the title to [SOLVED] I'm trying to rewrite the "app_vive_00" in C#
×
×
  • Create New...