coeng

diff src/co_xform.cc @ 8:8cce82794f90

seems to work nicely
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 15 Feb 2015 05:14:20 +0200
parents 2f872a179914
children
line diff
     1.1 --- a/src/co_xform.cc	Sat Feb 14 10:08:00 2015 +0200
     1.2 +++ b/src/co_xform.cc	Sun Feb 15 05:14:20 2015 +0200
     1.3 @@ -21,6 +21,7 @@
     1.4  	: scale(1, 1, 1)
     1.5  {
     1.6  	name = "prs";
     1.7 +	co_xform = 0;
     1.8  
     1.9  	register_component(name, cons_prs);
    1.10  }
    1.11 @@ -50,3 +51,19 @@
    1.12  
    1.13  	co_xform->xform = rmat * tmat * smat;
    1.14  }
    1.15 +
    1.16 +CoXForm *gobj_co_xform(const GObject *obj, bool nofail)
    1.17 +{
    1.18 +	CoXForm *co = COCAST(CoXForm, obj->get_component("xform"));
    1.19 +	if(co) return co;
    1.20 +
    1.21 +	return nofail ? &reg_co_xform : 0;
    1.22 +}
    1.23 +
    1.24 +CoPRS *gobj_co_prs(const GObject *obj, bool nofail)
    1.25 +{
    1.26 +	CoPRS *co = COCAST(CoPRS, obj->get_component("prs"));
    1.27 +	if(co) return co;
    1.28 +
    1.29 +	return nofail ? &reg_co_prs : 0;
    1.30 +}