Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8447607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:13:15+00:00 2026-06-10T10:13:15+00:00

I have a matrix type that is defined as: struct __transform_t { float m11,

  • 0

I have a matrix type that is defined as:

struct __transform_t
{
    float m11, m12, m13, m14;
    float m21, m22, m23, m24;
    float m31, m32, m33, m34;
    float m41, m42, m43, m44;
};

How would I concat one matrix to another? I want to “merge” the matrices to get a result that is a combination of both transformations. Basically, I’m trying to make a simple layering system, so if a parent layer is transformed, the child layer (that is visually inside the parent) should also inherit those transformations as well as have its own.

I’m trying to do it like in the example below, but I don’t think that is the right way:

void transform_concat(transform_t* orig, transform_t* delta)
{
#define __act(x) orig->m##x += delta->m##x;

    __act(11); __act(12); __act(13); __act(14);
    __act(21); __act(22); __act(23); __act(24);
    __act(31); __act(32); __act(33); __act(34);
    __act(41); __act(42); __act(43); __act(44);

#undef __act
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T10:13:16+00:00Added an answer on June 10, 2026 at 10:13 am

    This sounds like transformation matrix compositing, so look up matrix multiplication. Since you have explicit fields for each value in the matrix, it’ll be hard to write looping implementations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have defined a Matrix module as follows: module Matrix = struct type 'a
Is there a way to have a matrix of user-defined type in OpenCV 2.x?
I have a matrix class that takes the row and column reference type that
I have a matrix in the type of a Numpy array. How would I
I have the following code to convert the type of the matrix using cv::Mat.convertTo()
Have a matrix report now that has Position, Hours and Wages for a location
I have a matrix of objects that contains data in this form: name A,2,name
I have a matrix that is mapped to a .NET web service via the
I have a matrix type which contains a void* array, representing an array of
I have a matrix in R that represents the joint probability mass function (pmf)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.