| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
AlternateAppearanceRetained used by setlivestate
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
|
| |
Make the BoundingSphere(Bounds) match the set(Bounds) behavior when passing an empty
Bounds into it.
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
|
|
| |
same order
Set in the order: boundId, center, radius.
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
| |
They match the signature of the caller exactly, allowing the VM to inline them completely.
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
| |
be the only user
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
| |
Also add a few more calls to the new internal setEmpty/setInfinite helpers.
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
|
| |
Unify the two if/else branches into a single loop and expand the Array using
System.arrayCopy.
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
|
| |
The existing code was using instanceof as a null-check in practice, annotate the lists
and helper functions with explicit types and make the null checks more obvious.
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
| |
- annotate the one method these two lists are passed to
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
| |
- small change to use toArray with an argument array
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
| |
Remove some unused variables as well.
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
| |
RenderBin
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|