OpenSceneGraph - Drawing a 3D Wall
I have the code below. I got the idea from a tutorial but my code does not show anything when run. The goal is to draw  Wall in 3d. My guess is that my points may be off but I am not sure how best to pick points, and also scale. 

    void BuildWall(osg::Group* root)
    {
    
        osg::Geode* WallGeode = new osg::Geode();
        osg::Geometry* WallGeometry = new osg::Geometry();
    
        WallGeode->addDrawable(WallGeometry);
        //add the Node to the root Node
        root->addChild(WallGeode);
        //specify vertices
        osg::Vec3Array* WallVertices = new osg::Vec3Array;
        WallVertices->push_back( osg::Vec3(0, 0, 0) ); // front left
        WallVertices->push_back( osg::Vec3(10, 0, 0) ); // front right
        WallVertices->push_back( osg::Vec3(10,10, 0) ); // back right
        WallVertices->push_back( osg::Vec3(0,10, 0) ); // back left 
        WallGeometry->setVertexArray( WallVertices );
    
        //specify the kind of geometry we want to draw here
        osg::DrawElementsUInt* WallBase = new osg::DrawElementsUInt(osg::PrimitiveSet::QUADS, 0);
        //specify the order we want to draw the base of our geometry
        WallBase->push_back(3);
        WallBase->push_back(2);
        WallBase->push_back(1);
        WallBase->push_back(0);
        WallGeometry->addPrimitiveSet(WallBase);
          
        //Declare and load an array of Vec4 elements to store colors.
        osg::Vec4Array* colors = new osg::Vec4Array;
        colors->push_back(osg::Vec4(1.0f, 0.0f, 0.0f, 1.0f) ); //index 0 red
        colors->push_back(osg::Vec4(0.0f, 1.0f, 0.0f, 1.0f) ); //index 1 green
        colors->push_back(osg::Vec4(0.0f, 0.0f, 1.0f, 1.0f) ); //index 2 blue
        colors->push_back(osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f) ); //index 3 white
        //colors->push_back(osg::Vec4(1.0f, 0.0f, 0.0f, 1.0f) ); //index 4 red
    
        WallGeometry->setColorArray(colors);
        WallGeometry->setColorBinding(osg::Geometry::BIND_PER_VERTEX);
    
        // Declare and initialize a transform node.
        osg::PositionAttitudeTransform* WallTwoXForm = new osg::PositionAttitudeTransform();
    
        // Use the 'addChild' method of the osg::Group class to
        // add the transform as a child of the root node and the
        // pyramid node as a child of the transform.
        root->addChild(WallTwoXForm);
        WallTwoXForm->addChild(WallGeode);
        float scale=root->getBound().radius();
        WallTwoXForm->setScale(osg::Vec3d(scale,scale,scale));
    
        // Declare and initialize a Vec3 instance to change the
        // position of the tank model in the scene
        osg::Vec3 WallTwoPosition(15,0,0);
         
        WallTwoXForm->setPosition(WallTwoPosition );
    
    }
OpenSceneGraph - Drawing a 3D Wall
===

I have the code below. I got the idea from a tutorial but my code does not show anything when run. The goal is to draw  Wall in 3d. My guess is that my points may be off but I am not sure how best to pick points, and also scale. 

    void BuildWall(osg::Group* root)
    {
    
        osg::Geode* WallGeode = new osg::Geode();
        osg::Geometry* WallGeometry = new osg::Geometry();
    
        WallGeode->addDrawable(WallGeometry);
        //add the Node to the root Node
        root->addChild(WallGeode);
        //specify vertices
        osg::Vec3Array* WallVertices = new osg::Vec3Array;
        WallVertices->push_back( osg::Vec3(0, 0, 0) ); // front left
        WallVertices->push_back( osg::Vec3(10, 0, 0) ); // front right
        WallVertices->push_back( osg::Vec3(10,10, 0) ); // back right
        WallVertices->push_back( osg::Vec3(0,10, 0) ); // back left 
        WallGeometry->setVertexArray( WallVertices );
    
        //specify the kind of geometry we want to draw here
        osg::DrawElementsUInt* WallBase = new osg::DrawElementsUInt(osg::PrimitiveSet::QUADS, 0);
        //specify the order we want to draw the base of our geometry
        WallBase->push_back(3);
        WallBase->push_back(2);
        WallBase->push_back(1);
        WallBase->push_back(0);
        WallGeometry->addPrimitiveSet(WallBase);
          
        //Declare and load an array of Vec4 elements to store colors.
        osg::Vec4Array* colors = new osg::Vec4Array;
        colors->push_back(osg::Vec4(1.0f, 0.0f, 0.0f, 1.0f) ); //index 0 red
        colors->push_back(osg::Vec4(0.0f, 1.0f, 0.0f, 1.0f) ); //index 1 green
        colors->push_back(osg::Vec4(0.0f, 0.0f, 1.0f, 1.0f) ); //index 2 blue
        colors->push_back(osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f) ); //index 3 white
        //colors->push_back(osg::Vec4(1.0f, 0.0f, 0.0f, 1.0f) ); //index 4 red
    
        WallGeometry->setColorArray(colors);
        WallGeometry->setColorBinding(osg::Geometry::BIND_PER_VERTEX);
    
        // Declare and initialize a transform node.
        osg::PositionAttitudeTransform* WallTwoXForm = new osg::PositionAttitudeTransform();
    
        // Use the 'addChild' method of the osg::Group class to
        // add the transform as a child of the root node and the
        // pyramid node as a child of the transform.
        root->addChild(WallTwoXForm);
        WallTwoXForm->addChild(WallGeode);
        float scale=root->getBound().radius();
        WallTwoXForm->setScale(osg::Vec3d(scale,scale,scale));
    
        // Declare and initialize a Vec3 instance to change the
        // position of the tank model in the scene
        osg::Vec3 WallTwoPosition(15,0,0);
         
        WallTwoXForm->setPosition(WallTwoPosition );
    
    }