class Truevision:
    def exit(self):
        _App.exit(self);
        
    def load(self, val):
        _App.load(self, val);
        
    def register(self, sname, desc, helpmsg, author, copyr, year, objtypes, menupath):
        print("in Truevision::register");
        _App.register_script(self, sname, desc, helpmsg, author, copyr, year, objtypes, menupath);
        print("Truevision::register done");
        
class Object3D:
    def set_name(self, newname):
        _Object3D.set_name(self.object, newname)

    def get_name(self):
        return _Object3D.get_name(self.object);

    def is_hidden(self):
        return _Object3D.is_hidden(self.object);
    
    def set_hidden(self, hide):
        return _Object3D.set_hidden(self.object, hide)
    
    def is_no_image(self):
        return _Object3D.is_no_image(self.object);

    def set_no_image(self, ni):
        return _Object3D.set_no_image(self.object, ni)

    def is_render(self):
        return _Object3D.is_render(self.object);

    def set_render(self, render):
        return _Object3D.set_render(self.object, render)

    def is_hollow(self):
        return _Object3D.is_hollow(self.object);

    def set_hollow(self, hollow):
        return _Object3D.set_hollow(self.object, hollow)

    def is_no_reflection(self):
        return _Object3D.is_no_reflection(self.object);
    
    def set_no_reflection(self, nr):
        return _Object3D.set_no_reflection(self.object, nr)

    def is_double_illuminate(self):
        return _Object3D.is_double_illuminate(self.object);
    
    def set_double_illuminate(self, di):
        return _Object3D.set_double_illuminate(self.object, di)
    
    def is_no_shadow(self):
        return _Object3D.is_no_shadow(self.object);

    def set_no_shadow(self, shadow):
        return _Object3D.set_no_shadow(self.object, shadow)

    def is_inverse(self):
        return _Object3D.is_inverse(self.object);

    def is_selected(self):
        return _Object3D.is_selected(self.object);
    
    def select(self):
        return _Object3D.select(self.object);
    
    def unselect(self):
        return _Object3D.unselect(self.object);

    def set_inverse(self, inver):
        return _Object3D.set_inverse(self.object, inver)
    
class Object3DMaterial(Object3D):
    def is_target(self):
        return _Object3DMaterial.is_target(self.object)

    def is_collect(self):
        return _Object3DMaterial.is_collect(self.object)

    def is_refraction(self):
        return _Object3DMaterial.is_refraction(self.object)

    def is_reflection(self):
        return _Object3DMaterial.is_reflection(self.object)

    def is_pass_through(self):
        return _Object3DMaterial.is_pass_through(self.object)
    
    def set_target(self, target):
        return _Object3DMaterial.set_target(self.object, target)

    def set_collect(self, col):
        return _Object3DMaterial.set_collect(self.object, col)

    def set_reflection(self, refl):
        return _Object3DMaterial.set_reflection(self.object, refl)

    def set_refraction(self, refr):
        return _Object3DMaterial.set_refraction(self.object, refr)

    def set_pass_throug(self, passt):
        return _Object3DMaterial.set_pass_through(self.object, passt)

    def get_spacing(self):
        return _Object3DMaterial.get_spacing(self.object)
    
    def set_spacing(self, spaci):
        return _Object3DMaterial.set_spacing(self.object, spaci)


class Box(Object3DMaterial):
    def __init__(self):
        self.object = _Box.new_box(self)

    def printBox(self):
        return _Box.access_box(self.object);

    def get_location(self):
        return _Box.get_location(self.object);

    def set_location(self, location):
        return _Box.set_location(self.object, location);

    def get_corner1(self):
        return _Box.get_corner1(self.object);

    def get_corner2(self):
        return _Box.get_corner2(self.object);

    def set_corner1(self, corn):
        return _Box.set_corner1(self.object, corn);
    
    def set_corner2(self, corn):
        return _Box.set_corner2(self.object, corn);

    def get_size(self):
        return _Box.get_size(self.object);

    def set_size(self, sz):
        return _Box.set_size(self.object, sz);

    def set_rotation(self, ro):
        return _Box.set_rotation(self.object, ro);

    def get_rotation(self):
        return _Box.get_rotation(self.object);

    def get_object(self):
        return self.object;

