Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LE is up - hoping it'll be a good prototype for new features
06-17-2010, 10:40 AM,
#4
 
OK. Joe can you elaborate on the light volumes(if I got it right)?

Code:
    // create brake light point light sources
    // this is experimental at the moment and uses fixed
    // coordinates to place the brake lights
    for (int i = 0; i < 2; i++)
    {
        lights.push_back(LIGHT());
        SCENENODE & bodynoderef = topnode.GetNode(bodynode);
        lights.back().node = bodynoderef.AddNode();
        SCENENODE & node = bodynoderef.GetNode(lights.back().node);
        VERTEXARRAY & varray = lights.back().varray;
        MODEL & model = lights.back().model;
        varray.SetToUnitCube();
        varray.Scale(2.0,2.0,2.0);
        //varray.SetToBillboard(-1,-1,1,1);
        node.GetTransform().SetTranslation(MATHVECTOR <float,3>(-2.16,-0.45*(i*2-1),-0.18));
        model.BuildFromVertexArray(varray, error_output);
        
        
        keyed_container <DRAWABLE> & dlist = GetDrawlist(node, OMNI);
        lights.back().draw = dlist.insert(DRAWABLE());
        DRAWABLE & draw = dlist.get(lights.back().draw);
        draw.SetColor(0.8,0.1,0.1);
        draw.AddDrawList(model.GetListID());
        //draw.SetVertArray(&model.GetVertexArray());
        draw.SetCull(true, true);
        //draw.SetCull(false, false);
        draw.SetDrawEnable(false);
    }
Reply


Messages In This Thread
[No subject] - by NaN - 06-17-2010, 03:08 AM
[No subject] - by joevenzon_phpbb2_import3 - 06-17-2010, 10:32 AM
[No subject] - by NaN - 06-17-2010, 10:40 AM
[No subject] - by joevenzon_phpbb2_import3 - 06-18-2010, 01:11 AM
[No subject] - by NaN - 06-18-2010, 07:11 AM
[No subject] - by joevenzon_phpbb2_import3 - 06-18-2010, 10:15 PM
[No subject] - by joevenzon_phpbb2_import3 - 06-18-2010, 10:15 PM
[No subject] - by zimluura - 06-19-2010, 11:20 AM
[No subject] - by NaN - 06-19-2010, 07:39 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)