mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-20 10:58:54 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@297028 c90b9560-bf6c-de11-be94-00142212c4b1
169 lines
4.1 KiB
XML
169 lines
4.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="function.swf-lookat" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>swf_lookat</refname>
|
|
<refpurpose>Define a viewing transformation</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>void</type><methodname>swf_lookat</methodname>
|
|
<methodparam><type>float</type><parameter>view_x</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>view_y</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>view_z</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>reference_x</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>reference_y</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>reference_z</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>twist</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Defines a viewing transformation by giving the viewing position and the
|
|
coordinates of a reference point in the scene.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>view_x</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
x-coordinate for the viewing position
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>view_y</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
y-coordinate for the viewing position
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>view_z</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
z-coordinate for the viewing position
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>reference_x</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
x-coordinate for the reference point
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>reference_y</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
y-coordinate for the reference point
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>reference_z</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
z-coordinate for the reference point
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>twist</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Controls the rotation along with viewer's z axis.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.void;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>A simple 3D-rotation around a text</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
header('Content-type: application/x-shockwave-flash');
|
|
|
|
swf_openfile("php://stdout", 320, 200, 25, 1, 1, 1);
|
|
|
|
swf_ortho(-100, 100, -100, 100, -100, 100); // create 3D coordinates
|
|
|
|
swf_definefont(0, "Pix3");
|
|
swf_addcolor(0, 0, 0, 1);
|
|
swf_fontsize(10);
|
|
swf_fonttracking(0.2);
|
|
|
|
for ($i = 0; $i < 628; $i += 8) {
|
|
$j = $i / 100;
|
|
swf_pushmatrix();
|
|
swf_translate(0, 0, 0);
|
|
swf_perspective(100, 1, 0, 10);
|
|
swf_lookat(sin($j) * 60, 50, cos($j) * 60, 0, 0, 0, 0);
|
|
|
|
swf_definetext (1, 'HotKey@', 0);
|
|
swf_translate(-50,0,0);
|
|
|
|
swf_placeobject(1,10);
|
|
|
|
swf_definetext(2, 'example.com', 0);
|
|
swf_translate(55, 0, 0);
|
|
swf_placeobject(2, 11);
|
|
|
|
swf_showframe();
|
|
swf_removeobject(10);
|
|
swf_removeobject(11);
|
|
swf_popmatrix();
|
|
}
|
|
|
|
swf_closefile();
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|