class Cone(Object3DMaterial):
    def __init__(self):
        self.object = _Cone.new_cone(self)
        
    def get_location(self):
        return _Cone.get_location(self.object);

    def set_location(self, location):
        return _Cone.set_location(self.object, location);

    def get_cap_radius(self):
        return _Cone.get_cap_radius(self.object);
 
    def set_cap_radius(self, corn):
        return _Cone.set_cap_radius(self.object, corn);

    def get_base_radius(self):
        return _Cone.get_base_radius(self.object);
 
    def set_base_radius(self, corn):
        return _Cone.set_base_radius(self.object, corn);

    def get_cap_point(self):
        return _Cone.get_cap_point(self.object);
 
    def set_cap_point(self, corn):
        return _Cone.set_cap_point(self.object, corn);

    def get_base_point(self):
        return _Cone.get_base_point(self.object);
 
    def set_base_point(self, corn):
        return _Cone.set_base_point(self.object, corn);

    def get_size(self):
        return _Cone.get_size(self.object);

    def set_size(self, sz):
        return _Cone.set_size(self.object, sz);

    def set_rotation(self, ro):
        return _Cone.set_rotation(self.object, ro);

    def get_rotation(self):
        return _Cone.get_rotation(self.object);

    def is_open(self):
        return _Cone.is_open(self.object);

    def set_open(self, op):
        return _Cone.set_open(self.object, op)
    
    def get_object(self):
        return self.object;
    

class Cylinder(Object3DMaterial):
    def __init__(self):
        self.object = _Cylinder.new_cylinder(self)
        
    def get_location(self):
        return _Cylinder.get_location(self.object);

    def set_location(self, location):
        return _Cylinder.set_location(self.object, location);

    def get_radius(self):
        return _Cylinder.get_radius(self.object);
 
    def set_radius(self, corn):
        return _Cylinder.set_radius(self.object, corn);

    def get_cap_point(self):
        return _Cylinder.get_cap_point(self.object);
 
    def set_cap_point(self, corn):
        return _Cylinder.set_cap_point(self.object, corn);

    def get_base_point(self):
        return _Cylinder.get_base_point(self.object);
 
    def set_base_point(self, corn):
        return _Cylinder.set_base_point(self.object, corn);

    def get_size(self):
        return _Cylinder.get_size(self.object);

    def set_size(self, sz):
        return _Cylinder.set_size(self.object, sz);

    def set_rotation(self, ro):
        return _Cylinder.set_rotation(self.object, ro);

    def get_rotation(self):
        return _Cylinder.get_rotation(self.object);

    def is_open(self):
        return _Cylinder.is_open(self.object);

    def set_open(self, op):
        return _Cylinder.set_open(self.object, op)
    
    def get_object(self):
        return self.object;

class Sphere(Object3DMaterial):
    def __init__(self):
        self.object = _Sphere.new_sphere(self)

    def get_location(self):
        return _Sphere.get_location(self.object);

    def set_location(self, location):
        return _Sphere.set_location(self.object, location);

    def get_radius(self):
        return _Sphere.get_radius(self.object);
 
    def set_radius(self, corn):
        return _Sphere.set_radius(self.object, corn);

    def get_size(self):
        return _Sphere.get_size(self.object);

    def set_size(self, sz):
        return _Sphere.set_size(self.object, sz);

    def set_rotation(self, ro):
        return _Sphere.set_rotation(self.object, ro);

    def get_rotation(self):
        return _Sphere.get_rotation(self.object);

    def get_object(self):
        return self.object;

class Superellipsoid(Object3DMaterial):
    def __init__(self):
        self.object = _Superellipsoid.new_superellipsoid(self)

    def get_location(self):
        return _Superellipsoid.get_location(self.object);

    def set_location(self, location):
        return _Superellipsoid.set_location(self.object, location);

    def get_east(self):
        return _Superellipsoid.get_east(self.object);
 
    def set_east(self, corn):
        return _Superellipsoid.set_east(self.object, corn);

    def get_north(self):
        return _Superellipsoid.get_north(self.object);
 
    def set_north(self, corn):
        return _Superellipsoid.set_north(self.object, corn);

    def get_size(self):
        return _Superellipsoid.get_size(self.object);

    def set_size(self, sz):
        return _Superellipsoid.set_size(self.object, sz);

    def set_rotation(self, ro):
        return _Superellipsoid.set_rotation(self.object, ro);

    def get_rotation(self):
        return _Superellipsoid.get_rotation(self.object);

    def get_object(self):
        return self.object;

