Difference between revisions of "API Panel.Position.Camera.SetLookAt"

From Flowcode Help
Jump to navigationJump to search
(XML import API auto-gen)
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
wiki page name
+
<sidebar>API Contents</sidebar>
 
Sets the eye and target point of the camera
 
Sets the eye and target point of the camera
  
 +
<div style="width:25%; float:right" class="toc">
 +
====Class hierarchy====
 +
[[API Panel|Panel]]
 +
:[[API Panel.Position|Position]]
 +
::[[API Panel.Position.Camera|Camera]]
 +
:::[[API Panel.Position.Camera|SetLookAt]]
 +
</div>
 +
__TOC__
  
===Parameters===
+
==Parameters==
''[[Variable types|HANDLE]] Eye''
+
[[Variable Types|HANDLE]] ''Eye''
 
:The position of the eye to set the camera to
 
:The position of the eye to set the camera to
  
''[[Variable types|HANDLE]] Target''
+
[[Variable Types|HANDLE]] ''Target''
 
:The position of the target to set the camera to
 
:The position of the target to set the camera to
  
''[[Variable types|BOOL]] Animate''
+
[[Variable Types|BOOL]] ''Animate''
 
:True to animate movement from the current position
 
:True to animate movement from the current position
  
===Return value===
+
 
 +
==Return value==
 
''This call does not return a value''
 
''This call does not return a value''
  
===Detailed description===
 
''No additional information''
 
  
===Examples===
+
==Detailed description==
====Calling in a calculation====
+
This call is the equivalent of calling both the [[API Panel.Position.Camera.SetEye|SetEye]] and [[API Panel.Position.Camera.SetTarget|SetTarget]] calls.
* Add to a calculation icon: ::Panel.Position.Camera.SetLookAt(eye, target, false)
+
 
 +
 
 +
The ''Eye'' and ''Target'' are used to calculate the camera coordinates. The orientation of the camera is calculated by taking the ''up-vector'' of the ''Eye'' position and rotating this to look at the target. If the up-vector is parallel to the vector from the eye to target, an orthogonal vector is chosen as ''up''.
 +
 
 +
 
 +
 
 +
==Examples==
 +
===Calling in a calculation===
 +
* Add to a calculation icon: <pre class="brush:[cpp]">::Panel.Position.Camera.SetLookAt(eye, target, false)</pre>
 +
 
 +
===SetLookAt===
 +
 
 +
Simple example to move the camera and focus the camera.
 +
 
 +
{{Fcfile|CameraSetLookAt.fcfx|CameraSetLookAt}}

Latest revision as of 14:57, 11 May 2016

<sidebar>API Contents</sidebar> Sets the eye and target point of the camera

Class hierarchy

Panel

Position
Camera
SetLookAt

Parameters

HANDLE Eye

The position of the eye to set the camera to

HANDLE Target

The position of the target to set the camera to

BOOL Animate

True to animate movement from the current position


Return value

This call does not return a value


Detailed description

This call is the equivalent of calling both the SetEye and SetTarget calls.


The Eye and Target are used to calculate the camera coordinates. The orientation of the camera is calculated by taking the up-vector of the Eye position and rotating this to look at the target. If the up-vector is parallel to the vector from the eye to target, an orthogonal vector is chosen as up.


Examples

Calling in a calculation

  • Add to a calculation icon:
    ::Panel.Position.Camera.SetLookAt(eye, target, false)

SetLookAt

Simple example to move the camera and focus the camera.

FC6 Icon.png CameraSetLookAt