WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Forex Trading Online forex trading platform
Define a viewing transformation

swf_lookat

(PHP 4)

swf_lookatDefine a viewing transformation

Description

void swf_lookat ( float $view_x , float $view_y , float $view_z , float $reference_x , float $reference_y , float $reference_z , float $twist )

Defines a viewing transformation by giving the viewing position and the coordinates of a reference point in the scene.

Parameters

view_x

x-coordinate for the viewing position

view_y

y-coordinate for the viewing position

view_z

z-coordinate for the viewing position

reference_x

x-coordinate for the reference point

reference_y

y-coordinate for the reference point

reference_z

z-coordinate for the reference point

twist

Controls the rotation along with viewer's z axis.

Return Values

No value is returned.

Examples

Example #1 A simple 3D-rotation around a text

<?php

header
('Content-type: application/x-shockwave-flash');

swf_openfile("php://stdout"32020025111);

swf_ortho(-100100, -100100, -100100); // create 3D coordinates

swf_definefont(0"Pix3");
swf_addcolor(0001);
swf_fontsize(10);
swf_fonttracking(0.2);

for (
$i 0$i 628$i += 8) {
    
$j $i 100;
    
swf_pushmatrix();
    
swf_translate(000);
    
swf_perspective(1001010);
    
swf_lookat(sin($j) * 6050cos($j) * 600000);

    
swf_definetext (1'HotKey@'0);
    
swf_translate(-50,0,0);

    
swf_placeobject(1,10);

    
swf_definetext(2'example.com'0);
    
swf_translate(5500);
    
swf_placeobject(211);

    
swf_showframe();
    
swf_removeobject(10);
    
swf_removeobject(11);
    
swf_popmatrix();
}

swf_closefile();
?>