My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package toxi.sim.dla;

import toxi.geom.Line3D;
import toxi.geom.Vec3D;

public class DLASegment extends Line3D {

protected Vec3D dir, nextDir;

public DLASegment(Vec3D a, Vec3D b, Vec3D c) {
super(a, b);
this.dir = b.sub(a).normalize();
this.nextDir = c != null ? c.sub(b).normalize() : dir.copy();
}

public Vec3D getDirectionAt(float currT) {
return getDirection().interpolateToSelf(nextDir, currT);
}

public Vec3D getNextDirection() {
return nextDir;
}

public String toString() {
return a.toString() + " -> " + b.toString() + " dir: " + dir + " nd: "
+ nextDir;
}
}

Change log

r409 by toxmeister on Feb 13, 2010   Diff
extracted DLA user parameters into
DLAConfiguration class, added
DLAEventAdapter, minor updates to other
DLA classes and removing DLATest from
package
Go to: 
Project members, sign in to write a code review

Older revisions

r402 by toxmeister on Feb 11, 2010   Diff
updating DLA classes, adding default
parameters
r387 by toxmeister on Feb 8, 2010   Diff
adding work-in-progress DLA classes
with event support, all need some more
refactoring
All revisions of this file

File info

Size: 699 bytes, 28 lines
Powered by Google Project Hosting