Hi,

with this call you replace the geometry core of node (which was created 
by the makeSphere call) with a transformation core. 

>     node->setCore(trans);

The correct code would look like this:

NodePtr geo_node = makeSphere(2,2);
TransformPtr trans_core = Transform::create();
NodePtr trans_node = Node::create();
beginEditCP(trans_node);
    trans_node->setCore(trans_core);
    trans_node->addChild(geo_node);
endEditCP(trans_node);
beginEditCP(_root);//root is a nodeptr
   _root->addChild(trans_node);
endEditCP(_root);

Good luck

Matthias

On Tuesday 17 May 2005 05:40, zhujiejie wrote:
> HI,
>
>  I try to bind a transform node to my child,
>
>  TransformPtr trans = Transform::create();
>  NodePtr node = makeSphere(2,2);
>  beginEditCP(node);
>     node->setCore(trans);
>  endEditCP(node);
>  beginEditCP(_root);//root is a nodeptr
>     _root->addChild(node);
>  endEditCP(_root);
>
>   But nothing showed.
>
>   Is there sth.wrong?
>
> Best.
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Oracle Space Sweepstakes
> Want to be the first software developer in space?
> Enter now for the Oracle Space Sweepstakes!
> http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to