This file contains 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
/* The triangle data structure. Each triangle contains three pointers to */ | |
/* adjoining triangles, plus three pointers to vertices, plus three */ | |
/* pointers to subsegments (declared below; these pointers are usually */ | |
/* `dummysub'). It may or may not also contain user-defined attributes */ | |
/* and/or a floating-point "area constraint." It may also contain extra */ | |
/* pointers for nodes, when the user asks for high-order elements. */ | |
/* Because the size and structure of a `triangle' is not decided until */ | |
/* runtime, I haven't simply declared the type `triangle' as a struct. */ |
This file contains 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 com.jme3.app.SimpleApplication; | |
import com.jme3.material.Material; | |
import com.jme3.material.RenderState; | |
import com.jme3.math.FastMath; | |
import com.jme3.math.Vector3f; | |
import com.jme3.renderer.RenderManager; | |
import com.jme3.renderer.ViewPort; | |
import com.jme3.scene.Geometry; | |
import com.jme3.scene.Node; | |
import com.jme3.scene.control.AbstractControl; |
This file contains 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 com.jme3.app.SimpleApplication; | |
import com.jme3.material.Material; | |
import com.jme3.math.ColorRGBA; | |
import com.jme3.math.FastMath; | |
import com.jme3.math.Vector3f; | |
import com.jme3.renderer.RenderManager; | |
import com.jme3.renderer.ViewPort; | |
import com.jme3.scene.BatchNode; | |
import com.jme3.scene.Geometry; | |
import com.jme3.scene.Node; |
This file contains 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 com.jme3.app.SimpleApplication; | |
import com.jme3.material.Material; | |
import com.jme3.math.ColorRGBA; | |
import com.jme3.math.FastMath; | |
import com.jme3.math.Vector3f; | |
import com.jme3.renderer.RenderManager; | |
import com.jme3.renderer.ViewPort; | |
import com.jme3.scene.BatchNode; | |
import com.jme3.scene.Geometry; | |
import com.jme3.scene.Node; |
This file contains 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
# | |
# A fatal error has been detected by the Java Runtime Environment: | |
# | |
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000053309b00, pid=11588, tid=11248 | |
# | |
# JRE version: Java(TM) SE Runtime Environment (8.0_20-b26) (build 1.8.0_20-b26) | |
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.20-b23 mixed mode windows-amd64 compressed oops) | |
# Problematic frame: | |
# C [nvoglv64.DLL+0xa99b00] | |
# |
This file contains 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
ShaderId: SimpleQuad{ | |
Type: Executable | |
Stage: Fragment | |
Requirements{ | |
TextureRead | |
NormalTransform | |
GBufferWrite | |
} | |
Parameters{ | |
Attributes{ |
This file contains 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
package com.lfe.engine.core.graphics.extensions; | |
import com.lfe.core.math.FloatArrayProvider; | |
import com.lfe.core.math.IntArrayProvider; | |
import com.lfe.engine.core.graphics.GraphicsContext; | |
import com.lfe.engine.core.graphics.gpuobjects.ShaderProgram; | |
import com.lfe.engine.core.graphics.gpuobjects.ShaderUniform; | |
import java.util.Map; |
This file contains 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
final Vector3f direction = new Quaternion().fromAngles(90 * FastMath.DEG_TO_RAD, 0, 0).mult(carNormal.clone().setX(0).normalize()); | |
final Quaternion rotation = new Quaternion(); | |
rotation.lookAt(direction, carNormal); | |
final Quaternion quaternion = new Quaternion().fromAngleAxis(carRotationAngle, Vector3f.UNIT_Y); | |
quaternion.multLocal(rotation); | |
carNode.setLocalRotation(rotation); |
This file contains 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
uniform mat4 g_WorldViewProjectionMatrix; | |
uniform float g_Time; | |
uniform int m_Tiles; | |
uniform int m_TilesPerRow; | |
attribute vec3 inPosition; | |
attribute vec2 inTexCoord; | |
varying vec2 texCoordAni; |
This file contains 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
private void calcStep(int stepX, int stepY, int stepDepth){ | |
calcStep(stepX, stepY, stepDepth,true); | |
calcStep(stepX, stepY, stepDepth,false); | |
} | |
private void calcStep(int stepX, int stepY, int stepDepth, boolean calc) { | |
if (calc) { | |
int xDelta = stepX - xCenter; | |
int yDelta = stepY - yCenter; |
NewerOlder