<s> import warnings <EOL> from . . utils import PyDyUserWarning <EOL> from . shapes import Shape <EOL> from . visualization_frame import VisualizationFrame <EOL> __all__ = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> warnings . simplefilter ( '<STR_LIT>' , PyDyUserWarning ) <EOL> class PerspectiveCamera ( VisualizationFrame ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> args = list ( args ) + [ Shape ( ) ] <EOL> super ( PerspectiveCamera , self ) . __init__ ( * args ) <EOL> self . fov = <NUM_LIT> <EOL> self . near = <NUM_LIT:1.0> <EOL> self . far = <NUM_LIT> <EOL> for k , v in kwargs . items ( ) : <EOL> setattr ( self , k , v ) <EOL> def __str__ ( self ) : <EOL> return '<STR_LIT>' + self . name <EOL> def __repr__ ( self ) : <EOL> return '<STR_LIT>' <EOL> @ property <EOL> def fov ( self ) : <EOL> return self . _fov <EOL> @ fov . setter <EOL> def fov ( self , new_fov ) : <EOL> self . _fov = float ( new_fov ) <EOL> @ property <EOL> def near ( self ) : <EOL> return self . _near <EOL> @ near . setter <EOL> def near ( self , new_near ) : <EOL> self . _near = float ( new_near ) <EOL> @ property <EOL> def far ( self ) : <EOL> return self . _far <EOL> @ far . setter <EOL> def far ( self , new_far ) : <EOL> self . _far = float ( new_far ) <EOL> def generate_scene_dict ( self , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> scene_dict = super ( PerspectiveCamera , self ) . generate_scene_dict ( ** kwargs ) <EOL> scene_dict [ id ( self ) ] [ '<STR_LIT:type>' ] = self . __class__ . __name__ <EOL> scene_dict [ id ( self ) ] [ '<STR_LIT>' ] = self . fov <EOL> scene_dict [ id ( self ) ] [ '<STR_LIT>' ] = self . near <EOL> scene_dict [ id ( self ) ] [ '<STR_LIT>' ] = self . far <EOL> return scene_dict <EOL> class OrthoGraphicCamera ( VisualizationFrame ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> args = list ( args ) + [ Shape ( ) ] <EOL> super ( OrthoGraphicCamera , self ) . __init__ ( * args ) <EOL> self . near = <NUM_LIT:1.0> <EOL> self . far = <NUM_LIT> <EOL> for k , v in kwargs . items ( ) : <EOL> setattr ( self , k , v ) <EOL> def __str__ ( self ) : <EOL> return self . __class__ . __name__ + '<STR_LIT>' + self . name <EOL> def __repr__ ( self ) : <EOL> return self . __class__ . __name__ <EOL> @ property <EOL> def near ( self ) : <EOL> return self . _near <EOL> @ near . setter <EOL> def near ( self , new_near ) : <EOL> self . _near = float ( new_near ) <EOL> @ property <EOL> def far ( self ) : <EOL> return self . _far <EOL> @ far . setter <EOL> def far ( self , new_far ) : <EOL> self . _far = float ( new_far ) <EOL> def generate_scene_dict ( self , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> scene_dict = super ( OrthoGraphicCamera , self ) . generate_scene_dict ( ** kwargs ) <EOL> scene_dict [ id ( self ) ] [ '<STR_LIT:type>' ] = self . __class__ . __name__ <EOL> scene_dict [ id ( self ) ] [ '<STR_LIT>' ] = self . near <EOL> scene_dict [ id ( self ) ] [ '<STR_LIT>' ] = self . far <EOL> return scene_dict </s>
