forked from jMonkeyEngine/jmonkeyengine
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from JoopAue/imageraster-cyclic
Imageraster cyclic
- Loading branch information
Showing
10 changed files
with
135 additions
and
71 deletions.
There are no files selected for viewing
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
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
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
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
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
12 changes: 6 additions & 6 deletions
12
jme3-core/src/main/resources/com/jme3/system/version.properties
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# THIS IS AN AUTO-GENERATED FILE.. | ||
# DO NOT MODIFY! | ||
build.date=2016-04-03 | ||
git.revision=5496 | ||
git.branch=application-input-DIP | ||
git.hash=85ccf353a95329daff30dc60304532fcc63a5f4b | ||
git.hash.short=85ccf35 | ||
git.revision=5501 | ||
git.branch=imageraster-cyclic | ||
git.hash=1118cdf84383374836192ced709d4c95ea3136ea | ||
git.hash.short=1118cdf | ||
git.tag=null | ||
name.full=jMonkeyEngine 3.1-application-input-DIP-5496 | ||
version.full=3.1-application-input-DIP-5496 | ||
name.full=jMonkeyEngine 3.1-imageraster-cyclic-5501 | ||
version.full=3.1-imageraster-cyclic-5501 | ||
version.number=3.1.0 | ||
version.tag=SNAPSHOT |
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
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
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
39 changes: 39 additions & 0 deletions
39
jme3-terrain/src/test/java/com/jme3/terrain/heightmap/ImageBasedHeightMapTest.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.jme3.terrain.heightmap; | ||
|
||
import com.jme3.texture.Image; | ||
import com.jme3.texture.image.DefaultImageRaster; | ||
import com.jme3.texture.image.ImageRaster; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
import static org.hamcrest.CoreMatchers.instanceOf; | ||
import static org.junit.Assert.assertEquals; | ||
import static org.junit.Assert.assertThat; | ||
import static org.mockito.Mockito.spy; | ||
import static org.mockito.Mockito.when; | ||
|
||
public class ImageBasedHeightMapTest { | ||
|
||
private ImageBasedHeightMap heightMap; | ||
private Image image; | ||
|
||
@Before | ||
public void setUp() { | ||
image = createImage(); | ||
heightMap = new ImageBasedHeightMap(image); | ||
|
||
} | ||
|
||
public Image createImage() { | ||
Image image = spy(new Image()); | ||
when(image.getFormat()).thenReturn(Image.Format.BGR8); | ||
return image; | ||
} | ||
|
||
@Test | ||
public void testGetImageRaster() { | ||
ImageRaster imageRaster = heightMap.getImageRaster(); | ||
|
||
assertThat(imageRaster, instanceOf(DefaultImageRaster.class)); | ||
} | ||
} |