photonmap.Loader.LoadCaptor =========================== .. py:module:: photonmap.Loader.LoadCaptor Classes ------- .. autoapisummary:: photonmap.Loader.LoadCaptor.Captor Functions --------- .. autoapisummary:: photonmap.Loader.LoadCaptor.addVirtualCaptors photonmap.Loader.LoadCaptor.addFaceCaptors photonmap.Loader.LoadCaptor.findIndexOfDiskCaptorInList photonmap.Loader.LoadCaptor.addCaptorPgl Module Contents --------------- .. py:class:: Captor A class which contains all the data of captor. Attributes ---------- xSite: float The X coordinate of captor's position ySite: float The Y coordinate of captor's position zSite: float The Z coordinate of captor's position xNormal: float The X coordinate of captor's normal yNormal: float The Y coordinate of captor's normal zNormal: float The Z coordinate of captor's normal radius: float The radius of captor vertices: array The vertices of captor's geometry normals: array The normal vectors of each vertices in captor's geometry triangles: array The triangles of captor's geometry .. py:method:: initCaptor(shape, position, scale_factor, captor_type) Init a object of face captor Returns ------- shape: Shape The geometry and material of captor position : tuple(int,int,int) The position of captor scale_factor: int The size of geometries. The vertices of geometries is recalculated by dividing their coordinates by this value captor_type: str "VirtualCaptor" or "FaceCaptor" .. py:method:: initVirtualDiskCaptor(pos=(0, 0, 0), nor=(0, 0, 0), r=0, captor_id=0) Init a object of virtual disk shape captor Returns ------- pos: tuple The position of captor nor: tuple The normal vector of captor r: float The radius of captor captor_id: int The id of captor .. py:method:: createVirtualDisk() Create geometry of circular captor Returns ------- vertices: array The vertices of captor's geometry normals: array The normal vectors of each vertices in captor's geometry triangles: array The triangles of captor's geometry .. py:method:: equal(xSite, ySite, zSite) Check if the coordinate is equal to the position of captor Parameters ---------- xSite: float The X coordinate ySite: float The Y coordinate zSite: float The Z coordinate Returns ------- True if equal False if not equal .. py:method:: getGeometry() Get geometry of captor Returns ------- vertices: array The vertices of captor's geometry normals: array The normal vectors of each vertices in captor's geometry triangles: array The triangles of captor's geometry .. py:method:: getOpticalProperties() Get optical properties of captor Returns ------- refl: float The reflection specular: float The specular trans: float The tranparency roughness: float The roughness .. py:function:: addVirtualCaptors(scene, virtual_captor_triangle_dict, list_virtual_captor) Adds virtual captors to the scene. Parameters ---------- scene : libphotonmap_core.Scene The photon mapping scene used to run the simulation virtual_captor_triangle_dict : dict The dictionary of the triangles of captors list_virtual_captor : array The list of virtual captor Returns ------- Add all the mesh of virtual captors to the scene .. py:function:: addFaceCaptors(scene, face_captor_triangle_dict, list_face_captor) Adds face captors to the scene. Parameters ---------- scene : libphotonmap_core.Scene The photon mapping scene used to run the simulation face_captor_triangle_dict : dict The dictionary of the triangles of captors list_face_captor : array The list of face captor Returns ------- Add all the mesh of face captors to the scene .. py:function:: findIndexOfDiskCaptorInList(list_captor, x, y, z) Find the index of a disk shape captor while knowing its position Parameters ---------- list_captor : Array The list of the captor in the scene x : float x coordinate y : float y coordinate z : float z coordinate Returns ------- if not found, return -1 if found, return the index of the captor .. py:function:: addCaptorPgl(sc, list_captor) Add the captors to the PlantGL scene to visualize the scene Parameters ---------- sc : Lscene The plantgl scene list_captor : array The list of captors Returns ------- A PlantGL Scene with the captors