This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| glUseProgram(geometryShader); | |
| glUniformMatrix4fv(modelMatUniform, 1, GL_FALSE, &(modelMat[0][0])); | |
| glUniformMatrix4fv(viewMatUniform, 1, GL_FALSE, &(view[0][0])); | |
| glUniformMatrix4fv(projectionMatUniform, 1, GL_FALSE, &(projection[0][0])); | |
| for(auto& object : objects) { | |
| glBindVertexArray(object.vao); | |
| glDrawArrays(GL_TRIANGLES, 0, object.nVerts); | |
| glBindVertexArray(0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| This file is part of TinyRender, an educative rendering system. | |
| Designed for ECSE 446/546 Realistic/Advanced Image Synthesis. | |
| Derek Nowrouzezahrai, McGill University. | |
| */ | |
| #pragma once | |
| TR_NAMESPACE_BEGIN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if(hit && getEmission(si_2) != v3f(0.f)) { | |
| float emPdf; | |
| size_t id = selectEmitter(sampler.next(), emPdf); | |
| const Emitter& em = getEmitterByID(id); | |
| v3f emCenter = scene.getShapeCenter(em.shapeID); | |
| float emRadius = scene.getShapeRadius(em.shapeID); | |
| v3f Le = em.radiance; //NOT SURE | |
| v3f brdfVal = v3f(0.f); //NOT SURE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //OK | |
| List<String> names = new ArrayList<String>(); | |
| //NOT OK | |
| String a = "cat"; | |
| List<(a.getClass())> names2 = new ArrayList(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Arrays; | |
| import java.util.HashSet; | |
| import java.util.LinkedList; | |
| import java.util.List; | |
| import java.util.Scanner; | |
| import java.util.Set; | |
| public class Solution { | |
| private static final Scanner scanner = new Scanner(System.in); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Arrays; | |
| import java.util.HashSet; | |
| import java.util.LinkedList; | |
| import java.util.List; | |
| import java.util.Scanner; | |
| import java.util.Set; | |
| public class Solution { | |
| private static final Scanner scanner = new Scanner(System.in); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Arrays; | |
| import java.util.HashSet; | |
| import java.util.LinkedList; | |
| import java.util.List; | |
| import java.util.Scanner; | |
| import java.util.Set; | |
| public class Solution { | |
| private static final Scanner scanner = new Scanner(System.in); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.math.BigDecimal; | |
| import java.util.Arrays; | |
| import java.util.HashSet; | |
| import java.util.LinkedList; | |
| import java.util.List; | |
| import java.util.Scanner; | |
| import java.util.Set; | |
| public class Solution { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; | |
| import java.net.URL; | |
| import java.util.ArrayList; | |
| import java.util.Arrays; | |
| import java.util.Collections; | |
| import java.util.List; | |
| import java.util.Scanner; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; | |
| import java.net.URL; | |
| import java.util.ArrayList; | |
| import java.util.Collections; | |
| import java.util.HashMap; | |
| import java.util.List; | |
| import java.util.Map; |
OlderNewer