Index
Modules:
traynim/cameras
,
traynim/colors
,
traynim/common
,
traynim/hdrimages
,
traynim/hitRecord
,
traynim/imageTracer
,
traynim/lights
,
traynim/materials
,
traynim/pcg
,
traynim/ray
,
traynim/render
,
traynim/sceneFiles
,
traynim/shapes
,
traynim/shapesDef
,
traynim/transformations
,
traynim/world
.
API symbols
`$`:
colors: `$`(color: Color): string
sceneFiles: `$`(loc: SourceLocation): string
transformations: `$`(m: Matrix4x4): string
transformations: `$`(t: Transformation): string
`*`:
colors: `*`(color1, color2: Color): Color
colors: `*`(col: Color; scalar: float32): Color
colors: `*`(scalar: float32; col: Color): Color
transformations: `*`(t: Transformation; n: Normal): Normal
transformations: `*`(t: Transformation; p: Point): Point
transformations: `*`(t1, t2: Transformation): Transformation
transformations: `*`(t: Transformation; v: Vec): Vec
`+`:
colors: `+`(color1, color2: Color): Color
`-`:
colors: `-`(color1, color2: Color): Color
`/`:
colors: `/`(col: Color; scalar: float): Color
addLight:
world: addLight(world: var World; light: PointLight)
addShape:
world: addShape(world: var World; shape: Shape)
areClose:
colors: areClose(color1, color2: Color; epsilon = 0.00001): bool
common: areClose(a`gensym0, b`gensym0: float32; epsilon`gensym0 = 0.00001): bool
common: areClose(a`gensym1, b`gensym1: float64; epsilon`gensym1 = 0.00001): bool
hitRecord: areClose(self: HitRecord; other: Option[HitRecord]; epsilon = 0.00001): bool
ray: areClose(a, b: Ray; epsilon = 0.00001): bool
transformations: areClose(m1, m2: Matrix4x4; epsilon = 0.00001): bool
transformations: areClose(t1, t2: Transformation; epsilon = 0.00001): bool
at:
ray: at(ray: Ray; t: float64): Point
averageLuminosity:
hdrimages: averageLuminosity(img: HdrImage; delta = 1e-10): float32
black:
colors: black
BRDF:
materials: BRDF
call:
render: call(renderer: FlatRenderer; ray: Ray): Color
render: call(renderer: OnOffRenderer; ray: Ray): Color
render: call(renderer: PathTracer; ray: Ray): Color
render: call(renderer: PointLightRenderer; ray: Ray): Color
render: call(renderer: Renderer; ray: Ray): Color
Camera:
cameras: Camera
CAMERA:
KeywordEnum.CAMERA
CHECKERED:
KeywordEnum.CHECKERED
CheckeredPigment:
materials: CheckeredPigment
clampImage:
hdrimages: clampImage(img: var HdrImage)
Color:
colors: Color
DIFFUSE:
KeywordEnum.DIFFUSE
DiffuseBRDF:
materials: DiffuseBRDF
eval:
materials: eval(brdf: BRDF; normal: Normal; inDir: Vec; outDir: Vec; uv: Vec2d): Color
materials: eval(brdf: DiffuseBRDF; normal: Normal; inDir: Vec; outDir: Vec; uv: Vec2d): Color
materials: eval(brdf: SpecularBRDF; normal: Normal; inDir: Vec; outDir: Vec; uv: Vec2d): Color
expectIdentifier:
sceneFiles: expectIdentifier(inputS: var InputStream): string
expectKeywords:
sceneFiles: expectKeywords(inputS: var InputStream; inputKeywords: seq[KeywordEnum]): KeywordEnum
expectNumber:
sceneFiles: expectNumber(inputS: var InputStream; scene: Scene): float
expectString:
sceneFiles: expectString(inputS: var InputStream): string
expectSymbol:
sceneFiles: expectSymbol(inputS: var InputStream; sym: char)
fireAllRays:
imageTracer: fireAllRays(imagetracer: var ImageTracer; fun: (Ray) -> Color)
fireRay:
cameras: fireRay(c: Camera; u: float64; v: float64): Ray
cameras: fireRay(c: OrthogonalCamera; u: float64; v: float64): Ray
cameras: fireRay(c: PerspectiveCamera; u: float64; v: float64): Ray
imageTracer: fireRay(imagetracer: ImageTracer; col, row: int; uPixel = 0.5; vPixel = 0.5): Ray
FlatRenderer:
render: FlatRenderer
FLOAT:
KeywordEnum.FLOAT
getColor:
materials: getColor(pigment: CheckeredPigment; vec2d: Vec2d): Color
materials: getColor(pigment: ImagePigment; vec2d: Vec2d): Color
materials: getColor(pigment: Pigment; vec2d: Vec2d): Color
materials: getColor(pigment: UniformPigment; vec2d: Vec2d): Color
getColor1:
materials: getColor1(pigment: CheckeredPigment): Color
getColor2:
materials: getColor2(pigment: CheckeredPigment): Color
getPixel:
hdrimages: getPixel(img: HdrImage; x, y: int): colors.Color
getStepsNum:
materials: getStepsNum(pigment: CheckeredPigment): int
GrammarError:
sceneFiles: GrammarError
HdrImage:
hdrimages: HdrImage
HitRecord:
hitRecord: HitRecord
identifier:
TokenType.identifier
IDENTITY:
KeywordEnum.IDENTITY
IdentityMatrix4x4:
transformations: IdentityMatrix4x4
IMAGE:
KeywordEnum.IMAGE
ImagePigment:
materials: ImagePigment
ImageTracer:
imageTracer: ImageTracer
InputStream:
sceneFiles: InputStream
InvalidPfmFileFormat:
hdrimages: InvalidPfmFileFormat
inverse:
transformations: inverse(t: Transformation): Transformation
isConsistent:
transformations: isConsistent(t: Transformation): bool
isPointVisible:
world: isPointVisible(world: World; point: Point; observerPos: Point): bool
keyword:
TokenType.keyword
KeywordEnum:
sceneFiles: KeywordEnum
LIGHT:
KeywordEnum.LIGHT
literalNumber:
TokenType.literalNumber
literalString:
TokenType.literalString
luminosity:
colors: luminosity(color: Color): float32
Material:
materials: Material
MATERIAL:
KeywordEnum.MATERIAL
Matrix4x4:
transformations: Matrix4x4
matrixProd:
transformations: matrixProd(m1, m2: Matrix4x4): Matrix4x4
NEW:
KeywordEnum.NEW
newBaseRenderer:
render: newBaseRenderer(renderer: Renderer; world: World; backgroundColor = black)
newBRDF:
materials: newBRDF(pigment: Pigment = newUniformPigment(white)): BRDF
newCheckeredPigment:
materials: newCheckeredPigment(color1, color2: Color; stepsNum = 10): CheckeredPigment
newColor:
colors: newColor(r, g, b: float32): Color
newDiffuseBRDF:
materials: newDiffuseBRDF(pigment: Pigment = newUniformPigment(white); reflectance = 1.0): DiffuseBRDF
newFlatRenderer:
render: newFlatRenderer(world: World; backgroundColor = black): FlatRenderer
newHDRImage:
hdrimages: newHDRImage(width, height: int): HdrImage
newHitRecord:
hitRecord: newHitRecord(worldPoint: Point; normal: Normal; surfacePoint: Vec2d; t: float; ray: Ray; shape = Shape()): HitRecord
newImagePigment:
materials: newImagePigment(image: HdrImage): ImagePigment
newImageTracer:
imageTracer: newImageTracer(image: HdrImage; camera: Camera; samplesPerSide: int = 0; pcg: PCG = newPCG()): ImageTracer
newInputStream:
sceneFiles: newInputStream(stream: Stream; fileName = ""; tabulations = 8): InputStream
newMaterial:
materials: newMaterial(brdf: BRDF = newBRDF(); emittedRadiance: Pigment = newUniformPigment(black)): Material
newOnOffRenderer:
render: newOnOffRenderer(world: World; backgroundColor = black; color = white): OnOffRenderer
newOrthogonalCamera:
cameras: newOrthogonalCamera(aspectRatio = 1.0; transformation = newTransformation()): OrthogonalCamera
newPathTracer:
render: newPathTracer(world: World; backgroundColor = black; pcg: PCG; raysNum = 10; maxDepth = 2; rouletteMax = 3): PathTracer
newPCG:
pcg: newPCG(initState: uint64 = 42; initSeq: uint64 = 54): PCG
newPerspectiveCamera:
cameras: newPerspectiveCamera(aspectRatio = 1.0; screenDistance = 1.0; transformation = newTransformation()): PerspectiveCamera
newPlane:
shapes: newPlane(transformation = newTransformation(); material: Material = newMaterial()): Plane
newPointLight:
lights: newPointLight(position: Point; color: Color; linearRadius: float = 0.0): PointLight
newPointLightRenderer:
render: newPointLightRenderer(world: World; backgroundColor: Color = black; ambientColor: Color = newColor(0.1, 0.1, 0.1)): PointLightRenderer
newRay:
ray: newRay(origin: Point; dir: Vec; tmin = 0.00001; tmax = Inf; depth = 0): Ray
newScene:
sceneFiles: newScene(): Scene
newSpecularBRDF:
materials: newSpecularBRDF(pigment: Pigment = newUniformPigment(white); thresholdAngleRad = PI / 1800.0): SpecularBRDF
newSphere:
shapes: newSphere(transformation = newTransformation(); material: Material = newMaterial()): Sphere
newTransformation:
transformations: newTransformation(m = IdentityMatrix4x4; invm = IdentityMatrix4x4): Transformation
newUniformPigment:
materials: newUniformPigment(color: Color): UniformPigment
newWorld:
world: newWorld(): World
normalizeImage:
hdrimages: normalizeImage(img: var HdrImage; factor: float32; luminosity = averageLuminosity(img))
OnOffRenderer:
render: OnOffRenderer
ORTHOGONAL:
KeywordEnum.ORTHOGONAL
OrthogonalCamera:
cameras: OrthogonalCamera
parseBRDF:
sceneFiles: parseBRDF(inputS: var InputStream; scene: Scene): BRDF
parseCamera:
sceneFiles: parseCamera(inputS: var InputStream; scene: Scene): Camera
parseColor:
sceneFiles: parseColor(InputS: var InputStream; scene: Scene): Color
parseEndianness:
hdrimages: parseEndianness(line: string): Endianness
parseImgSize:
hdrimages: parseImgSize(line: string): tuple
parseLight:
sceneFiles: parseLight(inputS: var InputStream; scene: Scene): PointLight
parseMaterial:
sceneFiles: parseMaterial(inputS: var InputStream; scene: Scene): coupleMat
parsePigment:
sceneFiles: parsePigment(inputS: var InputStream; scene: Scene): Pigment
parsePlane:
sceneFiles: parsePlane(inputS: var InputStream; scene: Scene): Plane
parseScene:
sceneFiles: parseScene(inputS: var InputStream; variables: Table[string, float] = initTable()): Scene
parseSphere:
sceneFiles: parseSphere(inputS: var InputStream; scene: Scene): Sphere
parseStringToken:
sceneFiles: parseStringToken(inputS: var InputStream; location: SourceLocation): Token
parseTransformation:
sceneFiles: parseTransformation(inputS: var InputStream; scene: Scene): Transformation
parseVector:
sceneFiles: parseVector(inputS: var InputStream; scene: Scene): Vec
PathTracer:
render: PathTracer
PCG:
pcg: PCG
PERSPECTIVE:
KeywordEnum.PERSPECTIVE
PerspectiveCamera:
cameras: PerspectiveCamera
Pigment:
materials: Pigment
pixelOffset:
hdrimages: pixelOffset(img: HdrImage; x, y: int): int
PLANE:
KeywordEnum.PLANE
Plane:
shapes: Plane
PointLight:
lights: PointLight
PointLightRenderer:
render: PointLightRenderer
quickRayIntersection:
shapes: quickRayIntersection(plane: Plane; ray: Ray): bool
shapes: quickRayIntersection(shape: Shape; ray: Ray): bool
shapes: quickRayIntersection(sphere: Sphere; ray: Ray): bool
random:
pcg: random(pcg: var PCG): uint32
randomFloat:
pcg: randomFloat(pcg: var PCG): float
Ray:
ray: Ray
rayIntersection:
shapes: rayIntersection(plane: Plane; ray: Ray): Option[HitRecord]
shapes: rayIntersection(s: Shape; ray: Ray): Option[HitRecord]
shapes: rayIntersection(sphere: Sphere; ray: Ray): Option[HitRecord]
world: rayIntersection(world: World; ray: Ray): Option[HitRecord]
readChar:
sceneFiles: readChar(inputS: var InputStream): char
readPfmImage:
hdrimages: readPfmImage(stream: Stream): HdrImage
readToken:
sceneFiles: readToken(inputS: var InputStream): Token
Renderer:
render: Renderer
ROTATIONX:
KeywordEnum.ROTATIONX
rotationX:
transformations: rotationX(theta: float64): Transformation
ROTATIONY:
KeywordEnum.ROTATIONY
rotationY:
transformations: rotationY(theta: float64): Transformation
ROTATIONZ:
KeywordEnum.ROTATIONZ
rotationZ:
transformations: rotationZ(theta: float64): Transformation
SCALING:
KeywordEnum.SCALING
scaling:
transformations: scaling(v: Vec): Transformation
scatterRay:
materials: scatterRay(brdf: BRDF; pcg: var PCG; incomingDir: Vec; interactionPoint: Point; normal: Normal; depth: int): Ray
materials: scatterRay(brdf: DiffuseBRDF; pcg: var PCG; incomingDir: Vec; interactionPoint: Point; normal: Normal; depth: int): Ray
materials: scatterRay(brdf: SpecularBRDF; pcg: var PCG; incomingDir: Vec; interactionPoint: Point; normal: Normal; depth: int): Ray
Scene:
sceneFiles: Scene
setPixel:
hdrimages: setPixel(img: var HdrImage; x, y: int; newColor: colors.Color)
Shape:
shapesDef: Shape
skipWhiteSpAndComments:
sceneFiles: skipWhiteSpAndComments(inputS: var InputStream)
SourceLocation:
sceneFiles: SourceLocation
SPECULAR:
KeywordEnum.SPECULAR
SpecularBRDF:
materials: SpecularBRDF
SPHERE:
KeywordEnum.SPHERE
Sphere:
shapes: Sphere
sphereNormal:
shapes: sphereNormal(p: Point; rayDir: Vec): Normal
spherePointToUV:
shapes: spherePointToUV(p: Point): Vec2d
stopToken:
TokenType.stopToken
symbol:
TokenType.symbol
SYMBOLS:
sceneFiles: SYMBOLS
Token:
sceneFiles: Token
TokenType:
sceneFiles: TokenType
TokenValue:
sceneFiles: TokenValue
transform:
ray: transform(ray: Ray; transformation: Transformation): Ray
Transformation:
transformations: Transformation
TRANSLATION:
KeywordEnum.TRANSLATION
translation:
transformations: translation(v: Vec): Transformation
UNIFORM:
KeywordEnum.UNIFORM
UniformPigment:
materials: UniformPigment
unreadChar:
sceneFiles: unreadChar(inputS: var InputStream; ch: char)
unreadToken:
sceneFiles: unreadToken(inputS: var InputStream; token: Token)
updatePos:
sceneFiles: updatePos(inputS: var InputStream; ch: char)
validCoordinates:
hdrimages: validCoordinates(img: HdrImage; x, y: int): bool
white:
colors: white
WHITESPACE:
sceneFiles: WHITESPACE
World:
world: World
writeLdrImage:
hdrimages: writeLdrImage(img: HdrImage; outputPath: string; gamma = 1.0)
writePfmImage:
hdrimages: writePfmImage(img: HdrImage; stream: Stream; endianness = littleEndian)