class Plane(Object3DMaterial):
    def __init__(self):
        self.object = _Plane.new_plane(self)

    def get_location(self):
        return _Plane.get_location(self.object);

    def set_location(self, location):
        return _Plane.set_location(self.object, location);

    def set_rotation(self, ro):
        return _Plane.set_rotation(self.object, ro);

    def get_rotation(self):
        return _Plane.get_rotation(self.object);

    def get_object(self):
        return self.object;

class ObjCSG(Object3DMaterial):
   
    def get_location(self):
        return _ObjCSG.get_location(self.object);

    def set_location(self, location):
        return _ObjCSG.set_location(self.object, location);

    def get_size(self):
        return _ObjCSG.get_size(self.object);

    def set_size(self, sz):
        return _ObjCSG.set_size(self.object, sz);

    def set_rotation(self, ro):
        return _ObjCSG.set_rotation(self.object, ro);

    def get_rotation(self):
        return _ObjCSG.get_rotation(self.object);

    def add_object(self, obj):
        print("Adding:");
        print self.object;
        print obj.get_object();
        return _ObjCSG.add_object(self.object, obj.get_object());

    def get_object(self):
        return self.object;

class CSGCutAway(ObjCSG):
    def is_cutaway_textures(self):
        return _CSGCutAway.is_cutaway_textures(self.object);

    def set_cutaway_textures(self, op):
        return _CSGCutAway.set_cutaway_textures(self.object, op);

class CSGUnion(ObjCSG):
     def __init__(self):
         self.object = _CSGUnion.new_csgunion(self);
     
class CSGDifference(CSGCutAway):
     def __init__(self):
         self.object = _CSGDifference.new_csgdifference(self);


class CSGMerge(ObjCSG):
     def __init__(self):
         self.object = _CSGMerge.new_csgmerge(self);


class CSGIntersection(CSGCutAway):
     def __init__(self):
         self.object = _CSGIntersection.new_csgintersection(self);
         
class Layer:
    def __init__(self):
        self.object = _Layer.new_layer(self)
        
    def add_object(self, obj):
        return _Layer.add_object(self.object, obj.get_object());

    def set_name(self, newname):
        return _Layer.set_name(self.object, newname)

    def get_name(self):
        return _Layer.get_name(self.object);
        
    def get_object(self):
        return self.object;
    
class Scene:  
    def add_layer(self, lay):
        return _Scene.add_layer(lay.get_object());
    
    def add_object(self, obj):
        return _Scene.add_object(obj.get_object());

class Torus(Object3DMaterial):
    def __init__(self):
        self.object = _Torus.new_torus(self)

    def get_location(self):
        return _Torus.get_location(self.object);

    def set_location(self, location):
        return _Torus.set_location(self.object, location);

    def get_minor_radius(self):
        return _Torus.get_minor_radius(self.object);
 
    def set_minor_radius(self, corn):
        return _Torus.set_minor_radius(self.object, corn);

    def get_major_radius(self):
        return _Torus.get_major_radius(self.object);
 
    def set_major_radius(self, corn):
        return _Torus.set_major_radius(self.object, corn);

    def get_size(self):
        return _Torus.get_size(self.object);

    def set_size(self, sz):
        return _Torus.set_size(self.object, sz);

    def set_rotation(self, ro):
        return _Torus.set_rotation(self.object, ro);

    def get_rotation(self):
        return _Torus.get_rotation(self.object);

    def is_sturm(self):
        return _Torus.is_sturm(self.object);

    def set_sturm(self, op):
        return _Torus.set_sturm(self.object, op)
    
    def get_object(self):
        return self.object;

