PhotoGENius V1.0.0
A basic library for generating photorealistic images, developed for the course Numerical techniques for photorealistic image generation.
Static Public Member Functions | List of all members
PGENLib.ExpectParse Class Reference

Static Public Member Functions

static void expect_symbol (InputStream inputFile, string symbol)
 Read a token from inputFile and check that it matches symbol. More...
 
static KeywordList expect_keywords (InputStream inputFile, List< KeywordList > keywords)
 Read a token from inputFile and check that it is one of the keywords in keywords. Return the keyword as a class :class:'.KeywordList` object. More...
 
static float expect_number (InputStream inputFile, Scene scene)
 Read a token from inputFile and check that it is either a literal number or a variable in scene. Return the number as a float. More...
 
static string expect_string (InputStream inputFile)
 Read a token from inputFile and check that it is a literal string. Return the value of the string(a str). More...
 
static string expect_identifier (InputStream inputFile)
 Read a token from inputFile and check that it is an identifier. Return the name of the identifier. More...
 
static Vec parse_vector (InputStream inputFile, Scene scene)
 Parse symbles and numbers to return a vector of floats More...
 
static Point parse_point (InputStream inputFile, Scene scene)
 Parse symbles and numbers to return a point of floats More...
 
static Color parse_color (InputStream inputFile, Scene scene)
 Parse a Color object from a file and store it into memory. More...
 
static Pigment parse_pigment (InputStream inputFile, Scene scene)
 Parse a Pigment object from a file and store it into memory. More...
 
static BRDF parse_brdf (InputStream inputFile, Scene scene)
 Parse a BRDF object from a file and store it into memory. More...
 
static Tuple< string, Materialparse_material (InputStream inputFile, Scene scene)
 Parse a Material object and its name from a file and store it into memory. More...
 
static Transformation parse_transformation (InputStream inputFile, Scene scene)
 Parse a Transformation object from a file and store it into memory. More...
 
static Sphere parse_sphere (InputStream inputFile, Scene scene)
 Parse a Sphere object from a file and store it into memory. More...
 
static Cylinder parse_cylinder (InputStream inputFile, Scene scene)
 Parse a Cylinder object from a file and store it into memory. More...
 
static XyPlane parse_plane (InputStream inputFile, Scene scene)
 Parse a Plane object from a file and store it into memory. More...
 
static PointLight parse_pointlight (InputStream inputFile, Scene scene)
 
static ICamera parse_camera (InputStream inputFile, Scene scene)
 Parse a Camera object from a file and store it into memory. More...
 
static Scene parse_scene (InputStream inputFile, Dictionary< string, float > variables)
 Read a scene description from a stream and return a :class:.Scene object More...
 

Member Function Documentation

◆ expect_identifier()

static string PGENLib.ExpectParse.expect_identifier ( InputStream  inputFile)
static

Read a token from inputFile and check that it is an identifier. Return the name of the identifier.

Parameters
inputFile
Returns

◆ expect_keywords()

static KeywordList PGENLib.ExpectParse.expect_keywords ( InputStream  inputFile,
List< KeywordList keywords 
)
static

Read a token from inputFile and check that it is one of the keywords in keywords. Return the keyword as a class :class:'.KeywordList` object.

Parameters
inputFile
keywords
Returns

◆ expect_number()

static float PGENLib.ExpectParse.expect_number ( InputStream  inputFile,
Scene  scene 
)
static

Read a token from inputFile and check that it is either a literal number or a variable in scene. Return the number as a float.

Parameters
inputFile
scene
Returns

◆ expect_string()

static string PGENLib.ExpectParse.expect_string ( InputStream  inputFile)
static

Read a token from inputFile and check that it is a literal string. Return the value of the string(a str).

Parameters
inputFile
Returns

◆ expect_symbol()

static void PGENLib.ExpectParse.expect_symbol ( InputStream  inputFile,
string  symbol 
)
static

Read a token from inputFile and check that it matches symbol.

Parameters
inputFile
symbol

◆ parse_brdf()

static BRDF PGENLib.ExpectParse.parse_brdf ( InputStream  inputFile,
Scene  scene 
)
static

Parse a BRDF object from a file and store it into memory.

Parameters
inputFile
scene
Returns
Exceptions
Exception

◆ parse_camera()

static ICamera PGENLib.ExpectParse.parse_camera ( InputStream  inputFile,
Scene  scene 
)
static

Parse a Camera object from a file and store it into memory.

Parameters
inputFile
scene
Returns

◆ parse_color()

static Color PGENLib.ExpectParse.parse_color ( InputStream  inputFile,
Scene  scene 
)
static

Parse a Color object from a file and store it into memory.

Parameters
inputFile
scene
Returns

◆ parse_cylinder()

static Cylinder PGENLib.ExpectParse.parse_cylinder ( InputStream  inputFile,
Scene  scene 
)
static

Parse a Cylinder object from a file and store it into memory.

Parameters
inputFile
scene
Returns
Exceptions
GrammarErrorException

◆ parse_material()

static Tuple< string, Material > PGENLib.ExpectParse.parse_material ( InputStream  inputFile,
Scene  scene 
)
static

Parse a Material object and its name from a file and store it into memory.

Parameters
inputFile
scene
Returns

◆ parse_pigment()

static Pigment PGENLib.ExpectParse.parse_pigment ( InputStream  inputFile,
Scene  scene 
)
static

Parse a Pigment object from a file and store it into memory.

Parameters
inputFile
scene
Returns
Exceptions
Exception

◆ parse_plane()

static XyPlane PGENLib.ExpectParse.parse_plane ( InputStream  inputFile,
Scene  scene 
)
static

Parse a Plane object from a file and store it into memory.

Parameters
inputFile
scene
Returns
Exceptions
GrammarErrorException

◆ parse_point()

static Point PGENLib.ExpectParse.parse_point ( InputStream  inputFile,
Scene  scene 
)
static

Parse symbles and numbers to return a point of floats

Parameters
inputFile
scene
Returns

◆ parse_scene()

static Scene PGENLib.ExpectParse.parse_scene ( InputStream  inputFile,
Dictionary< string, float >  variables 
)
static

Read a scene description from a stream and return a :class:.Scene object

Parameters
inputFile
variables
Returns

◆ parse_sphere()

static Sphere PGENLib.ExpectParse.parse_sphere ( InputStream  inputFile,
Scene  scene 
)
static

Parse a Sphere object from a file and store it into memory.

Parameters
inputFile
scene
Returns
Exceptions
GrammarErrorException

◆ parse_transformation()

static Transformation PGENLib.ExpectParse.parse_transformation ( InputStream  inputFile,
Scene  scene 
)
static

Parse a Transformation object from a file and store it into memory.

Parameters
inputFile
scene
Returns

◆ parse_vector()

static Vec PGENLib.ExpectParse.parse_vector ( InputStream  inputFile,
Scene  scene 
)
static

Parse symbles and numbers to return a vector of floats

Parameters
inputFile
scene
Returns

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