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

  • Home
  • SEARCH
  • 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 8750505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:52:39+00:00 2026-06-13T12:52:39+00:00

In openGL we could create some polygons and connect them as a group by

  • 0

In openGL we could create some polygons and connect them as a group by the function
‘pushMatrix()’ and then we could rotate them and move them as one object..

Is there a way to do it with xna? if i have 3 polygons and i want to rotate and move them all together as a group how can i do that?

EDIT:
‫I am using Primitives Shapes to build a Skeleton of a basketball player.

The game will only be a shoot out game to the basket, which means the player

will only have to move his Arm.

I need a full control over the Arm parts, and in order to do that, I need to move

the Arm which is built from Primitive shapes Harmonicaly. In order to do that,

I’ve tried Implementing the MatrixStack for performing matrix Transformations but with

no success. Any suggestions?‬

  • 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-13T12:52:40+00:00Added an answer on June 13, 2026 at 12:52 pm

    I will answer this in basic terms, as I can’t quite gleen from your question how well versed you are with XNA or graphics development in general. I’m not even sure where your problem is; is it the code, the structure or how XNA works compared to OpenGL?

    The short answer is that there is no matrix stack built in.

    What you do in OpenGL and XNA/DX is the very same thing when working with matrices. What you do with pushMatrix is actually only preserving the matrix (transformation) state on a stack for convenience.

    Connecting objects as a group is merely semantics, you don’t actually connect them as a group in any real way. What you’re doing is setting a render state which is used by the GPU to transform and draw vertices for every draw call thereafter until that state is once again changed. This can be done in XNA/DX in the same way as in OpenGL.

    Depending on what you’re using to draw your objects, there are different ways of applying transformations. From your description I’m guessing you’re using DrawPrimitives (or something like that) on the GraphicsDevice object, but whichever you’re using, it’ll use whatever transformation has been previously applied, normally on the Effect. The simplest of these is the BasicEffect, which has three members you’d be interested in:

    • World
    • View
    • Projection

    If you use the BasicEffect, you merely apply your transform using a matrix in the World member. Anything that you draw after having applied your transforms to your current effect will use those transforms. If you’re using a custom Effect, you do something quite like it except for how you set the matrix on the effect (using the parameters collection). Have a look at:

    • http://msdn.microsoft.com/en-us/library/bb203926(v=xnagamestudio.40).aspx
    • http://msdn.microsoft.com/en-us/library/bb203872(v=xnagamestudio.40).aspx

    If what you’re after is an actual transform stack, you’ll have to implement one yourself, although this is quite simple. Something like this:

    Stack<Matrix> matrixStack = new Stack<Matrix>();
    ...
    matrixStack.Push( armMatrix );
    ...
    basicEffect.World = matrixStack.Peek();
    foreach (EffectPass pass in basicEffect.CurrentTechnique.Passes)
    {
        pass.Apply();
    
        graphics.GraphicsDevice.DrawPrimitives(...);
    }
    basicEffect.End();
    ...
    matrixStack.Pop();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Could anyone recommend some beginner opengl books from a shader approach? Also, looking for
I'm looking for an OpenGL tutorial. Could you suggest something? I want to create
I've been programming OpenGL for some time now but I'm quite new to OpenGL
Could anyone help me with examples of some bare-bone, old school 3d methods in
I'm trying to create some interlaced images to output on a 3DTV. My method
I've been trying to convert some of my code to modern OpenGL. I've gotten
I want to experiment with some GPGPU in first place. I could have chosen
I was studying Perlin's Noise through some examples @ http://dindinx.net/OpenGL/index.php?menu=exemples&submenu=shaders and couldn't help to
Does anyone know how to create a billboard in OpenGL ES for the iPhone?
I am developing openGL application on iPad and i came up to one quite

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.