Commit 8172b2fa authored by Simon Barner's avatar Simon Barner
Browse files

RED

refs 2490
parent 211b99da
.ratings 7beea2262dcfbfd1bd3a9a4bed767a3146157889 GREEN
ColorUtil.java 0eced71852172ba1bb4b3ab9c2a0371665ac209b GREEN
FloatBufferUtils.java c1b35aa2e32d25d12780d7b552333cfb7d84c4d8 GREEN
GLPrimitives.java 49d10b15b9489f01cb4c7656fce01331e6b41ebd GREEN
Graph3DUtil.java 8176896a789684c7623a6793fb0b91622decd2af GREEN
GLPrimitives.java b5d93a42e4e31c77d24c7e1bcd712dd44ec0ba95 RED
Graph3DUtil.java 98c5fbfb65ef4322e0d5bc73654168cb9b57deb2 RED
package.html 88a994ffc5b937b445fa44d6fe6e6ed48fffdd15 GREEN
......@@ -135,6 +135,7 @@ public class GLPrimitives {
/** Initializes basic GL properties for 3D rendering. */
public static void initializeGLfor3D(int width, int height, float fieldOfViewAngle,
float aspect, float nearDistance, float farDistance) {
// TODO (SB, 13): Introduce constants, or add a short comment about what this section does.
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
......@@ -178,6 +179,7 @@ public class GLPrimitives {
* object picker. This method returns the hits counted during picking render run. The results of
* the picking run are stored.
*/
// TODO(SB, 13,14): get(0), get(1), ...
public static int startPickingModeAndCountHits(int x, int y, Vector3f perspective,
IntBuffer viewport, ViewObjectBase scene, ModelObjectPicker picker,
IntBuffer selectBuffer, Camera c) {
......@@ -214,6 +216,7 @@ public class GLPrimitives {
}
/** Returns the current transformed origin in model view coordinates. */
// TODO(SB, 13,14): get(0), get(1), ...
public static Vector3f getTransformedOrigin() {
FloatBuffer fb = createFloatBuffer(16);
glGetFloatv(GL_MODELVIEW_MATRIX, fb);
......@@ -221,6 +224,7 @@ public class GLPrimitives {
}
/** Returns the given vector in model view coordinates. */
// TODO(SB, 13,14): get(0), get(1), ...
public static Vector3f getTransformedVector(Vector3D v) {
FloatBuffer fb = createFloatBuffer(16);
glGetFloatv(GL_MODELVIEW_MATRIX, fb);
......@@ -369,6 +373,7 @@ public class GLPrimitives {
/** Sets the current material data for GL_FRONT faces. */
public static void setMaterial(FloatBuffer ambient, FloatBuffer diffuse, FloatBuffer specular,
float specularCoeff) {
// TODO (SB, 1)
// glDisable(GL_COLOR_MATERIAL);
// glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
glMaterialfv(GL_FRONT, GL_AMBIENT, ambient);
......@@ -422,7 +427,7 @@ public class GLPrimitives {
/** Creates a transformation matrix for billboards. Result is stored in bbmat */
public static void createBillboardMatrix(float[] bbmat, Vector3f right, Vector3f up,
Vector3f look, Vector3f pos) {
// TODO(SB, 13): Add pointer to documentation?
bbmat[0] = right.x;
bbmat[1] = right.y;
bbmat[2] = right.z;
......@@ -446,7 +451,7 @@ public class GLPrimitives {
/** Creates a transformation matrix for billboards. Result is stored in bbmat */
public static void createBillboardMatrix2(float[] bbmat, Vector3f right, Vector3f up,
Vector3f look, Vector3f pos) {
// TODO(SB, 13): Add pointer to documentation?
bbmat[0] = right.x;
bbmat[1] = right.y;
bbmat[2] = right.z;
......
......@@ -136,6 +136,7 @@ public class Graph3DUtil {
List<String> objData = getStringContentFromResource(PLUGIN_ID, modelPath + ".obj");
List<String> mtlData = getStringContentFromResource(PLUGIN_ID, modelPath + ".mtl");
// TODO (SB, 14)
return new OBJLoaderUtil(objData, mtlData).getLoadedObjects().get(0);
} catch(Exception ex) {
error(getDefault(), ex.getMessage(), ex);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment