In this blog entry we are going to learn about How the Rotation and camera3d and viewer3d in away3d flash engine.
Red line = x-axis
Blue line = y-axis
Green Line = z-axis
How Rotation works ..?
Rotation in away3d based on the three axis . Those are x.y and z. the component is rotated take any one of this axis as a center then rotated. In my last post the sphere is rotated along with x axis. In that example the axis is like that (see below )
sphere.rotationX = sphere.x + 1;
The sphere takes x axis as a center and rotate like above…
In this example we add two or more components in the ObjectContainer3D then rotate this objects. In this example we are going to learn about how camera3D and Viewer3D works.
How Camera3D works ..?
Camera3d = real camera
view3d = lens the viewr of the camara
renderer = recording in real cam
scen3d = what we seen
This diagram explained in Papervision3d Essential book.. In this diagram your clearly understood about camera3d.
If we assume Camera 3d is like a real camera . we assume it is with in our application in invisible mode.
The viewerport (view3d) is an lens or what you are view using the camera.
The render engine is recording engine in the real camera. In the real camera If we start the record then only we can see the changes otherwise not. Like same as in camera3d we called
viewer.render()
method each time if anything changed in the components. In the real camara If any person is not inside the seen they are not come in the flim. Same as in the scene3d if we not add add any components in the scene 3d objects it is not visible.
How Viewer3D Works ..?
Download the source code click here (compatible for Flashdevelop IDE)
Adobe support for native 3D only in cs4. There are lot of opensource flash 3d engines are there. I tried papervision3d and away3d. Both are quite well. There are lot more tutorials for both online for away3d tutorials click here , for papervision3d download this book . I got the source code of away3d from the google code http://code.google.com/p/away3d/ and for papervison3d svn http://code.google.com/p/papervision3d/. I generate swc using the command. The red5 says about away3d.
When i try to install mplayer-1.0-0.102.20080903svn.fc10.src.rpm in fedora i got this error. i download this file from rpmfusion
[root@localhost Media]# rpm -ivh mplayer-1.0-0.102.20080903svn.fc10.src.rpm
warning: mplayer-1.0-0.102.20080903svn.fc10.src.rpm: Header V3 DSA signature: NOKEY, key ID 49c8885a
1:mplayer warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
########################################### [100%]
I have the same problem when i try to install wine-1.0.1-1.el4.i386.rpm
I have not internet connection in my home pc. so what to do..?
i goes to “/usr/src/redhat/SOURCES” folder there is a file called mplayer-export-2008-09-03.tar.bz2
Extract the file and configure it then make and make install.
Now i have mplayer in my home pc
[root@localhost Movies]# mplayer 2012.avi
MPlayer dev-SVN-r27514 (C) 2000-2008 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (Family: 15, Model: 4, Stepping: 3)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
Playing 2012.avi.
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
AVI: ODML: Building ODML index (2 superindexchunks).
VIDEO: [XVID] 608x272 12bpp 29.970 fps 674.6 kbps (82.4 kbyte/s)
when i play the avi file using mplayer it does not play the video only play the audio
For the past 3 years i have used pirated windows xp os in my home pc. But i have faced lot of problems like system very slow, Blue screen and more hectic thing is virus softwars. So i want to move any red-hat family, because i have some good experience with red-hat family os’s like centOS rather then Ubuntu. I have the CentOS 5.0 dvd that was downloaded before an year. When install using that dvd Testing Disk is not completed some files are corrupted. I have fedora 7 dvd then successfully installed on Intel(R) Pentium(R) 4 CPU 3.00GHz 2 cpu processor Intel 815 motherborad. I have the softwares for windows os only not for redhat rpm files.At that time wine (run Windows programs on Unix) software is help me a lot. I installed Openoffice and vlc using wine those are working fine. The mplayer and ffmpeg are used for my video and audio manipulation and playing. gnome-mplayer gives me the graphical toolbar option for mplayer. I used GIMP for image manipulation. I have the Netbeans distibution dvd it has java6 sdk and netbeans it enable me to develop a jsp pages and other things. Opensource softwares are rocking then why i used that pirated os’s (windows).. Till now i am not face any critical problems on fedora. Thanks to the fedora team.
Here we are going to know, How to managing red5 server remotely using JMX.
what is red5 server ..?
Red5 is an Open Source Flash Server written in Java that supports:
Streaming Video (FLV, F4V, MP4)
Streaming Audio (MP3, F4A, M4A)
Recording Client Streams (FLV only)
Shared Objects
Live Stream Publishing
Remoting
This is developed by Reverse Engineering of Adobe Flash Media server. Red5 under the GNU Lesser General Public License. You can Modify and redistribute this software.
What is JMX …?
JMX stands for Java Management eXtension . JMX is written in java technology used to monitor and manage a java application or objects.
The configuration of jmx agent in red5.properties file. the properties are
the default user name for jmx is “red5user” and password is “changeme” . you can change this bu changing the access.properties and password.properties in red5 conf folder.
In DOS, OS/2, and Microsoft Windows, a batch file is a text file containing a series of commands intended to be executed by the command interpreter. Article on wikipedia
This batch file contains the set of instruction to build a any java application. To get the good result you follow the below folder structure..
For example C:\apache-tomcat-6.0.18\webapps contains the many java web application. place this batch file in webapps folder.
The java files in webapps\<PROJECT_NAME>\src\ folder. With in the src folder u can follw the java package structure.
The jar files for your application in webapps\<PROJECT_HOME>\lib folder.
Then run that batch file like
C:\apache-tomcat-6.0.18\webapps>build.bat Library
Here the Library is your project Home. you can use this bat file anywhere not only for tomcat webapps folder.
Environment Variable Prequisites:
JAVA_HOME Must point at your Java Development Kit installation.
JAVA_OPTS (Optional) Java runtime options.
CATALINA_HOME (Optional) May point at your Catalina “build” directory.
How to set JAVA_HOME …?
JAVA_HOME basically known as Java Environmental Variable.Refers from web
If you already know the install path for the Java or Software Development Kit,skip this first two steps. Otherwise, find the install path by following these instructions:
Unless you changed the install path for the Java Developement Kit during installation, it will be in a directory under C:\Program Files\Java. Using Explorer, open the directory C:\Program Files\Java
Inside that path will be one or more subdirectories such as jdk1.5.0_08. If you just installed the Java Development Kit, it will be installed to the newest directory, which you can find by sorting by date. For example, it may be installed in C:\Program Files\Java\jdk1.5.0_08. This is the install path.
Once you have identified the JDK install path:
Right click on the My Computer icon on your desktop and select properties
Click the Advanced Tab
Click the Environment Variables button
Under System Variable, click New
Enter the variable name as JAVA_HOME
Enter the variable value as the install path for the Development Kit
Click OK
Click Apply Changes
What is JAVA_OPTS …….?
This JAVA_OPTS may increase your server performance. For example
set JAVA_OPTS=-Xms128 -Xmx512
The two extra parameters specified via JAVA_OPTS are as follows:
-Xms – the amount of memory that the JVM starts with.
-Xmx – the maximum memory that the JVM may have.
Set an environment variable CATALINA_HOME to the path of the directory into which you have installed Tomcat.
For example :
set CATALINA_HOME=C:\apache-tomcat-6.0.18
How this Batch File works ……?
Get the all jar files from <PROJECT_HOME>\lib folder and set this as classpath.
Then compile all java files inside the src folder. and build the class files inside the <PROJECT_HOME>\WEB-INF Folder.
The user authentication is the common task when we create a web application. The servlet have j_security_check authentication method. This is commonly called as form based authentication. Here the steps for this authentication.
This is in your index.jsp or login page
<form action="j_security_check" method="post"> Username
<input name="j_username" type="text" />
Password
<input name="j_password" type="password" />
<input type="submit" value="Login" />
</form>
For this you need two tables in your database. One is username table that contains username and password column. And another one is userrole table that contains username and role column.
debug —Here, we set the debug level. A higher number generates more detailed output.
driverName —The name of our MySQL driver. You need to be sure that the driver’s JAR file is located in Tomcat’s CLASSPATH.
connectionURL —The database URL that is used to establish a JDBC connection. In this field, weblogin is the name of our database; user and password are login data with which you are connecting to the database. In MySQL, such a user is created by default, so you can use it. In case you don’t have such a user, you need to create your own user and make it capable of working with your weblogin database.
userTable —A table with at least two fields, defined in userNameCol and userCredCol.
userNameCol and userCredCol—The fields with the name of login field from the users table and pass.
Hi all,
Here the document for how to create private and public keys for login. This is more helpful others can login to your machine without disclose the password.
How to create private key for my machine..?
Go to /home/root/.ssh folder. Then run ssh-keygen command. Answer the questions. Then the key and pub files are created.
save this .pub file as authorized_keys.
[root@localhost ~]# cd .ssh/
[root@localhost .ssh]# ls
known_hosts
[root@localhost .ssh]# ssh-key
ssh-keygen ssh-keyscan
[root@localhost .ssh]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): example.ppk
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in example.ppk.
Your public key has been saved in example.pub.
The key fingerprint is:
6e:e4:ff:3b:a6:52:0d:57:ec:d2:f8:dd:e5:08:22:d6 root@localhost
[root@localhost .ssh]# cat example.pub >> authorized_keys
[root@localhost .ssh]# ls
authorized_keys example.ppk example.pub known_hosts
How to use the private keys..?
In putty
Open putty and type the ‘Host Name’ (ie root@192.168.1.117)