> For the complete documentation index, see [llms.txt](https://www.xrdev.app/mixed-reality-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.xrdev.app/mixed-reality-docs/glossary/mixed-reality/3d-concepts.md).

# 3D Concepts

### Transformation Matrix

When we talk about transformations in 3D space, we mean altering the position, orientation, or scale of an object. These transformations can include various operations such as translation (shifting the position), rotation (changing the orientation), shear (distorting the shape), scale (changing the size), reflection (flipping the object), and projection (mapping the 3D point onto a 2D plane).

To perform these transformations, a common technique is to use a **transformation matrix**. A transformation matrix is a mathematical matrix that stores the information about the desired transformation. By multiplying a Vector3 representing a point(x,y,z position) with the transformation matrix, we can apply the transformation to that point.

```typescript
//Three.js
const transformationMatrix = new THREE.Matrix4(); 
transformationMatrix.set( 11, 12, 13, 14, 
	   21, 22, 23, 24,
	   31, 32, 33, 34, 
	   41, 42, 43, 44 );
	
```

When we talk about "applying the matrix to the vector," it means that the t**ransformation matrix is multiplied with the Vector3 point to achieve the desired transformation**. The resulting Vector3 will reflect the transformed position, orientation, or scale of the original point in 3D space.

#### Read more

* [Matrix4](https://threejs.org/docs/#api/en/math/Matrix4) in Three.js docs
* OpenGL [matrices tutorial](http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://www.xrdev.app/mixed-reality-docs/glossary/mixed-reality/3d-concepts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