class Disc(Object3DMaterial):
    def __init__(self):
        self.object = _Disc.new_disc(self)

    def get_location(self):
        return _Disc.get_location(self.object);

    def set_location(self, location):
        return _Disc.set_location(self.object, location);

    def get_radius(self):
        return _Disc.get_radius(self.object);
 
    def set_radius(self, corn):
        return _Disc.set_radius(self.object, corn);

    def get_hole_radius(self):
        return _Disc.get_hole_radius(self.object);
 
    def set_hole_radius(self, corn):
        return _Disc.set_hole_radius(self.object, corn);

    def get_size(self):
        return _Disc.get_size(self.object);

    def set_size(self, sz):
        return _Disc.set_size(self.object, sz);

    def set_rotation(self, ro):
        return _Disc.set_rotation(self.object, ro);

    def get_rotation(self):
        return _Disc.get_rotation(self.object);

    def get_object(self):
        return self.object;

class Bicubic(Object3DMaterial):
    def __init__(self):
        self.object = _Bicubic.new_bicubic(self)
        
    def get_location(self):
        return _Bicubic.get_location(self.object);

    def set_location(self, location):
        return _Bicubic.set_location(self.object, location);

    def get_ustep(self):
        return _Bicubic.get_ustep(self.object);
 
    def set_ustep(self, us):
        return _Bicubic.set_ustep(self.object, us);

    def get_vstep(self):
        return _Bicubic.get_vstep(self.object);
 
    def set_vstep(self, vs):
        return _Bicubic.set_vstep(self.object, vs);

    def get_flatness(self):
        return _Bicubic.get_flatness(self.object);
 
    def set_flatness(self, fn):
        return _Bicubic.set_flatness(self.object, fn);

    def get_control_point(self, cp):
        return _Bicubic.get_control_point(self.object, cp);
 
    def set_control_point(self, cp, pnt):
        return _Bicubic.set_control_point(self.object, cp, pnt);

    def get_size(self):
        return _Bicubic.get_size(self.object);

    def set_size(self, sz):
        return _Bicubic.set_size(self.object, sz);

    def set_rotation(self, ro):
        return _Bicubic.set_rotation(self.object, ro);

    def get_rotation(self):
        return _Bicubic.get_rotation(self.object);

    def is_edit(self):
        return _Bicubic.is_edit(self.object);

    def set_edit(self, op):
        return _Bicubic.set_edit(self.object, op)

    def is_preprocess(self):
        return _Bicubic.is_preprocess(self.object);

    def set_preprocess(self, op):
        return _Bicubic.set_preprocess(self.object, op)

    def get_object(self):
        return self.object;

    
class PointLight(Object3D):
    def __init__(self):
        self.object = _PointLight.new_pointlight(self);
    
    def get_location(self):
        return _PointLight.get_location(self.object);

    def set_location(self, location):
        return _PointLight.set_location(self.object, location);

    def get_color(self):
        return _PointLight.get_color(self.object);

    def set_color(self, colr):
        return _PointLight.set_color(self.object, colr);
    
    def is_media_attenuation(self):
        return _PointLight.is_media_attenuation(self.object);
    
    def set_media_attenuation(self, ma):
        return _PointLight.set_media_attenuation(self.object, ma)
    
    def is_area(self):
        return _PointLight.is_area(self.object);

    def set_area(self, ni):
        return _PointLight.set_area(self.object, ni)

    def is_media_interaction(self):
        return _PointLight.is_media_interaction(self.object);

    def set_media_interaction(self, media_interaction):
        return _PointLight.set_media_interaction(self.object, media_interaction)

    def is_refraction(self):
        return _PointLight.is_refraction(self.object);

    def set_refraction(self, refraction):
        return _PointLight.set_refraction(self.object, refraction)

    def is_reflection(self):
        return _PointLight.is_reflection(self.object);
    
    def set_reflection(self, nr):
        return _PointLight.set_reflection(self.object, nr)
    
    def is_parallel(self):
        return _PointLight.is_parallel(self.object);

    def set_parallel(self, parel):
        return _PointLight.set_parallel(self.object, parel)

    def is_fade(self):
        return _PointLight.is_fade(self.object);

    def set_fade(self, inver):
        return _PointLight.set_fade(self.object, inver)

    def get_fade_power(self):
        return _SpotLight.get_fade_power(self.object);

    def set_fade_power(self, pa):
        return _SpotLight.set_fade_power(self.object, pa);

    def get_fade_distance(self):
        return _SpotLight.get_fade_power(self.object);

    def set_fade_distance(self, pa):
        return _SpotLight.set_fade_distance(self.object, pa);

    def get_object(self):
        return self.object;

