A 2D array of numbers, symbols or expressions, arranged in rows and columns. Each row must have the same number of columns. The numbers, symbols or expressions themselves are called elements or entries.

learn more… | top users | synonyms (1)

0
votes
0answers
21 views

OpenGL Arc-Ball Camera Yaw Pitch GLM::Rotate

I'm currently working on a small Voxel-Editor Project. In the editor, I plan on using an Arc-Ball camera which rotate around the model. My camera is currently working but in an odd way. I can't seem ...
0
votes
1answer
54 views

Convert transform from world to local space

I have a hierarchical node system. Given a world space transform, I need to obtain the transform for a specific node in local space. My Node class has the following method. public void ...
0
votes
1answer
40 views

Mode 7 in xna/monogame

I want achieve a view like Mode 7 from snes games where the closer textures get stretched out more and more far away textures look smaller. Something like this: What I have in my project at the ...
1
vote
2answers
89 views

How to rotate camera using mouse?

I'm looking for a basic example of rotating camera using the mouse. the only problem is I'm not sure of how to rotating the camera around it target. should i do this by an algorithm or is there a ...
-1
votes
2answers
73 views

Rotation, what is the Matrix?

From a previous question, thank you very much by the way, but what on earth is the Matrix of? I'm very new to Mono/XNA and finding any meaningful documentation is practically impossible. point = ...
1
vote
1answer
38 views

Recap on how a camera works in 3d Space?

This may be marked as a duplicate, but I have been trouble thinking about a camera. I understand that there is a "camera transform," or view matrix. However, this is multiplied with every vertex in ...
0
votes
0answers
17 views

Rotate object from an origin using a transformation matrix

I'm making a project in lib GDX and I want to rotate an object by changing the transform matrix of the sprite batch to one that rotates an object rendered on screen a given number of degrees from a ...
4
votes
1answer
84 views

Do matrix manipulations for 3D graphics ever produce singular matrices?

A singular matrix is a matrix that cannot be inverted. The vecmath library, for example, throws a SingularMatrixException if you try to invert a singular matrix. I think I understand what singular ...
0
votes
0answers
10 views

Collision Hull not Transformed Correctly

My collision hulls aren't aligned after my "engine" digests them. I used Spine to create my content. So here is the hierarchical model of my bones. Where Root, LoadGame, NewGame, QuitGame, and ...
1
vote
1answer
44 views

What is more efficient: Using matrix translation to move a character, or using a vector/scalar?

In 2D or 3D, matrix transformations are used for rotation, scaling, and sheering. However, when it comes to movement, should I go out of my way to use and implement scalar/vector movement, or just ...
1
vote
1answer
44 views

Terminology for the way Transformation Matrix Data is treated

I recently asked a question at math stack exchange and realize a similar questions is more suited for this forum, but the original is here: ...
1
vote
1answer
30 views

Last Row of the perspective projection matrix

Could you explain to me what is the purpose of -1 in the last row of the gl_projection matrix? And how it affects the perspective division step ?
3
votes
1answer
45 views

How can I get projected coordinates of vertex on screen

I want to check picking for faces and for that I need projected X Y coordinates of my vertexes in -1 to 1 range: For that I multiply my vertex array with matrices and then get projected triangle ...
1
vote
1answer
54 views

Cumulative transformation matrices for hierarchical object transformations

I'm having a small issue with my design for hierarchical 3D objects. I'll try to sum things up concisely. Every object has a vector3 for its position, scale, and rotation, as well as a std::vector of ...
0
votes
0answers
27 views

Tweening back from arbitrary 3D rotation in javascript

I'm using a 3D javascript library to rotate the vertex of a 3D object with a classic 3x3 matrix, to an arbitrary angle in the 3D space, as depicted in the image below. For example, a first ...
2
votes
1answer
36 views

Change value of uniform for each VAO

I've heard from several sources that it's a better approach to pass the model matrix to a shader via a uniform rather than an attribute. I also know that the idea of a uniform is, that it has the ...
1
vote
1answer
59 views

Applying Transformation Matrices to VBOs in OpenGL

So I've recently tried to add Vertex Buffer Object Matrix transformation to an OpenGL engine I'm working on. I could go about this by applying the matrix to a copy of each vertex individually, but ...
2
votes
2answers
51 views

