[osg-users] Visualizing a light cone in scene

David Heitbrink david-heitbrink at uiowa.edu
Tue Jan 17 07:55:25 PST 2017


Basically What you want is the situation where the peak of the cone is at 0,0,0, and the base is at your negative direction pointed towards the ground. You may have to put transform between say the DOF node, and the cone. You might also just forgo the OSG cone, and have a model where the peak of the cone is at 0,0,0. 

You might end up with a graph that looks something like this:

(osg::MatrixTransform) -> (your Aircraft model), (DOF Node) ->(osg::MatrixTransform) ->(your cone).

You could just use a Matrix transform, instead of the DOF Node. The DOF node is basically to aim the light. 

The point of the first matrix transform is to move your aircraft mode + your cone at the same time. Both the DOF and model would be children of the transform, the DOF node is basically there to rotate the light cone, which might be just straight down. You the last Matrix Transform is to setup the cone so it rotates about the point of the cone.

You will most likely want to read up Hierarchical Modeling in Computer Graphics. There are lots of examples + lecture notes on the topic.

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








More information about the osg-users mailing list