class AreaLight(PointLight):
    def __init__(self):
        self.object = _AreaLight.new_arealight(self);
    
    def get_rotation(self):
        return _AreaLight.get_rotation(self.object);

    def set_rotation(self, location):
        return _AreaLight.set_rotation(self.object, location);

    def get_size(self):
        return _AreaLight.get_size(self.object);

    def set_size(self, size):
        return _AreaLight.set_size(self.object, size);

    def get_size_x(self):
        return _AreaLight.get_size_x(self.object);

    def set_size_x(self, size):
        return _AreaLight.set_size_x(self.object, size);

    def get_size_z(self):
        return _AreaLight.get_size_z(self.object);

    def set_size_z(self, size):
        return _AreaLight.set_size_z(self.object, size);

    def get_adaptive(self):
        return _AreaLight.get_adaptive(self.object);

    def set_adaptive(self, ada):
        return _AreaLight.set_adaptive(self.object, ada);

    def is_jitter(self):
        return _AreaLight.is_jitter(self.object);
    
    def set_jitter(self, ma):
        return _AreaLight.set_jitter(self.object, ma)
    
    def is_circular(self):
        return _AreaLight.is_circular(self.object);

    def set_circular(self, ni):
        return _AreaLight.set_circular(self.object, ni)

    def is_orient(self):
        return _AreaLight.is_orient(self.object);

    def set_orient(self, media_interaction):
        return _AreaLight.set_orient(self.object, media_interaction)

    def is_parallel(self):
        return _AreaLight.is_parallel(self.object);

    def set_parallel(self, parel):
        return _AreaLight.set_parallel(self.object, parel)

    def get_object(self):
        return self.object;

class SpotLight(Object3D):
    def __init__(self):
        self.object = _SpotLight.new_spotlight(self);
    
    def get_location(self):
        return _SpotLight.get_location(self.object);

    def set_location(self, location):
        return _SpotLight.set_location(self.object, location);

    def get_point_at(self):
        return _SpotLight.get_point_at(self.object);

    def set_point_at(self, pa):
        return _SpotLight.set_point_at(self.object, pa);

    def get_fade_power(self):
        return _SpotLight.get_fade_power(self.object);

    def set_fade_power(self, pa):
        return _SpotLight.set_fade_power(self.object, pa);

    def get_fade_distance(self):
        return _SpotLight.get_fade_distance(self.object);

    def set_fade_distance(self, pa):
        return _SpotLight.set_fade_distance(self.object, pa);

    def get_falloff(self):
        return _SpotLight.get_falloff(self.object);

    def set_falloff(self, fo):
        return _SpotLight.set_falloff(self.object, fo);

    def get_tightness(self):
        return _SpotLight.get_tightness(self.object);

    def set_tightness(self, tig):
        return _SpotLight.set_tightness(self.object, tig);

    def get_radius(self):
        return _SpotLight.get_radius(self.object);

    def set_radius(self, fo):
        return _SpotLight.set_radius(self.object, fo);

    def get_color(self):
        return _SpotLight.get_color(self.object);

    def set_color(self, colr):
        return _SpotLight.set_color(self.object, colr);
    
    def is_media_attenuation(self):
        return _SpotLight.is_media_attenuation(self.object);
    
    def set_media_attenuation(self, ma):
        return _SpotLight.set_media_attenuation(self.object, ma)
    
    def is_area(self):
        return _SpotLight.is_area(self.object);

    def set_area(self, ni):
        return _SpotLight.set_area(self.object, ni)

    def is_media_interaction(self):
        return _SpotLight.is_media_interaction(self.object);

    def set_media_interaction(self, media_interaction):
        return _SpotLight.set_media_interaction(self.object, media_interaction)

    def is_refraction(self):
        return _SpotLight.is_refraction(self.object);

    def set_refraction(self, refraction):
        return _SpotLight.set_refraction(self.object, refraction)

    def is_show_frustum(self):
        return _SpotLight.is_show_frustum(self.object);

    def set_show_frustum(self, refraction):
        return _SpotLight.set_show_frustum(self.object, refraction)

    def is_reflection(self):
        return _SpotLight.is_reflection(self.object);
    
    def set_reflection(self, nr):
        return _SpotLight.set_reflection(self.object, nr)
    
    def is_parallel(self):
        return _SpotLight.is_parallel(self.object);

    def set_parallel(self, parel):
        return _SpotLight.set_parallel(self.object, parel);

    def is_fade(self):
        return _SpotLight.is_fade(self.object);

    def set_fade(self, inver):
        return _SpotLight.set_fade(self.object, inver);

    def get_object(self):
        return self.object;

