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 7807269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:48:07+00:00 2026-06-02T02:48:07+00:00

I have this line of code: boneHierarchy = BoneHierarchy(Point3D(24.5f, 84.0f + HumanBoundingBox::HEIGHT/2.0f ,24.5f ),

  • 0

I have this line of code:

boneHierarchy = BoneHierarchy(Point3D(24.5f,
                                       84.0f + HumanBoundingBox::HEIGHT/2.0f ,24.5f
                                      ),
                              CompassRadians(0.0f),
                              renderingEngine
                             );

BoneHierarchy has some vectors as private members. I take the address of the vectors and pass them to a rendering class. But I’m getting garbage when the when I call the size member function of the vector. I am taking the address of the vectors and not the elements in it.

BoneHierarchy::BoneHierarchy(Point3D const& position,
                             CompassRadians const& heading,
                             Renderer* renderingEngine) : counter(0), renderingEngine(renderingEngine)
{    




    CoordinateSystem bodyCoordSys = CoordinateSystem(
                                                     Vector3D(0.0f,1.0f,0.0f),
                                                     Vector3D(0.0f,0.0f,1.0f));


    map<Normal3D::enumeration, TextureCoordinates> cubeTextureKind;
    Normal3D::enumeration normal;
    for (normal = Normal3D::begin(); normal != Normal3D::end(); ++normal)
    {
        cubeTextureKind[normal] = TextureAtlas::textureAtlasCoordLookup(WOOD);
    }
    Bone body = Bone(
                     Vector3D(0.0f, HumanBoundingBox::HEIGHT/2.0f,0.0f),
                     HumanBoundingBox::DIM,
                     Euler3D(0.0f,0.0f,0.0f),
                     cubeTextureKind,
                     bodyCoordSys);
    //TODO there are two positions for the human, one here and one in mesh vbo, unify these into one.
    body.setPosition(Vector3D(position.getX(),position.getY(),position.getZ()));
    body.setEuler(Euler3D((float) (Math::toDegrees(heading.getValue())),0.0f,0.0f));
    drawBone(body,UPDATE_ALL);
    root = body;


    map<string,Renderer::Buffer> vboVariableMap;
    vboVariableMap["aVertexPosition"] = Renderer::Buffer(verticesBuf);
    vboVariableMap["aTextureCoord"] = Renderer::Buffer(texCoordsBuf);
    vboVariableMap["index"] = Renderer::Buffer(indicesBuf);
    cout << "aBoneIndex " << boneIndexBuf.size() << endl;
    vboVariableMap["aBoneIndex"] = Renderer::Buffer(boneIndexBuf);
    vboVariableMap["uBoneMatrix0"] = Renderer::Buffer(transformMatrixBuf);
    GLuint textureID = 0; 
    Renderer::VBODescription vboDescription = Renderer::VBODescription("boneShader",
                                                                       vboVariableMap,
                                                                       GL_DYNAMIC_DRAW,
                                                                       indicesBuf.size(),
                                                                       textureID);
    bufferID = renderingEngine->registerBuffer(vboDescription);
    cout << "bufferID " << bufferID << endl;
    renderingEngine->printBoneIndexSize();
    cout << &(getBoneIndexBuf()) << endl;
}


Renderer::Buffer::Buffer(vector<GLfloat> const& data):
floatData(&data), ushortData(NULL), target(GL_ARRAY_BUFFER)
{
    printf("pointer: %p, size: %lu\n", floatData, floatData->size());
}

Renderer::Buffer::Buffer(vector<GLushort> const& data):
floatData(NULL), ushortData(&data), target(GL_ELEMENT_ARRAY_BUFFER)
{
}
  • 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-02T02:48:09+00:00Added an answer on June 2, 2026 at 2:48 am

    If the BoneHierarchy constructor that accepts a Point3D and a CompassRadians computes the addresses of its own vector members, that’s fine. Their addresses won’t change.

    The code also shows an assignment statement. The addresses of the vector members of the temporary BoneHierarchy on the right will be different from those of the BoneHierarchy object stored in boneHierarchy on the left. Make sure you’re not copying the addresses in your assignment operator, or else the boneHierarchy object will end up referring to the vector members of a temporary object that doesn’t exist anymore. You’ll also want to check your copy constructor.

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

Sidebar

Related Questions

I have this line of code that has no effect on the listBox it
I currently have this line of code which has been working for the past
I have this line of code to remove some punctuation: str.replaceAll([\\-\\!\\?\\.\\,\\;\\:\\\\\'], ); I don't
I have this line of code if ([[dateTextField text] isEqualToString:@Test]); { } For some
I have this line of code but it throws an error. What is the
I have this line of code: this.Path = pathLookUpLocation.GetValue(RegLookupKey, null).ToString(); When I run static
I have this line of code: System.Drawing.Icon icon = System.Drawing.Icon.FromHandle(shinfo.hIcon); A few lines later,
Say I have this line of code in the view. <?php echo CHtml::activeTextField($model,'start_time'); ?>
Sorry, I'm new to flash I have this line of code: BaseEntry( _entryList[i] ).topTeamName
I have this line in my code: myGridView.setChoiceMode(GridView.CHOICE_MODE_MULTIPLE); It works perfectly fine in ICS,

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.