← Back to team overview

kicad-developers team mailing list archive

Re: question re: KiFace and Prj()

 

On Tue, Nov 3, 2015 at 3:59 AM, Wayne Stambaugh <stambaughw@xxxxxxxxx>
wrote:

> Prj() is always available for any kiway application.  See
>
> http://ci.kicad-pcb.org/job/kicad-doxygen/ws/Documentation/doxygen/html/classKIWAY.html
>
> I would rather not make any code directly dependent on Prj() other than
> the main editing windows.  Please consider passing any necessary
> information stored in Prj() to you objects.  I'm not sure what you need
> to store in the Prj() object that is required to load 3D objects.
>
>
The object I need to pass around is the 3D model equivalent of the
FP_LIB_TABLE object
so I thought Prj() would be the most convenient place to put it.
Alternatively I can make it a
single global but it must be notified when the project working directory
changes.

The specific problem I have at the moment has to do with
3d-viewer/3d_class.cpp;
in S3D_MASTER::SetShape3DName the m_Shape3DFullFilename is determined,
so I need access to the 3D Model Manager which I put into Prj(). This is
something of
a stop-gap measure since Mario is working on replacing the rendering system
and we
plan to make the large and complex S3D_MASTER object disappear so that
MODULE
will only hold pointers to an extremely simple structure which only
contains a filename,
offset, rotation, and scale. That would essentially remove all information
which MODULE
really isn't responsible for and the 3d cache will take responsibility for
holding and
managing the 3D data.

Is there any current method for a class like S3D_MASTER to obtain a
pointer/reference
to a KIWAY or Prj()?

- Cirilo



> On 10/24/2015 3:21 AM, Cirilo Bernardo wrote:
> > The accessibility of  Prj() is a mystery to me.  I would like to access
> > Prj() from various places,
> > for example 3d_class.cpp but I have no idea how to do this (or if it's a
> > good idea at all).
> > I'd appreciate any tips.  What I'd like to do really is make the 3D
> > Cache Manager and its
> > subparts available to various components of 3d-viewer so that I can have
> > an improved
> > filename resolution scheme in place as part of the 3D refactor work.
> >
> > - Cirilo
> >
> >
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
> >
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References