Re: [osg-users] Making a Visible Vector with Translating point

2011-01-21 Thread Richard Redding
Bumping my own thread because I need an answer :(

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=35875#35875





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Making a Visible Vector

2010-12-01 Thread Richard Redding
Hello World,

I am trying to create a visible vector that moves around a set space with one 
point stationary. I have polling data which can be used for the polling 
position of the dynamic point.

Here is how I set up my vector. I do not know how to create the vector visible 
and then start to move the dynamic end point with relation to the stationary 
end point.

The Vector just has to be a visible line that can be colored to make it stand 
out from the background.

[code]

class orientVector : public osg::NodeCallback{
public:
orientVector::orientVector():

  pos()
  {};
orientCoords pos;
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
{
pos.coordsCalc();
osg::PositionAttitudeTransform* moveVector = 
dynamic_cast osg::PositionAttitudeTransform*(node);
//std::coutX - Value:  pos.itsX Y - Value:  
 pos.itsY  Z - Value:   pos.itsZ  std::endl;
moveVector-setPosition( osg::Vec3( pos.itsX, pos.itsY, 
pos.itsZ));
traverse(node, nv);
}

};

/* DRAW THE FIRST VECTORS */
osg::Vec3Array* lineVisible1 = new osg::Vec3Array;
osg::Geode* lineVertex1 = new osg::Geode;
osg::Geometry* lineGeometry1 = new osg::Geometry;
lineVisible1-push_back( osg::Vec3 (511.33, 0, 767));
lineVisible1-push_back( osg::Vec3 (767, 767, 767));
lineGeometry1-setVertexArray( lineVisible1 );
lineVertex1-addDrawable(lineGeometry1);

// ORIENT THE VECTOR WITH IR DATA ***/
osg::PositionAttitudeTransform* vectorOrient = new 
osg::PositionAttitudeTransform;
vectorOrient-addChild(lineVertex1);
vectorOrient-setUpdateCallback(new orientVector());

[/code]

I later on I will be setting up another vector at another static position so 
that in the end there will be two vectors who point at one object as the 
object moves through space.


... 
I really appreciate all the help I can get! :D

Cheers,

Richard

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=34354#34354





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Creating a Visible Pivoting Vector/Cylinder

2010-09-29 Thread Richard Redding
Hi Tom,

Thanks a lot for your input. I will be coding that out today so hopefully I can 
get that all set up! Thanks again, more info on the situation as it develops!

... 

Cheers,
Richard

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=32190#32190





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Creating a Visible Pivoting Vector/Cylinder

2010-09-23 Thread Richard Redding
Hi,

I'm looking to write the code for a vector/a small diameter cylinder to pivot 
from the bottom, and traces to different points at the top with relation to 
data collected by a user interface device. Specifically I am tracking an IR LED 
with OSG in a cubic set space and would like a visible vector/cylinder to point 
to the LED's point in space. 

The vectors/cylinders are only for aesthetic purposes to get more of a feel of 
where the LED is in relation to the cubic defined space.

Any/all help is greatly appreciated. I've been just learning this on my own and 
am new to OSG's specific operation! :-D 
... 

Thank you!

Cheers,
Richard

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31992#31992





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Simple line construction in a 3d Space

2010-04-28 Thread Richard Redding
Hey all!,


I need to use a line in 3d space and hold one end fixed to a wall and then 
P.A.T. the other point through data which I am sending it in real time sort of 
like a tracker.

I have a hunch to do this would be through the:

osg::Geometry* newLine = new osg::Geometry();

but I'm not sure how to go about actually getting the line up and running. If 
you could help me with this preliminary code that would be great!


Cheers,
Richard :D

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27403#27403





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Simple line construction in a 3d Space

2010-04-28 Thread Richard Redding
[quote=Jason Daly]Richard Redding wrote:

I think the osggeometry example has what you're looking for.

--J

[/quote]

Hey J, 

I'm really wet behind the ears on this site. Do you think you could link me to 
what you are talking about :D!!!

Thanks for the help! I appreciate it!

Cheers mate,

Rich

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27407#27407





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Transparent Wall and Grid system Creation

2010-04-22 Thread Richard Redding
Hi again,

Thanks a lot for that code, I'm sure it will be a real help for me but I can't 
seem to create the geode and pass it to my addDrawable

I'm getting an error of:

[code]
osg::Geometry* grid_sd = new osg::Geometry();
osg::Geode* grid_geode = new osg::Geode();
grid_geode-addDrawable(grid_sd);



error C2512: 'osg::Geometry' : no appropriate default constructor available

error C2664: 'osg::Geode::addDrawable' : cannot convert parameter 1 from 
'osg::Geometry *' to 'osg::Drawable *'[/code]

I don't know understand where to define an appropriate default constructor?

... 

Thank you!

Cheers,
Richard

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27169#27169





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Transparent Wall and Grid system Creation

2010-03-26 Thread Richard Redding
Hey All,

 Right now I am using OSG to code a cube for viewing an IR LED in 3DOF 
using 2 wiimotes. The problem I am running into right now is how to turn the 
walls of the cube transparent and interlace a grid in the cube to see three 
dimensional movement based on the vectors I have calculated to equate one point 
in three dimensional space for which it will run around inside of the cube. 

I am calculating the position of the 1 IR LED by triangulating the shortest 
vector between the lines of sight and taking its median.

I am very new to OSG and only have a basic C++/C education.
I am sorry if this is too trivial of a question.

... 

Thanks all!

Cheers Mates,
Richard

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=26208#26208





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org