Strange behavior with transformation matrix

I'm fairly new to transformation matrices. I'm using them to translate and rotate nodes and their child nodes. The following code works when applied once, but shows strange behavior when applied many ...
4
votes
1answer
512 views

Tetris: 2D Rotation Matrix?

I'm creating a Tetris clone right now. I've got the tiles of tetromino stored as an std::array<tile, 4>. Each tile holds its (x,y) coordinates relative to the piece. For example, the t-block ...
1
vote
0answers
69 views

Matrix transform from one coordinate system to another

I have been beating my head against the wall for weeks on this and it is time I just break down and ask for help. I need to move a 3D camera from an in house system into Unreal 4. The two use ...
1
vote
0answers
31 views

Is it normal in skeletal animation to NOT consider the translation component in bone transform matrices?

I'm using assimp to load a model, and DirectX11 and DirectX ToolKit to render it. In the document of DirectXTK's IEffectSkinning, it says: As an optimization, SkinnedEffect and DGSLEffect assume ...
1
vote
1answer
51 views

Rotating a 4D matrix about the Y axis with an X-Z vector

I should mention that I'm pretty new to Matrices and will probably need a layman's answer to my question. I have a 4D matrix which represents the rotation of an object in 3D space. I have a ...
0
votes
0answers
57 views

Scaling geometry in an orthographic view

I'm having trouble understanding the results I'm getting from some of my matrix transformations. I've got an orthographic projection, and am drawing 2D circles on the screen. There is a camera matrix, ...
1
vote
3answers
68 views

How much to roll Z to make horizon level

I've got a flying camera with some arbitrary rotation. (It also has a translation, but that's not important.) It's flying along its local Z axis, traveling in some direction over the ground with ...
0
votes
1answer
53 views

How to transform a matrix's local space position into another's local space

When looking at an example to learn how to do per pixel collision, I came across this: // Calculate a matrix which transforms from A's local space into // world space and then into B's local space ...
1
vote
1answer
92 views

Why would this scaling matrix have no effect?

To draw a simple model using the DirectXTk, I'm doing the following. It all works perfectly, draws correct, and so on. Except changing the scaling factor makes NO difference, and I can't figure out ...
1
vote
1answer
93 views

Using glm to rotate the modelview matrix based on the cursor position

I am rendering a 3D model of an object, and I want the user to be able to rotate around that object by dragging the mouse. To do this, I want to use the cursor position to continually update the ...
-1
votes
1answer
212 views

THREE.JS: why is the rotation only applied on the last axis used?

