0
votes
1answer
68 views

Relative Position/Rotation calculation

I have 2 objects each with a 3x3 Matrix (Orientation) and a Vector3 (Translation). Both are relative to world coordinates. How do I calculate the position and orientation of object B in relation to ...
2
votes
2answers
25 views

Derive direction in which a spot light emites its light from a projection matrix

First of all, sorry if my question sounds too basic or even makes no sense. I'm new with game development I'm working with HPL1Engine, specifically, the lights parts. I need to know the direction in ...
0
votes
1answer
51 views

How to modify normal vectors with a tranformation matrix

Transformation is quite simple when it comes to Position or Color of the vertex, for Position just multiply matrix * vector and for color just don't do anything, but my question now is: How to handle ...
3
votes
4answers
231 views

Why not use vectors to represent orientation?

From what I've read, people mostly use either quaternions or 3x3 matrices to represent 3D orientations, while plain vectors are used for angular velocity/momentum. Since we can use vectors to ...
1
vote
1answer
87 views

Does a 2D Vector or 2x2 Matrix play any role in 2D Transformations?

I'm having trouble trying to figure out if a vec2 or mat2 class are used at all in transformations for 2D rendering. Vec2, apart from representing UVs, AFAIK, is relatively pointless in regards to ...
1
vote
1answer
155 views

Converting 3 axis vectors to a rotation matrix [closed]

I am trying to get a rotation matrix (in 3dsmax) from 3 vectors that form an axis (all 3 vectors are aligned by 90 degrees each other) Somewhere I read that I could build a rotation matrix just by ...
0
votes
1answer
192 views

Sharp DX Identity Matrix, Matrix.Forward vector pointing at negative Z

I'm trying to take a steady grip on Sharp DX. Already done some work like translating, scaling and rotating objects. Now i have to calculate the rotation matrix using only direction vector and ...
3
votes
2answers
161 views

What kind of projection is ScreenX=X/Z, ScreenY=Y/Z?

I have an existing class which transforms 3D vectors and projects them on a 2D plane (Camera). The code is all written in C without help from an external library. To project a single vector (X,Y,Z) ...
3
votes
3answers
782 views

Tetris - Rotations using Linear Algebra (Rotation Matrices)

I'm making Tetris in Java and am at the point of rotations... Originally I was hardcoding each rotation: if (direction.equals("right")) { if (shape.equals("Bar")) { if ...
1
vote
0answers
93 views

Rotate Points with Object in world space

I posted this in the original stack overflow then realized that a game-dev specific one exists. I am working on personal project that requires me to have 4 points surrounding an object (1 at each of ...
5
votes
1answer
248 views

Rotating plane to be parallel to given normal via change of basis

I have two planes and their respective normals. I would like to rotate the second plane, planeB, so that it is parallel to the first, planeA. To do this, I am using a change of basis to rotate each ...
0
votes
0answers
58 views

Transform a Screen Delta

I have a delta in screen coordinates that I want to transform to a 3d delta in world space. The delta is in this case a movement across the (x,y) coordinates in screen space on the near projection ...
1
vote
2answers
513 views

convert orientation vec3 to a rotation matrix

I've got a normalized vec3 that represents an orientation. Each frame of animation, an object's orientation changes slightly, so I add a delta vector to the orientation vector and then normalize to ...
0
votes
1answer
99 views

How to Draw texture between 2 Vector3

My scenario: RTS combat style, 1 unit fires beam on another unit My problem is i want to draw a flat texture between 2 Vector3 points. I have looked at various Billboarding styles but that doesn't ...
3
votes
2answers
422 views

3D rotation matrices deform object while rotating

I'm writing a small 3D renderer (using an orthographic projection right now). I've run into some trouble with my 3D rotation matrices. They seem to squeeze my 3D object (a box primitive) at certain ...
1
vote
1answer
530 views

how can i get rotation vector from matrix4x4 in xna?

i want to get rotation vector from matrix to realize some parent-children system for models. Matrix bonePos = link.Bone.Transform * World; Matrix m = Matrix.CreateTranslation(link.Offset) * ...
3
votes
1answer
132 views

How to make an object stay relative to another object

In the following example there is a guy and a boat. They have both a position, orientation and velocity. The guy is standing on the shore and would like to board. He changes his position so he is ...
2
votes
1answer
293 views

Transform 3D vectors between coordinate systems

I've got 6 points in 3D space: A,B,C,D,E,F, that represent 4 vectors. AB is perpendicular to AC and DE is perpendicular to DF. I need to find a transformation matrix M, that transforms AB to DE and ...
2
votes
1answer
336 views

multiply matrix by vector: what to do if need to change y-up to z-up?

I multiply a matrix with a position vector to get a new position, however, now I need to change my matrix from y-up coordinate space to z-up. Changing only the matrix won't work: how to apply the ...
1
vote
1answer
326 views

How to prevent 2D camera rotation if it would violate the bounds of the camera?

I'm working on a Camera class and I have a rectangle field named Bounds that determines the bounds of the camera. I have it working for zooming and moving the camera so that the camera cannot exit its ...
2
votes
1answer
340 views

How do you extract a Vector3 positions only from a world matrix in an array of positions (from Kinect)

've just started building a physical camera class for the depth data you get from a Kinect. I have a Vector3 array of [imageWidth, imageHeight] describing the LOCAL positions I get in from the kinect ...
3
votes
1answer
374 views

Confused about order of operation when using a Matrix in XNA, C#

Here are two different pieces of code This is what I started with Vector2 hold = Vector2.Transform(pos1, mat1); Matrix inv = Matrix.Invert(mat2); Vector2 pos2 = Vector2.Transform(hold, inv); And ...
6
votes
2answers
1k views

Vector games (Wireframe, Elite-like) theory and implementations?

I'm interesting in knowing more about how vector games like Elite and Star Wars Atari were built from grounds up. The question is not how to implement vector graphics with modern 3D APIs like OpenGL ...
8
votes
1answer
469 views

Downprojecting an imaginary 4D mesh to the screen

As a mental exercise, I'm trying to imagine projecting an arbitrary 4D mesh onto the screen (2D). I'm guessing a single 4D triangle would still consist of only 3 points, however each of those 3 ...
1
vote
1answer
195 views

Mesh to world vector translation

Suppose I have a world defined in typical OpenGL coords.. then the up vector defined for this space is (0,1,0). Now, if I load a model that is defined with (0,0,1) as its up vector, what are the ...