Show
Ignore:
Timestamp:
10/25/08 15:17:22 (6 years ago)
Author:
robert
Message:

From Jim Vaughan,

- Matrix transform nodes were stripped out, and the
vertices and normals of each node were
transposed by the modelling matrix. My change preserves
the matrix transform nodes, so that
models can still be articulated by changing the matrices.

- Lights were copied from the COIN scenegraph to the OSG
scenegraph, but they were not associated
with a LightSource? node. My change for this creates a
Group and adds a LightSource? for each Light.

- If VRML textures have names, the name is now copied to

--

Form Robert Osfild, changed SbString? to std::string usage

M Inventor/ConvertFromInventor.h
M Inventor/ConvertFromInventor.cpp

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/Inventor/ConvertFromInventor.h

    r6543 r9053  
    88#include <osg/Light> 
    99#include <Inventor/actions/SoCallbackAction.h> 
     10#include <Inventor/SbLinear.h> 
    1011#include <vector> 
    1112#include <stack> 
     
    5051        static SoCallbackAction::Response preVRMLImageTexture(void* data, 
    5152                                 SoCallbackAction* action, const SoNode* node); 
     53        static SoCallbackAction::Response preVRMLAppearance(void* data, 
     54                                 SoCallbackAction* action, const SoNode* node); 
     55        static SoCallbackAction::Response postVRMLAppearance(void* data, 
     56                                 SoCallbackAction* action, const SoNode* node); 
     57        static SoCallbackAction::Response preInfo(void* data, 
     58                                 SoCallbackAction* action, const SoNode* node); 
    5259 
    5360        static void addTriangleCB(void* data, SoCallbackAction* action, 
     
    6269 
    6370    private: 
     71        SbString transformInfoName; 
     72        SbName appearanceName; 
     73        bool inAppearanceWithNoTexture; 
    6474 
     75        void addMatrixTransform(const std::string& name, SbVec3f axis, float angle, SbVec3f center, SbVec3f trans, SbVec3f scale); 
    6576        void addVertex(SoCallbackAction* action, const SoPrimitiveVertex* v,  
    6677                       int index); 
     
    113124 
    114125        osg::ref_ptr<osg::MatrixTransform> _root;///<The root node; 
     126 
     127        osg::ref_ptr<osg::Group> lightGroup; 
    115128}; 
    116129