my function: function rotateAroundWorldAxis2(object, radians1, radians2) { object.rotWorldMatrix.makeRotationX(radians1).makeRotationZ(radians2); // object.rotWorldMatrix; ...
0
votes
1answer
128 views

XNA 2D rotation Matrix offset/origin

I'm currently struggling with finding the offset for my original camera translation after I have applied a rotation for it. transform = Matrix.CreateScale(new Vector3(1, 0.75f, 1)) ...
0
votes
0answers
44 views

Rotation matrix is being inconsistent with pitch and roll

I'm calculating the rotation matrix for a turret when it's at an angle in Javascript. I have XYZ co-ords for the turret and target with X being 90 degrees right, Y being straight ahead and Z being ...
0
votes
1answer
54 views

opengl matrix multiplication

Can someone provide some type of example of multiplying a 4x4 matrix without using loops? typedef struct matrix4 { data[16]; } m4; can someone provide a sample of how you you'd multiply two of ...
0
votes
1answer
54 views

Camera (pole cam) implementation problem

In my project I have simple scene graph to render whole scene and Bullet physics SDK to provide physics simulation. Each rendered object is represented as scene node. Camera always has target and ...
4
votes
1answer
141 views

Does converting quaternion to matrix cause a lot of overhead?

This is related to rendering creating a model, view, projection matrix for opengl. While matrix are fairly standard there's a lot of talk about using quaternions for rotations but why would u go from ...
2
votes
1answer
83 views

How to calculate if a point is contained in rectangular camera viewport with rotation?

I am working with my camera, and am trying to improve it so that I can calculate if a world point is on screen, taking rotation into account. Currently, my camera rectangle is calculated as so: ...
0
votes
0answers
35 views

When use LookAt or Inverted world matrix to compute View Matrix?

I am reading this article http://www.3dgep.com/understanding-the-view-matrix/ and it says that View Matrix is the inverted matrix of World (or Model) Matrix but in the first approach the article ...
9
votes
2answers
907 views

Why do we need a fourth coordinate to divide by z?

I read the response here: What does the graphics card do with the fourth element of a vector as the final position? "The fourth component is a trick to keep track of perspective projection. ...
0
votes
1answer
65 views

How to understand kind of matrix/world from implemented math operations?

i'm a newbie in 3d programming, and i approach for the first time this argument. I try to make some changes to an existing 3d object viewer, to better suite my needs. This object viewer is jsc3d. I ...
1
vote
1answer
51 views

16-byte aligned matrix in DirectX9 and D3DX with Havok Physics 2012

I want to ask a question about D3DXMATRIX and D3DXMATRIXA16, and how to use them with Havok Physics. I'm using Visual Studio 2012 on Windows 8. I successfully created an instance of hkpWorld, added ...
7
votes
1answer
106 views

How can I keep the clicked point under the mouse when rotating? (GLM)

I have a spherical mesh of radius 1, centered at (0,0,0) in world coordinates. I want to rotate the sphere so that the clicked point remains under the mouse at all times. However, I cannot find an ...
1
vote
1answer
44 views

Rotate an objects velocity

I have a collision system (in 3D but for the purpose of the question assume 2D) where I want to calculate the new velocity (stored as a vector) after a collision. What I have is the velocity of the ...
0
votes
0answers
110 views

Adding a 2D transformation matrix to GLSL

I'm having trouble understanding the matrices I need to render an object in OpenGL. I've been using a matrix to make up for the translation and scaling from the camera in my game but I didn't have a ...
0
votes
0answers
36 views

Coordinates estimation

Hi im using artoolkit to extract the coordinates of the marker im detecting with the camera. I need to know the values returned when arGetTransMat is the coordinates (x,y,z) which is returned ...
0
votes
0answers
67 views

OpenGL - Cubemap “Rotating” Proportional To Camera Movement

I'm doing a simple planet rendering project and am running into an issue with accessing cubemap textures correctly. The planet terrain is generated using the diamond square algorithm done 6 times and ...
0
votes
3answers
62 views

Problems Animating Texture in OpenGL

I'm trying to animate a texture to scroll a static screen for a television, however I'm having some issues. Just translating within the texture matrix animates all textures in the scene which is ...
0
votes
0answers
87 views

OpenGL model transforms wrong on AMD GPU

I've been writing a program that uses OpenGL to display some simple 3D models (rays, cuboids, spheres and simple meshes). I am targeting the programmable pipeline in OpenGL 3.2. So far I have been ...
1
vote
2answers
155 views

How can I calculate the orthographic projection needed to encompass an object with arbitrary rotation?

So I need to set up the dimensions of a orthographic projection that will encompass the entirety of a bounding box when viewed from any arbitrary position. That's an eye (programmer art); and the ...
0
votes
1answer
114 views

how to stop camera at the end of world map when zoomed in

Im building a tile-based game, and Im trying to implement zooming in on the center of the screen. My problem is, when I get to the edge of the map and im zoomed in, Im noticing that my camera doesn't ...
1
vote
2answers
122 views

OpenGL: Is it efficient ok to glPushMatrix, plMultMatrix, plPopMatrix for every object in my scene?

I'm very new to opengl, and I might not fully understand the openGL matrix projection stack thing. So, I have about 300 'objects' in my scene, each with their own position/rotation, and I want to ...
0
votes
2answers
99 views

Problems with Rotation Matrices on Certain Axes

Here is what my rotation matrix looks like: public Matrix4f initRotation(float x, float y, float z) { Matrix4f rx = new Matrix4f(); Matrix4f ry = new Matrix4f(); Matrix4f rz = new ...
1
vote
0answers
154 views

Confused About My Code Suggesting The Normal Matrix Is Equivalent To The ModelView Matrix

I'm learning environment mapping in OpenGL by following this page. In his vertex shader, the author calculates the vertex normal in eye space with the following code: nEye = vec3(viewMatrix * ...