Beispiel #1
0
 public PositionNormalTexturedX2 CreateLong(float xvalue, float yvalue, float zvalue, float nxvalue, float nyvalue, float nzvalue, float u, float v)
 {
     PositionNormalTexturedX2 temp = new PositionNormalTexturedX2();
     temp.X = xvalue;
     temp.Y = yvalue;
     temp.Z = zvalue;
     temp.Nx = nxvalue;
     temp.Ny = nyvalue;
     temp.Nz = nzvalue;
     temp.Tu = u;
     temp.Tv = v;
     Coordinates result = Coordinates.CartesianToSpherical2(Vector3d.Create(Nx, Ny, Nz));
     temp.Tu1 = (float)((result.Lng + 180.0) / 360.0);
     temp.Tv1 = (float)(1 - ((result.Lat + 90.0) / 180.0));
     return temp;
 }
Beispiel #2
0
        public static PositionNormalTexturedX2 Create2UV(Vector3d pos, Vector3d nor, double u, double v, double u1, double v1)
        {
            PositionNormalTexturedX2 temp = new PositionNormalTexturedX2();
            temp.X = pos.X;
            temp.Y = pos.Y;
            temp.Z = pos.Z;
            temp.Nx = nor.X;
            temp.Ny = nor.Y;
            temp.Nz = nor.Z;
            temp.Tu = u;
            temp.Tv = v;
            temp.Tu1 = u1;
            temp.Tv1 = v1;

            return temp;
        }
Beispiel #3
0
 //
 // Summary:
 //     Initializes a new instance of the PositionNormalTexturedX2
 //     class.
 //
 // Parameters:
 //   xvalue:
 //     Floating-point value that represents the x coordinate of the position.
 //
 //   yvalue:
 //     Floating-point value that represents the y coordinate of the position.
 //
 //   zvalue:
 //     Floating-point value that represents the z coordinate of the position.
 //
 //   nxvalue:
 //     Floating-point value that represents the nx coordinate of the vertex normal.
 //
 //   nyvalue:
 //     Floating-point value that represents the ny coordinate of the vertex normal.
 //
 //   nzvalue:
 //     Floating-point value that represents the nz coordinate of the vertex normal.
 //
 //   u:
 //     Floating-point value that represents the PositionNormalTexturedX2.#ctor()
 //     component of the texture coordinate.
 //
 //   v:
 //     Floating-point value that represents the PositionNormalTexturedX2.#ctor()
 //     component of the texture coordinate.
 public static PositionNormalTexturedX2 CreateLong2UV(float xvalue, float yvalue, float zvalue, float nxvalue, float nyvalue, float nzvalue, float u, float v, float u1, float v1)
 {
     PositionNormalTexturedX2 temp = new PositionNormalTexturedX2();
     temp.X = xvalue;
     temp.Y = yvalue;
     temp.Z = zvalue;
     temp.Nx = nxvalue;
     temp.Ny = nyvalue;
     temp.Nz = nzvalue;
     temp.Tu = u;
     temp.Tv = v;
     temp.Tu1 = u1;
     temp.Tv1 = v1;
     return temp;
 }
Beispiel #4
0
        public static PositionNormalTexturedX2 Create(Vector3d pos, Vector3d nor, double u, double v)
        {
            PositionNormalTexturedX2 temp = new PositionNormalTexturedX2();
            temp.X = pos.X;
            temp.Y = pos.Y;
            temp.Z = pos.Z;
            temp.Nx = nor.X;
            temp.Ny = nor.Y;
            temp.Nz = nor.Z;
            temp.Tu = u;
            temp.Tv = v;
            Coordinates result = Coordinates.CartesianToSpherical2(nor);
            temp.Tu1 = (float)((result.Lng + 180.0) / 360.0);
            temp.Tv1 = (float)(1 - ((result.Lat + 90.0) / 180.0));

            return temp;
        }