WorldViz User Forum  

Go Back   WorldViz User Forum > Plug-in development

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-06-2011, 11:48 AM
rafael rafael is offline
Member
 
Join Date: Sep 2011
Location: Ames, Iowa
Posts: 1
Modifying transform node in C++ extension

Hi,
I need to modify the position and orientation of a 3D model in an C++ extension. Tried to pass a model and a transform node (created by Transform = vizmat.Transform() ) to the extension.

Have tried something like this:
int HybridTrackingExt::modifyNode(viz:ata &data)
{

osg::Node* osg_root = data.getPointer<osg::Node>("osg_root");


if(osg_root != NULL)
{
std::cout << "Node found!" << std::endl;

osg::MatrixTransform* mt = static_cast<osg::MatrixTransform*>(osg_root);
if(mt)
{

_transform.makeTranslate( osg::Vec3(3.0f, 0.0f, 0.0f));
mt->setMatrix(_transform);

}

}
return 0;
}

Unfortunately, this didn't work. How could a transform a 3D model using an extension?

regards,
Rafael
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
intersense.dle extension kopper Vizard 4 07-12-2010 07:47 AM
linear transform in 2D screen space stefs Vizard 1 10-09-2009 10:15 AM
tracker coordinates transform Charlotte Li Vizard 1 05-18-2009 02:38 PM
Modifying Vizinfo to Support Re-parenting Tip Gladsomebeast Vizard 0 12-16-2008 05:34 PM
Documentation for coding a new render node? reedev Plug-in development 2 10-30-2008 10:06 AM


All times are GMT -7. The time now is 04:11 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC