rtridz / phys2d Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/phys2d
Automatically exported from code.google.com/p/phys2d
A small thing at AABox:
public boolean touches(float x, float y, AABox other, float otherx, float
othery) {
// ...
return (totalWidth >= dx) && (totalHeight >= dy);
}
Original issue reported on code.google.com by DannyLade
on 12 Jul 2009 at 12:13
Register a single listener with the world that is notified of collisions
and determines whether response should be applied. Note it must be a single
listener since we don't want to have more than one source of the response
decision - we could define a behaviour but it's simpler to restrict to one
listener and let the user decide how to combine response decisions.
Original issue reported on code.google.com by [email protected]
on 5 Aug 2006 at 4:52
What steps will reproduce the problem?
1. Create new Body
2. Check for restitution
I expected a return value of "1f" as noted in javadoc but got the value
"0f" instead.
Using SVN head.
Suggestion: Set default value to "1" or change javadoc
Original issue reported on code.google.com by [email protected]
on 14 Jul 2007 at 4:47
If would be good to detect bodies that haven't moved for a while - we could
then record which other bodies they are touching and mark them as static
until they are either touched/untouched by a body or one of the bodies
connected becomes unstatic.
Complicated change - bares alot of thinking about.
Original issue reported on code.google.com by [email protected]
on 5 Aug 2006 at 4:56
What steps will reproduce the problem?
1. Start some demo with many polygons in it.
2. Open visualvm, and make cpu sampling.
3. EdgePairs.toList() - on the top 1 position using many CPU time.
What is the expected output? What do you see instead?
-
What version of the product are you using? On what operating system?
2008-04-06
Please provide any additional information below.
I looked in code. And found that it is not nesessary to convert EdgePairs to
int[][]. Creation of int[][] is heavy operation. We can simply pass iterator of
EdgePairs where it needed instead of int[][]. Here is code of iterator:
private class EdgeParisIterator implements Iterator<EdgePair>
{
private EdgePair current;
@Override
public boolean hasNext()
{
if (current != null)
{
return current.next != null;
}
return first != null;
}
@Override
public EdgePair next()
{
current = current == null ? first : current.next;
return current;
}
@Override
public void remove()
{
throw new RuntimeException("Method not supported!");
}
}
Example of use in LinePolygonCollider:
Iterator<EdgeSweep.EdgePairs.EdgePair> collEdgeCands =
sweep.getOverlappingEdges();
IntersectionGatherer intGath = new IntersectionGatherer(vertsA, vertsB);
while (collEdgeCands.hasNext())
{
EdgeSweep.EdgePairs.EdgePair pair = collEdgeCands.next();
intGath.intersect(pair.a, pair.b);
}
Patched code shows much greater performance.
code of all engine with my patch in attachment.
Original issue reported on code.google.com by [email protected]
on 28 Jul 2012 at 8:56
Attachments:
See summary.
Original issue reported on code.google.com by [email protected]
on 4 Sep 2009 at 10:03
I made my own custom physics file (Attached phys.java) and I edited the
jar files (Attached .jar files[needs to be updated in editor]) and I made
it so that I can drag and draw a shape,but when the shape starts falling
it starts moving very weirdly,and most times falling thourgh the floor,
email me at [email protected] if you want to see a video of exactly
what my problem is.
Original issue reported on code.google.com by [email protected]
on 25 Jul 2007 at 1:15
Attachments:
This issue should be used to track performance/memory improvements as they
are discovered.
Theres a bunch of garbage created for maths computations atm. This makes
the code easy to read but it might help tidy this up a bit.
Performance wise the important one seems to be reducing the complexity of
the Box/Box code. However, this is ported from the original demo so ways to
speed it up arn't immediately obvious.
Original issue reported on code.google.com by [email protected]
on 5 Aug 2006 at 4:54
It's possible to use the collision of shapes seperately to the rest of the
system. However, you can't use the spatial partitioning strategies outside
of the world currently. It'd be nicer if you could.
Suggested solution is to add a ShapeContainer which can be filled with
shapes (which internally get wrapped with bodies). It will duplicate some
of the work in World but would at least give two simple interfaces rather
than modifiying world and getting one ornate one.
Original issue reported on code.google.com by [email protected]
on 5 Aug 2006 at 4:37
javadoc: Body.setMoovable()
just few text mistakes
1.
Indicate whether this body should be able to moe.
*move
2.
"Parameters: moveable - True if this body is *rotatable*"
Shold be "moovable".
Original issue reported on code.google.com by [email protected]
on 1 Jun 2007 at 9:15
Polygons would be a great addition. Implementation might work just using
multiple lines - but we'd have to account for the centre of the polygon
(which lines don't currently do)
Original issue reported on code.google.com by [email protected]
on 5 Aug 2006 at 4:47
Line collisions don't seem to be perfect on the end points - need to resolve.
Possibly also extend so you can have lines as dynamic shapes.
Original issue reported on code.google.com by [email protected]
on 5 Aug 2006 at 4:46
Currently the hardness/elsatic collisions code works in 2 body collisions
but appears to add extra energy in larger scale collisions - see the Pool
ball demo.
Original issue reported on code.google.com by [email protected]
on 5 Aug 2006 at 4:30
I am creating a game in Java using Phys2D, and rather than using a circular
ball, I intend to use ellipses so I could "squeeze" the ball upon itself
and probably use joints to have pressure applied when squeezed.
I'm trying this out with line segments at the moment, but those aren't
working too well with colliding with other lines, most-likely to due how
line-segment collision at the edges works in Phy2D. I'll probably use very
boxes instead for now.
It would be great if Phys2D either had line segment collision on the line
ends (not sure how this would be implemented) or an oval/oval-polygon shape
available. I wouldn't mind a collision accuracy setting for these (even
though the math still isn't so hard with ovals) if it was faster to decide
the number of segments the object's made out of.
Thanks!,
Pritchard
Original issue reported on code.google.com by [email protected]
on 31 Jan 2008 at 6:45
It is hard to understand what units are expected for several methods.
I think JScience (http://jscience.org/) is a great opportunity to solve
this problem. JScience will probably be added to Java 7.
I don't know if there will be any impacts concerning performance...
Original issue reported on code.google.com by [email protected]
on 15 Jul 2007 at 8:54
Fixed joint will connect two bodies without allowing them to rotate at the
end points. This effectively allows us to join two bodies into one.
It might be possible to build a fixed joint using two BasicJoints with
opposite end anchor points.
Original issue reported on code.google.com by [email protected]
on 5 Aug 2006 at 4:48
I noticed that phys2d does not have any option, what I can find, that can
set the rotational velocity.
Im using newest phys2d, downloaded a week ago, with vista.
I would really need a posibility to edit the rotation velocity, otherwise I
must set all my cars to none rotational.
Original issue reported on code.google.com by [email protected]
on 4 Apr 2010 at 8:50
Hello and thanks for a great library! I'm using Pys2D to teach
programming. My student and I are creating a "Pong" game where a ball
bounces between two paddles and off walls. The problem is that when the
ball reaches higher velocities it can sometimes pass right through the
Lines we have as walls. Attached is code to reproduce the problem.
With velocity of Vector2f(2300,1000) the ball will always stay inside. If
you increase it to Vector2f(2400,1000) the ball will escape.
Original issue reported on code.google.com by [email protected]
on 7 Jan 2010 at 4:17
Attachments:
What steps will reproduce the problem?
1. Put a heavy Box(say m=1000) upon a lighter one (say m=1)
What is the expected output? What do you see instead?
The heavy box should stay still.While in the simulation heavy box creeps
down , or fall through light one.
What version of the product are you using? On what operating system?
Latest , XP
Please provide any additional information below.
Probably in each step, after the accumulate impulse iterations is
completed. A shock prorogation sweep could be added to solve this problem.
Original issue reported on code.google.com by [email protected]
on 17 Oct 2007 at 9:02
It should be possible to specify bodies into groups which don't collide
with each other. This information should be stored in each body to prevent
constant lookup. So each body holds a list of bodies it shouldn't collide
with based on the groups it's in - maybe?
Original issue reported on code.google.com by [email protected]
on 5 Aug 2006 at 4:50
What do you think about converting the project structure to Maven 2?
It is a big benefit especially for a library.
Original issue reported on code.google.com by [email protected]
on 14 Jul 2007 at 4:51
This is an enhancement, not a bug. I suggest upgrading Phys2d to use the
language features added in Java 1.5 including generics, enhanced for-loop,
and autoboxing.
Advantages: increased code readability and a more standard interface.
I've already made the necessary code changes and have attached a zip with
the updated project. I also had all of the data classes implement
Serializable for possible synchonization of worlds across a network.
Cheers
Original issue reported on code.google.com by [email protected]
on 19 Jun 2007 at 6:07
Attachments:
What steps will reproduce the problem?
1. We initialize a static circle.
2. We drop a line. Line is on the circle.
3. We drop a box and box will pass trough the line until it hits circle.
What is the expected output? What do you see instead?
The box should hit the line before hitting circle.
What version of the product are you using? On what operating system?
I use 2007-05-06 version and window XP professional.
Please provide any additional information below.
All of dropped objects are in same direction.
[ ]<-a box
| <-a Line
O <-a circle
In my example, you type "L" for dropping a line.
You have to wait until the line hits circle.
Then, you type "b" for dropping a box.
Original issue reported on code.google.com by [email protected]
on 19 May 2007 at 7:50
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.