Java Doc for SequenceLine.java in  » 6.0-JDK-Modules » java-3d » com » sun » j3d » loaders » lw3d » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » java 3d » com.sun.j3d.loaders.lw3d 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.j3d.loaders.lw3d.SequenceLine

SequenceLine
class SequenceLine (Code)
This class was created to handle "sequence files", which allow holosketch-type Tloop sequences to be loaded through the lw3d loader. The class reads a sequence file line by line and uses SequenceLine to load the file specified in each line.
Idea behind the Tloop process:
Artist creates "tloops" (animations with each keyframe's geometry saved out explicitly) where the geometries are spaced one frame apart. Then I can automatically create a SwitchValueInterpolator based on this spacing. If the number of frames in the sequence is greater than the number of frames in the tloop, then it will automatically loop until the end of the sequence.
Process:
1) Artist creates an animation of a null group that has a child with some special name, such as "bucket_sequence_bucketsequence.txt.lwo", which tells the lw3d loader that it should look for a sequence file by the name of bucketsequence.txt. What happens to this object is irrelevant (as far as the loader is concerned); all animation information is taken from its parent instead.
2) Artist saves out the geometry of the bucket at whatever frames she wants to. If she's saving a tloop (a sequence of frames), she should save them under the names xxx.lwo, where xxx is the 3-digit sequence number (000, 001, 002, etc.).
3) Artist creates the sequence file, which lists all saved geometry files (except sequences - these can be referred to simply by the first file (...000.lwo)), along with their associated start/end frames. She also lists the number of files in the sequence, although this parameter is implied anyway, through the existence of the sequence files and their naming convention. Maybe we should trash this guy.
4) In the lw3d loader, when LwsObject encounters an object with the filename "..._sequence_.lwo", it searches for filename. If found, it parses the file (using the SequenceReader class) to retrieve all parameters.
5) Each SequenceLine creates a Java3D group containing its objects. This is either a plain-old-Group (if there is only one object) or a Switch group with a SwitchValueInterpolator.
6) SequenceReader constructs a Switch group and adds all SequenceLine groups to this new group. It also creates a SwitchPathInterpolator (child of PathInterolator) that contsructs an Alpha based on the startFrame values of each SequenceLine. It creates a group and adds the SwitchPathInterpolator plus any SequenceLine SwitchValueInterpolators to this group.
7) LwsObject adds the SequenceReader Switch group to its objectTransform. It does a getBehaviors() from SequenceReader and adds the result (the SwitchPathInterpolator group) to its objectBehaviors group.
8) Done.


Field Summary
 Behaviorbehaviors
    
 intendFrame
    
 StringfileName
    
 GroupgeometryGroup
    
 intnumFrames
    
 intstartFrame
    
static  HashtablestoredRefList
    
 inttotalFrames
    
 floattotalTime
    

Constructor Summary
 SequenceLine(StreamTokenizer st, float time, int frames)
    

Method Summary
 voidcreateJava3dObjects(int debugVals, int loadBehaviors)
     Create Java3d objects from the data in the sequence line.
 BehaviorgetBehavior()
    
 GroupgetGeometry()
    

Field Detail
behaviors
Behavior behaviors(Code)



endFrame
int endFrame(Code)



fileName
String fileName(Code)



geometryGroup
Group geometryGroup(Code)



numFrames
int numFrames(Code)



startFrame
int startFrame(Code)



storedRefList
static Hashtable storedRefList(Code)



totalFrames
int totalFrames(Code)



totalTime
float totalTime(Code)




Constructor Detail
SequenceLine
SequenceLine(StreamTokenizer st, float time, int frames) throws ParsingErrorException(Code)




Method Detail
createJava3dObjects
void createJava3dObjects(int debugVals, int loadBehaviors) throws IncorrectFormatException, FileNotFoundException(Code)
Create Java3d objects from the data in the sequence line. This means that for a tloop file (ends in "000"), we're going to create the appropriate geometry for each file, put them all in a Switch node, then create a SwitchValueInterpolator to swap between the frames of the tloop. If it's not a tloop, then we're just going to create the geometry for that file.



getBehavior
Behavior getBehavior()(Code)



getGeometry
Group getGeometry()(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.