492 Commits

Author SHA1 Message Date
Kevin Ruland
d40a36d09b We need to pull the bytes out of the input stream so we can close the input stream. It seems the Jogl Texture loader does not close the input stream. When loading textures from a zip file, this leaves the zip file open and prevents saving/ moving the file. 2012-10-23 16:23:40 -05:00
Kevin Ruland
3195b8d5df If reading from an ork container format, change the StorageOptions to reflect IncludeDecals = true. 2012-10-23 16:23:31 -05:00
Kevin Ruland
4757ce82f2 Update comments in saveAsRocksim(File) method noting that the saved state flag in OpenRocketDocument should not be switched to true after a successful save. 2012-10-23 16:23:23 -05:00
Kevin Ruland
3c7afcc2fb Update the state of the Include Decals button based on the current StorageOptions. 2012-10-23 16:23:16 -05:00
Kevin Ruland
e78f5b27f1 Added example file with decals. 2012-10-23 16:23:09 -05:00
Kevin Ruland
26370cd416 Change name of output file. 2012-10-23 16:23:02 -05:00
Kevin Ruland
f92cb2c8d6 Some refactoring: changed name of variable "filename" to "displayName" in BasicFrame to indicate that the string is used for presentation in the opening dialog and not as the name of a File to option. Moved the call to OpenRocketDocument.setFile() and setSaved() into OpenFileWorker instead of BasicFrame so the File object doesn't need to get passed around so much. Modified the RocketSaver interface to not require the filename since it doesn't need it anymore. 2012-10-23 16:22:47 -05:00
Kevin Ruland
e9060272e4 Created a GeneralRocketSaver object which is analogous to GeneralRocketLoader. Based on the StorageOptions, it determines how to save the file using a RocksimSaver or OpenRocketSaver as appropriate. Modified RocksimSaver and OpenRocketSaver so they only operate on OutputStreams. Removed methods from RocketSaver interface which operated on File. Fixed bug in DecalRegistry where it wouldn't handle absolute filenames. Fixed bug in BasicFrame where it would display ugly stuff for the filename. 2012-10-23 16:19:37 -05:00
Bill Kuker
4fe9dc4eef Fix to provide a FileInfo to the GeneralRocketLoader 2012-10-23 16:13:49 -05:00
Kevin Ruland
d0569e5759 Fixed loading decals from example file. Added FileInfo class which is used to describe data about the file - what the URL is to it and it's parent directory (if appropriate). The FileInfo class is pushed into the DecalRegistry to facilitate loading decals from the correct location. Added the Apocalypse with decals as an example file. 2012-10-23 16:13:35 -05:00
Kevin Ruland
05d1b91d90 Sizable commit with lots of changes to support decals in openrocket files. Added support for zip container support. Changed Decal to hold a String instead of URL. Refactored GeneralRocketLoader out of the RocketLoader hierarchy so the GeneralRocketLoader knows about files and RocketLoader only knows about streams. Changed the OpenRocket file format to 1.6 and added <appearance> and it's children for ambient light and decals. Implemented a DecalRegistry which is a member of the OpenRocketDocument. This class is used to get InputStreams for decals by their names. 2012-10-23 15:54:45 -05:00
Kevin Ruland
49c9329fde Added option to include decals when saving a file. 2012-10-23 15:12:49 -05:00
Kevin Ruland
1490f48f29 Switch to use the GeneralRocketLoader. It loads rkt files just fine and in a few commits, RocksimLoader won't know what to do with a File. 2012-10-23 15:12:42 -05:00
Bill Kuker
4ab28bbf54 Make the default checkbox text work the right way: check box's text, not a separate label 2012-10-23 15:12:35 -05:00
Bill Kuker
6a2ebb6851 Add translatable text names to the texture wrap mode enum 2012-10-23 15:12:28 -05:00
Bill Kuker
74783afe3f Cache model bounds for performance 2012-10-23 15:12:21 -05:00
Bill Kuker
d1d6e3c2a3 Repaint on render type change. 2012-10-23 15:12:14 -05:00
Bill Kuker
b8cd9dab42 Remove figure tab from RocketComponentConfig 2012-10-23 15:12:06 -05:00
Bill Kuker
4f28eea758 Change view type from buttons to drop-down, include 3d figure & realistic 2012-10-23 15:11:53 -05:00
Bill Kuker
a2afb106d5 Add ability to change RenderStrategy on the fly. 2012-10-23 15:08:36 -05:00
Bill Kuker
f5c309d2cc Move lighting setup into RenderStrategies 2012-10-23 15:08:18 -05:00
Bill Kuker
fc848db00e Null out appearance when default for material is selected 2012-10-23 15:04:47 -05:00
Bill Kuker
1b55457636 Repeat texture along length, not just circumference. 2012-10-23 15:04:39 -05:00
Bill Kuker
1bf7cc32b9 Honor RockSim flipS & flipT. 2012-10-23 15:04:32 -05:00
Bill Kuker
40cac0f8fd Use a single static JColorChooser instance to keep recent colors populated. 2012-10-23 15:04:25 -05:00
Bill Kuker
0cd27951e1 Fix backwards textures 2012-10-23 15:04:18 -05:00
Bill Kuker
d22cefa248 Carry init & dispose methods down into RenderStrategy, so that textures can be disposed of and reloaded. 2012-10-23 15:04:04 -05:00
Bill Kuker
dc66d2a93e English l10n on appearance config 2012-10-23 14:53:38 -05:00
Bill Kuker
d47101676b Give a better indication that the button this colorIcon is on is disabled: Draw an empty outline rectangle if disabled, a filled rectangle if enabled. 2012-10-23 14:53:31 -05:00
Bill Kuker
8ceaa74666 Brighten up the figure 2012-10-23 14:53:25 -05:00
Bill Kuker
41dc9dc34b Make the test texture model work out of SVN, without paths to my desktop. 2012-10-23 14:53:17 -05:00
Bill Kuker
97b2ad36bd Better texture filtering 2012-10-23 14:53:11 -05:00
Bill Kuker
3c0ad074ef Having Ambient and Diffuse sum to more than one causes inconsistencies with textures. It looks like it is clamping the color from lighting before it multiplies it with the texture. 2012-10-23 14:53:04 -05:00
Bill Kuker
68954b0ed5 Are UseSingleColor and SimpleColorModel synonyms? Hope so! 2012-10-23 14:52:57 -05:00
Bill Kuker
00ff011f4d Separate specular color 2012-10-23 14:52:50 -05:00
Bill Kuker
5dd804bed0 Trying to get material and lighting right 2012-10-23 14:52:42 -05:00
Bill Kuker
09b81a3529 Fix oneColor option 2012-10-23 14:52:36 -05:00
Bill Kuker
f582af7c95 Fix up caching - let textures in cache survive one reload. 2012-10-23 14:52:28 -05:00
Bill Kuker
3a9b843c9a Add file chooser. 2012-10-23 14:52:22 -05:00
Bill Kuker
f466729fe0 Texture rotation slider Disable color buttons when default appearance is selected 2012-10-23 14:52:15 -05:00
Bill Kuker
348db9d685 Correct component dao startup on Decal test programs 2012-10-23 14:52:08 -05:00
Bill Kuker
a0fad818de Correct component dao startup 2012-10-23 14:52:01 -05:00
Bill Kuker
d8bb8c002c 2012-10-23 14:51:55 -05:00
Bill Kuker
5665770504 Rough & Ugly appearance editor. 2012-10-23 14:51:48 -05:00
Bill Kuker
8dc76e50b7 Build component appearances on RockSim Import 2012-10-23 14:51:31 -05:00
Bill Kuker
13275be3a9 Build component appearances on RockSim Import 2012-10-23 14:51:07 -05:00
Bill Kuker
6e0379fbaf Fixed what I consider a bug: Rendering as a 3D rect uses the actual color selected as the highlighted side of the border, and the main field of the ColorIcon is a darker version of the selected color.
Added an OpenRocket Color constructor.
2012-10-23 14:44:18 -05:00
Bill Kuker
5531e2c3ca Added a toString for appearance logging 2012-10-23 14:44:11 -05:00
Bill Kuker
a7ee3143bb This has been moved 2012-10-23 14:44:04 -05:00
Bill Kuker
fef4c39f73 Move rules about how to render what into RenderStrategies. Implement Figure & Realistic strategies. 2012-10-23 14:43:28 -05:00