tvaLib
Public Member Functions | Public Attributes | List of all members
lib.scene.ObjFrameTable Class Reference

Objects References. More...

Public Member Functions

def __init__ (self, objects)
 
def getExposureAtInstant (self, t, frames=300)
 

Public Attributes

 lastFrame
 Grab last frame. More...
 
 table
 Generate table. More...
 

Detailed Description

Objects References.

This is a map of all object's existance in any frame

Definition at line 1576 of file scene.py.

Constructor & Destructor Documentation

◆ __init__()

def lib.scene.ObjFrameTable.__init__ (   self,
  objects 
)

Definition at line 1579 of file scene.py.

1579  def __init__(self, objects):
1580 
1581  self.lastFrame = 0
1582  if(objects is not None):
1583  for object_ in objects:
1584  if(object_.getLastInstant() > self.lastFrame): self.lastFrame = object_.getLastInstant()
1585 
1586  self.table = [[] for x in range(self.lastFrame)]
1587  if(objects is not None):
1588  for object_ in objects:
1589  for x in object_.getTimeInterval():
1590  self.table[x-1].append(object_.num)
1591  return
1592 

Member Function Documentation

◆ getExposureAtInstant()

def lib.scene.ObjFrameTable.getExposureAtInstant (   self,
  t,
  frames = 300 
)

Definition at line 1593 of file scene.py.

1593  def getExposureAtInstant(self, t, frames=300):
1594  return len(list(set(tvaLib.flatten_list(self.table[max(0,t-int(frames/2.0)):min(len(self.table),t+int(frames/2.0))]))))
1595 

Member Data Documentation

◆ lastFrame

lib.scene.ObjFrameTable.lastFrame

Grab last frame.

Definition at line 1581 of file scene.py.

◆ table

lib.scene.ObjFrameTable.table

Generate table.

Definition at line 1586 of file scene.py.


The documentation for this class was generated from the following file: