// constructors
        public Mesh(string fileName)
        {
            var loader = new MeshLoader();

            loader.Load(this, "../../" + fileName);
            color = new Vector3(0, 0, 0);
        }
Example #2
0
 public Mesh(string fileName, Mesh ouder, float transx, float transy, float transz, float rotX, float rotY, float rotZ, Texture texture, float B)
     {
         MeshLoader loader = new MeshLoader();
         loader.Load(this, fileName);
         parent = ouder;
         locatie = Matrix4.CreateTranslation(transx, transy, transz);
         rot = new Vector3(rotX, rotY, rotZ);
         textuur = texture;
         a = B; // de rotatiesnelheid tov de parent
     }
Example #3
0
 // constructor
 public Mesh(Vector3 position, float scale, string fileName) : base(position, scale)
 {
     MeshLoader loader = new MeshLoader();
     loader.Load(this, fileName);
     
     ambientReflect = new Vector3(0f, 0.5f, 1f);
     diffuseReflect = new Vector3(1f, 0.41f, 0.71f);
     specularReflect = new Vector3(1f, 1f, 1f);
     matShiny = 64;
 }
Example #4
0
        // constructor
        public Mesh(string fileName, float diffuse = 1, float specularity = 0, float reflection = 0, float refraction = 0, float eta = 0)
        {
            MeshLoader loader = new MeshLoader();

            loader.Load(this, fileName);

            this.diffuse     = diffuse;
            this.specularity = specularity;
            this.reflection  = reflection;
            this.refraction  = refraction;
            this.eta         = eta;
        }
Example #5
0
        public MeshGroup(string fileName, Vector3 position, Vector3 Rotation, Vector3 scale, Vector3 RotationalVelocity = new Vector3(), Vector3 Velocity = new Vector3())
        {
            offset        = position;     // +parent.mesh.offset;
            this.Rotation = Rotation;
            this.scale    = scale;

            //physics implementation
            rotVelocity = RotationalVelocity;
            posVelocity = Velocity;

            MeshLoader loader = new MeshLoader();

            loader.Load(this, fileName);
            meshes.Capacity = meshes.Count;
        }
Example #6
0
	int quadBufferId;						// quad buffer

	// constructor
	public Mesh( string fileName )
	{
		MeshLoader loader = new MeshLoader();
		loader.Load( this, fileName );
	}
Example #7
0
        public Matrix4 mTransform;              // local transform matrix

        // constructor
        public Mesh(string fileName)
        {
            MeshLoader loader = new MeshLoader();
            loader.Load(this, fileName);
            mTransform = Matrix4.Identity;
        }