1. Marc Lepage
  2. love

Commits

Marc Lepage  committed ab2406b Draft

Add Matrix::setElements function.

  • Participants
  • Parent commits 78954f9
  • Branches gles

Comments (0)

Files changed (2)

File src/common/Matrix.cpp

View file
  • Ignore whitespace
 	return e;
 }
 
+void Matrix::setElements(const float* elements)
+{
+	memcpy(e, elements, sizeof(float)*16);
+}
+
 void Matrix::setIdentity()
 {
 	memset(e, 0, sizeof(float)*16);

File src/common/Matrix.h

View file
  • Ignore whitespace
 	const float *getElements() const;
 
 	/**
+	 * Sets this matrix to the 16 array elements.
+	 * @param elements The array elements.
+	 **/
+	void setElements(const float* elements);
+
+	/**
 	 * Resets this Matrix to the identity matrix.
 	 **/
 	void setIdentity();