aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* j3dcore: ViewPlatformRetained::getViewList cannot return nullHarvey Harrison2012-03-051-10/+9
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: remove unneeded casts to View in SoundStructureHarvey Harrison2012-03-051-4/+4
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: remove the unused SoundRenderer class...never seems to be usedHarvey Harrison2012-03-033-97/+0
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: change getViewPlatformList() to never return null and remove checksHarvey Harrison2012-03-032-65/+37
| | | | | | Also, consistently lock the cached array using the List it caches. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: add an early return to the enable/disable event functions to reduce ↵Harvey Harrison2012-03-031-148/+120
| | | | | | indentation Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: preparation patch for cleanup of getViewList() users in VirtualUniverseHarvey Harrison2012-03-031-137/+132
| | | | | | No functional changes, just making the whitespace consistent. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: only mark the cached view list as dirty if we actually change itHarvey Harrison2012-03-031-5/+3
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: annotate list of Views in ViewPlatformRetainedHarvey Harrison2012-03-031-30/+30
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: annotate GroupRetained's list of child nodes and compiled child nodesHarvey Harrison2012-02-265-90/+60
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: annotate NodeRetained::branchGroupPathsHarvey Harrison2012-02-269-30/+27
| | | | | | - also use the copy constructor rather than clone() Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: fix raster code in the JOGL backend to match the native OpenGL codeHarvey Harrison2012-02-221-6/+6
| | | | | | | This appears to have been a typo from the initial implementation and likely never worked. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: remove code that was stubbed-out in issue 458Harvey Harrison2012-02-212-36/+1
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: use annotated ArrayList of AWTEvents in WakeupOnAWTEventHarvey Harrison2012-02-201-16/+12
| | | | | | Make the locking explicit where used. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: remove the DVR backdoor in ViewHarvey Harrison2012-02-201-47/+0
| | | | | | Dynamic Video Resize is effectively unused internally, kill it. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: annotate the ThreadLocals in JoglPipelineHarvey Harrison2012-01-271-15/+15
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: remove the unneeded centroid from BoundingBoxHarvey Harrison2012-01-241-15/+8
| | | | | | | Return a temp Point3d as it's not that much more expensive than the math we're already doing. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: switch the orderedBin array expansion to happen at set, rather than ↵Harvey Harrison2012-01-241-7/+18
| | | | | | | | | get time Add early return of null for the viewIndex >= array length and only expand the allocation when we set a non-null orderedBin. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: format whitespace and move some variables into loops around callers ↵Harvey Harrison2012-01-241-67/+50
| | | | | | | | of OrderedGroupRetained::[gs]etOrderedBin Preparation patch to change where the OrderedBin array is expanded. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: ensure the orderedBin array in OrderedGroupRetained is consistently ↵Harvey Harrison2012-01-241-29/+24
| | | | | | | | | | | | locked Introduce a lock object to lock all access as you cannot use an object to lock itself if that reference is ever written over, as is the case here. You can get surprising nullpointer exceptions and indexOutOfbounds from concurrent thread access when you have multiple active views. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: use the Bounds::getCenter(Point3d) function in the trivial casesHarvey Harrison2012-01-244-36/+29
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: add a getCenter(Point3d) to the Bounds interface and implement it ↵Harvey Harrison2012-01-234-15/+27
| | | | | | in the implementing classes Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: annotate lists of LightRetained, FogRetained, ModelClipRetained and ↵Harvey Harrison2012-01-175-333/+322
| | | | | | AlternateAppearanceRetained used by setlivestate Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: further reduce sizes of BoundingSphere and BoundingBoxHarvey Harrison2012-01-162-64/+17
| | | | | | | | | | Essentially this undoes all the code added for issue 561. Just rely on escape analysis to allocate on-stack. On 64-bit: Reduces BoundingSphere from 54 -> 38 bytes Reduces BoundingBox from 62 -> 46 bytes Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: remove temporary Point3d from BoundingBoxHarvey Harrison2012-01-161-9/+1
| | | | | | | | | Rely on escape analysis in the VM here, this method could be coded more carefully anyway to avoid most of the floating point math. On 64-bit reduces BoundingBox from 70->62 bytes Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: small optimization in BoundingSphere/BoundingBox::transform(Bounds, ↵Harvey Harrison2012-01-162-19/+4
| | | | | | | | | | | Transform3d) When the type of Bounds being passed matches the current Object, this method can simply set the state and then transform the current object, avoid the need for a temporary object in BoundingBox's case. BoundingSphere was already open-coding this pattern, make it explicit. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: use the BoundingSphere constructor to get an empty bounds where desiredHarvey Harrison2012-01-153-12/+6
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: match behavior of constructor and set() method in BoundingSphereHarvey Harrison2012-01-151-1/+1
| | | | | | | Make the BoundingSphere(Bounds) match the set(Bounds) behavior when passing an empty Bounds into it. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: one more use of the emptyBounds helper in BoundingSphereHarvey Harrison2012-01-151-5/+3
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: format BoundingSphere constructors to alwats set the state in the ↵Harvey Harrison2012-01-151-29/+28
| | | | | | | | same order Set in the order: boundId, center, radius. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: inline NaN test into its one caller in BoundingSphereHarvey Harrison2012-01-151-8/+1
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: reduce memory footprint of BoundSphereHarvey Harrison2012-01-151-8/+7
| | | | | | | | The temp array of Point3d's are only used in one constructor, which is not called anywhere in the Java3d package. Allocate a temp inside the constructor as-required and reduce the memory use for everyone else. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: add missing call to updateBoundsState in BoundingSphere::setCenterHarvey Harrison2012-01-151-10/+8
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: add setEmpty/setInfinite helpers to BoundingSphereHarvey Harrison2012-01-151-122/+88
| | | | | | | Avoids a lot of tests in the updateBoundsStates when we know we want one of these two states specifically. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: remove unused variables in BoundingSphereHarvey Harrison2012-01-151-4/+3
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: adjust set/get upper/lower to use Point3d helpersHarvey Harrison2012-01-141-67/+50
| | | | | | They match the signature of the caller exactly, allowing the VM to inline them completely. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: inline NaN-checks in BoundingBox::updateBoundsStates which should ↵Harvey Harrison2012-01-141-11/+1
| | | | | | be the only user Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: use the new set((Bounds)null) fastpath to create empty boundsHarvey Harrison2012-01-141-26/+17
| | | | | | Also add a few more calls to the new internal setEmpty/setInfinite helpers. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: small optimizations in BoundingBox constructorsHarvey Harrison2012-01-141-31/+30
| | | | | | | | Avoid the calls to updateBoundsStates when we know exactly what bounds we set in the default cases. Also add a check to the (Bounds) constructor for an empty Bounds argument and directly set the empty state. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: take advantage of the BoundingBox(null) constructor to create an ↵Harvey Harrison2012-01-1414-42/+14
| | | | | | | | | | | | | | empty bounds The following pattern: BoundingBox temp = new BoundingBox(); temp.setLower(1.0, 1.0, 1.0); temp.setUpper(-1.0, -1.0, -1.0); Incurs 3 calls to updateBoundsStates internally (construction and each setter), while calling with a null argument needs 0 calls, and zero floating-point comparisons. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: optimize special BoundingBox settingHarvey Harrison2012-01-141-66/+71
| | | | | | | | | | When setting an empty or infinite bounds, avoid the calls to updateBoundsStates by setting the two booleans directly. In addition, provide a fast-path to the (Bounds) constructor to create an empty BoundingBox when passing a null Bounds. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: remove some unused variables from BoundingBoxHarvey Harrison2012-01-141-2/+1
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: annotate Point3d members of BoundingBox as finalHarvey Harrison2012-01-141-18/+16
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: add a constructor so that parts of RenderAtomListInfo can be finalHarvey Harrison2012-01-122-8/+9
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: use System.arrayCopy and make RenderAtom creation loops commonHarvey Harrison2012-01-121-57/+22
| | | | | | | Unify the two if/else branches into a single loop and expand the Array using System.arrayCopy. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: move an early-return case as early as possible in locked section in ↵Harvey Harrison2012-01-121-17/+6
| | | | | | | | | GeometryAtom In all paths, if the RenderAtom is not scoped to the given View, we return null and do not adjust the renderAtoms array. Make this clear with an early return. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: use consistent locking when updating the renderAtoms arrayHarvey Harrison2012-01-121-3/+2
| | | | | | | | | | | | | | | | | | | | You cannot lock updates to a member variable using itself if the reference is ever changed. The renderAtoms array in GeomtryAtom is resized when it does not have enough room for all the open views. This leads to crashes similar to the following: Exception in thread "J3D-RenderStructureUpdateThread-5" java.lang.ArrayIndexOutOfBoundsException: 3 at javax.media.j3d.GeometryAtom.getRenderAtom(GeometryAtom.java:241) at javax.media.j3d.RenderBin.processTransformChanged(RenderBin.java:3506) at javax.media.j3d.RenderBin.processMessages(RenderBin.java:1772) at javax.media.j3d.StructureUpdateThread.doWork(StructureUpdateThread.java:102) at javax.media.j3d.J3dThread.run(J3dThread.java:275) Use the existing lockObj in this class to synchronize access. This lock is already being used to protect updates to the centroid update calculation, but both locked sections are relatively short, if contention ends up being a problem, renderAtoms could be changed to an ArrayList instead which can be resized. Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: remove unused variables and unneeded casting from BehaviorStructureHarvey Harrison2012-01-091-8/+2
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: Canvas3D and Screen3D list annotations in ViewHarvey Harrison2012-01-091-26/+22
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: add type annotations to the textureReload listHarvey Harrison2012-01-082-7/+4
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* j3dcore: remove unused variables and call a function statically in RendererHarvey Harrison2012-01-081-11/+4
| | | | Signed-off-by: Harvey Harrison <[email protected]>