class CylindricalLight(SpotLight):
    def __init__(self):
        self.object = _CylindricalLight.new_cylindricallight(self);

    def get_object(self):
        return self.object;

class ScriptObj(Object3DMaterial):
    def __init__(self):
        try:
            self.object = _App.my_cobject;
        except AttributeError:
            self.object = _ScriptObj.new_scriptobject(self);

    def get_location(self):
        return _ScriptObj.get_location(self.object);

    def set_location(self, location):
        return _ScriptObj.set_location(self.object, location);

    def get_size(self):
        return _ScriptObj.get_size(self.object);

    def set_size(self, sz):
        return _ScriptObj.set_size(self.object, sz);

    def set_rotation(self, ro):
        return _ScriptObj.set_rotation(self.object, ro);

    def get_rotation(self):
        return _ScriptObj.get_rotation(self.object);
    
    def add_triangle(self, x1, y1, z1, x2, y2, z2, x3, y3, z3):
        return _ScriptObj.add_triangle(self.object, x1, y1, z1, x2, y2, z2, x3, y3, z3 );

    def add_quad(self, x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4):
        return _ScriptObj.add_quad(self.object, x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4 );

    def clear_triangles(self):
        return _ScriptObj.clear_triangles(self.object);

    def clear_quads(self):
        return _ScriptObj.clear_quads(self.object);

    def new_int(self, name, val):
        return _ScriptObj.new_int(self.object, name, val);

    def new_float(self, name, val):
        return _ScriptObj.new_float(self.object, name, val);

    def new_double(self, name, val):
        return _ScriptObj.new_double(self.object, name, val);

    def new_string(self, name, val):
        return _ScriptObj.new_string(self.object, name, val);

    def set_int(self, name, val):
        return _ScriptObj.set_int(self.object, name, val);

    def set_float(self, name, val):
        return _ScriptObj.set_float(self.object, name, val);

    def set_double(self, name, val):
        return _ScriptObj.set_double(self.object, name, val);

    def set_string(self, name, val):
        return _ScriptObj.set_string(self.object, name, val);
    
    def get_int(self, name):
        return _ScriptObj.get_int(self.object, name);

    def get_float(self, name):
        return _ScriptObj.get_float(self.object, name);

    def get_double(self, name):
        return _ScriptObj.get_double(self.object, name);

    def get_string(self, name):
        return _ScriptObj.get_string(self.object, name);

    def set_script_path(self, val):
        return _ScriptObj.set_script_path(self.object, val);

    def get_script_path(self):
        return _ScriptObj.get_script_path(self.object);

    def set_pov_pass1(self, val):
        return _ScriptObj.set_pov_pass1(self.object, val);

    def set_pov_pass2(self, val):
        return _ScriptObj.set_pov_pass2(self.object, val);

    def set_has_rotation(self, val):
        return _ScriptObj.set_has_rotation(self.object, val);

    def set_has_location(self, val):
        return _ScriptObj.set_has_location(self.object, val);

    def set_has_scale(self, val):
        return _ScriptObj.set_has_scale(self.object, val);
    
    def set_has_material(self, val):
        return _ScriptObj.set_has_material(self.object, val);

    def set_has_editbutton(self, val):
        return _ScriptObj.set_has_editbutton(self.object, val);
    
    def get_object(self):
        return self.object;


