input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public boolean link from frame requested frame avoid loops if requested frame linked frames list is empty linked frames list contains this requested frame this return false if linked frames list add requested frame requested frame src frame this requested frame set kernel kernel return true return false
|
attempts to link the
|
public string keyboard shortcuts description string description new string for entry keyboard shortcut scene camera keyboard action entry keyboard map entry set description entry get key description entry get value description n return description
|
returns a string containing the camera keyboard bindings descriptions
|
public void add handler object obj string method name try handler method obj get class get method method name new class hidevice class handler object obj handler method name method name catch exception e papplet println something went wrong when registering your method name method e print stack trace
|
attempt to add a feed handler method to the hidevice
|
public void mouse pressed point event point camera camera if grabs mouse keeps grabbing mouse true prev pos press pos event point
|
initiates the interactive frame mouse manipulation
|
public string camera wheel bindings description string description new string for entry integer scene mouse action entry camera wheel actions map entry set if key event get modifiers ex text entry get key length 0 description wheel key event get modifiers ex text entry get key entry get value description n else description wheel entry get value description n return description
|
returns a string containing the camera mouse wheel bindings descriptions
|
public void remove handler handler method null handler object null handler method name null
|
unregisters the feed handler method if any has previously been added to
|
public boolean unlink boolean result false if src frame null result src frame linked frames list remove this if result set kernel new frame kernel src frame translation src frame rotation src frame null return result
|
unlinks this frame from its source frame
|
public void start interpolation start interpolation 1
|
convenience function that simply calls
|
public string frame wheel bindings description string description new string for entry integer scene mouse action entry frame wheel actions map entry set if key event get modifiers ex text entry get key length 0 description wheel key event get modifiers ex text entry get key entry get value description n else description wheel entry get value description n return description
|
returns a string containing the interactive frame mouse wheel bindings descriptions
|
public boolean unlink from frame requested frame boolean result false if src frame null requested frame this result linked frames list remove requested frame if result requested frame set kernel new frame kernel translation rotation requested frame src frame null return result
|
unlinks the requested frame from this frame
|
public void mouse released point event camera camera keeps grabbing mouse false if prev constraint null set constraint prev constraint if action scene mouse action rotate action scene mouse action screen rotate mouse speed spinning sensitivity start spinning delay action scene mouse action no mouse action
|
stops the interactive frame mouse manipulation
|
public void next camera mode switch cam mode case first person set camera mode camera mode google earth break case google earth if hidevice class this get class set camera mode camera mode first person else set camera mode camera mode custom break case google earth set camera mode camera mode world break case world if hidevice class this get class set camera mode camera mode first person else set camera mode camera mode custom break case custom set camera mode camera mode first person break
|
sets the next camera mode
|
public void set shortcut character key camera keyboard action action if is key in use key camera keyboard action a shortcut key papplet println warning overwritting shortcut which was previously binded to a keyboard set binding new keyboard shortcut key action
|
defines a camera keyboard shortcut to bind the given action
|
public camera mode camera mode return cam mode
|
returns the current camera mode
|
protected void start action scene mouse action action start action action true
|
protected method that simply calls
|
public void set camera mode camera mode c mode cam mode c mode if cam mode camera mode google earth camera interpolate to fit scene papplet println cam mode description
|
sets the camera handle mode
|
public void set shortcut integer mask character key camera keyboard action action set shortcut mask desktop events get vkey key action
|
defines a camera keyboard shortcut to bind the given action
|
protected void start action scene mouse action act boolean with constraint action act if with constraint prev constraint null else prev constraint constraint set constraint null switch action case rotate case screen rotate mouse speed 0 0f stop spinning break case screen translate dir is fixed false break default break
|
protected internal method used to handle mouse actions
|
public void stop interpolation if timer null timer cancel timer purge interpolation strt false
|
stops an interpolation started with
|
public boolean are linked together frame source frame if source frame src frame return true if linked frames list contains source frame return true return false
|
returns true if this frame is linked with
|
protected void compute mouse speed point event point float dist float point distance event point x event point y prev pos get x prev pos get y if started time 0 delay 0 started time int system current time millis else delay int system current time millis started time started time int system current time millis if delay 0 less than a millisecond assume delay 1ms mouse speed dist else mouse speed dist delay
|
updates mouse speed measured in pixels milliseconds
|
public void set shortcut integer mask integer v key camera keyboard action action if is key in use mask v key camera keyboard action a shortcut mask v key papplet println warning overwritting shortcut which was previously binded to a keyboard set binding new keyboard shortcut mask v key action
|
defines a camera keyboard shortcut to bind the given action
|
public void reset interpolation stop interpolation set interpolation time first time
|
stops the interpolation and resets
|
public iframe mode i frame mode mode return i frame mode
|
returns the current interactive frame manipulation mode
|
public void proscenium
|
the method that actually defines the scene
|
public void set iframe mode iframe mode i mode i frame mode i mode papplet println i frame mode description
|
sets the interactive frame manipulation mode
|
public void set shortcut integer v key camera keyboard action action if is key in use v key camera keyboard action a shortcut v key papplet println warning overwritting shortcut which was previously binded to a keyboard set binding new keyboard shortcut v key action
|
defines a camera keyboard shortcut to bind the given action
|
public void add key frame frame frame add key frame frame true
|
convenience function that simply calls
|
public void set mode mode m if m mode absolute if prev translation null prev translation new pvector if prev rotation null prev rotation new pvector mode m
|
sets the device type
|
public void remove all shortcuts keyboard remove all bindings
|
removes all camera keyboard shortcuts
|
public void add key frame frame frame boolean set ref float time if key fr is empty time 0 0f else time key fr get key fr size 1 time 1 0f add key frame frame time set ref
|
appends a new key frame to the path
|
public void set xaxis pvector axis rotate new quaternion new pvector 1 0f 0 0f 0 0f transform of axis
|
rotates the frame so that its
|
public void remove shortcut character key keyboard remove binding new keyboard shortcut key
|
removes the camera keyboard shortcut
|
public boolean is detached from p5 camera return is attached to p5 camera
|
convenience function that simply returns
|
public void add key frame frame frame float time add key frame frame time true
|
convenience function that simply calls
|
public camera camera return cam
|
returns the associated camera never
|
public void remove shortcut integer mask character key remove shortcut mask desktop events get vkey key
|
removes the camera keyboard shortcut
|
public void add key frame frame frame float time boolean set ref if frame null return if key fr is empty interpolation tm time if key fr is empty key fr get key fr size 1 time time papplet println error in key frame interpolator add key frame time is not monotone else key fr add new key frame frame time set ref connect frame signal modified slot invalidate values if set ref only when setting reference frame add listener this values are valid false path is valid false current frm valid false reset interpolation
|
appends a new key frame to the path with its associated
|
public void set yaxis pvector axis rotate new quaternion new pvector 0 0f 1 0f 0 0f transform of axis
|
rotates the frame so that its
|
public void remove shortcut integer mask integer v key keyboard remove binding new keyboard shortcut mask v key
|
removes the camera keyboard shortcut
|
public void delete path stop interpolation remove frames from mouse grabber pool key fr clear path is valid false values are valid false current frm valid false
|
removes all key frames from the path
|
public void remove shortcut integer v key keyboard remove binding new keyboard shortcut v key
|
removes the camera keyboard shortcut
|
public void set camera camera camera if camera null return camera set scene radius radius camera set scene center center camera set screen width and height pg3d width pg3d height cam camera show all
|
replaces the current
|
protected void remove frames from mouse grabber pool for int i 0 i key fr size i if key fr get i frame null if interactive frame key fr get i frame is in mouse grabber pool interactive frame key fr get i frame remove from mouse grabber pool
|
removes all the frames from the mouse grabber pool if they were provided
|
public void set zaxis pvector axis rotate new quaternion new pvector 0 0f 0 0f 1 0f transform of axis
|
rotates the frame so that its
|
public camera keyboard action shortcut character key return keyboard binding new keyboard shortcut key
|
returns the action that is binded to the given camera keyboard shortcut
|
public void attach to p5 camera if is attached to p5 camera attached to pcam true projection mat pg3d projection model view mat pg3d modelview compute projection matrix compute model view matrix
|
set the camera matrices as references to the processing camera matrices
|
public camera keyboard action shortcut integer mask character key return shortcut mask desktop events get vkey key
|
returns the action that is binded to the given camera keyboard shortcut
|
public pvector x axis return inverse transform of new pvector 1 0f 0 0f 0 0f
|
returns the x axis of the frame represented as a normalized vector defined
|
public void detach from p5 camera if is attached to p5 camera attached to pcam false model view mat new pmatrix3 d projection mat new pmatrix3 d projection mat set 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 compute projection matrix compute model view matrix
|
create new independent camera matrices objects i
|
public camera keyboard action shortcut integer mask integer v key return keyboard binding new keyboard shortcut mask v key
|
returns the action that is binded to the given camera keyboard shortcut
|
public interactive frame interactive frame return gl iframe
|
returns the interactive frame associated to this scene
|
public camera keyboard action shortcut integer v key return keyboard binding new keyboard shortcut v key
|
returns the action that is binded to the given camera keyboard shortcut
|
public void draw path draw path 1 6 100
|
convenience function that simply calls
|
public pvector y axis return inverse transform of new pvector 0 0f 1 0f 0 0f
|
returns the y axis of the frame represented as a normalized vector defined
|
public boolean is key in use character key return keyboard is shortcut in use new keyboard shortcut key
|
returns true if the given camera keyboard shortcut binds an action
|
public void draw path float scale draw path 1 6 scale
|
convenience function that simply calls
|
public trackable avatar return trck
|
returns the avatar object to be tracked by the camera when
|
public boolean is key in use integer mask character key return is key in use mask desktop events get vkey key
|
returns true if the given camera keyboard shortcut binds an action
|
public void draw path int mask int nb frames draw path mask nb frames 100
|
convenience function that simply calls
|
public pvector z axis return inverse transform of new pvector 0 0f 0 0f 1 0f
|
returns the z axis of the frame represented as a normalized vector defined
|
public boolean is key in use integer mask integer v key return keyboard is shortcut in use new keyboard shortcut mask v key
|
returns true if the given camera keyboard shortcut binds an action
|
public void set position pvector pos frame set position pos
|
sets the camera
|
public boolean is key in use integer v key return keyboard is shortcut in use new keyboard shortcut v key
|
returns true if the given camera keyboard shortcut binds an action
|
public void apply transformation papplet p apply transformation pgraphics3 d p g
|
convenience wrapper function that simply calls
|
public frame key frame int index key frame kf key fr get index return new frame kf position kf orientation
|
returns the frame associated with the key frame at index
|
public void set avatar trackable t trck t avatar is interactive avatar frame false avatar is interactive drivable frame false if avatar instanceof interactive avatar frame avatar is interactive avatar frame true avatar is interactive drivable frame true if interactive frame null interactive drivable frame interactive frame set fly speed 0 01f radius else if avatar instanceof interactive drivable frame avatar is interactive avatar frame false avatar is interactive drivable frame true if interactive frame null interactive drivable frame interactive frame set fly speed 0 01f radius
|
sets the avatar object to be tracked by the camera when
|
public pvector up vector return frame y axis
|
returns the normalized up vector of the camera defined in the world
|
public boolean is keyboard action binded camera keyboard action action return keyboard is action mapped action
|
returns true if there is a camera keyboard shortcut for the given action
|
public float key frame time int index return key fr get index time
|
returns the time corresponding to the
|
public void apply transformation pgraphics3 d p3d p3d translate translation x translation y translation z p3d rotate rotation angle rotation axis x rotation axis y rotation axis z
|
apply the transformation defined by this frame to
|
public void unset avatar trck null avatar is interactive avatar frame false avatar is interactive drivable frame false
|
if theres a avatar unset it
|
public void remove all camera mouse bindings camera actions remove all bindings
|
removes all camera mouse action bindings
|
public float duration return last time first time
|
returns the duration of the key frame interpolator path expressed in
|
public void set up vector pvector up set up vector up true
|
convenience function that simply calls
|
public boolean is camera mouse binding in use integer mask return camera actions is shortcut in use mask
|
returns true if the given binding binds a camera mouse action
|
public float first time if key fr is empty return 0 0f else return key fr get 0 time
|
returns the time corresponding to the first key frame expressed in seconds
|
public boolean is camera mouse action binded scene mouse action action return camera actions is action mapped action
|
returns true if the given camera mouse action is binded
|
public void set up vector pvector up boolean no move quaternion q new quaternion new pvector 0 0f 1 0f 0 0f frame transform of up if no move frame set position pvector sub arcball reference point quaternion multiply frame orientation q rotate frame coordinates of arcball reference point frame rotate q useful in fly mode to keep the horizontal direction frame update fly up vector
|
rotates the camera so that its
|
public float last time if key fr is empty return 0 0f else return key fr get key fr size 1 time
|
returns the time corresponding to the last key frame expressed in seconds
|
public void set camera mouse binding integer mask scene mouse action action if is camera mouse binding in use mask mouse action a camera mouse binding mask papplet println warning overwritting binding which was previously associated to a camera actions set binding mask action
|
binds the camera mouse action to the given binding
|
public pvector view direction return frame inverse transform of new pvector 0 0f 0 0f 1 0f
|
returns the normalized view direction of the camera defined in the world
|
public void remove camera mouse binding integer mask camera actions remove binding mask
|
removes the camera mouse action binding
|
public void remove all frame bindings frame actions remove all bindings
|
removes all frame mouse action bindings
|
public void set view direction pvector direction if math utils squared norm direction 1 e 10 return pvector x axis direction cross up vector if math utils squared norm x axis 1 e 10 target is aligned with up vector this means a rotation around x axis x axis is then unchanged let s keep it x axis frame inverse transform of new pvector 1 0f 0 0f 0 0f quaternion q new quaternion q from rotated basis x axis x axis cross direction pvector mult direction 1 frame set orientation with constraint q
|
rotates the camera so that its
|
public mouse grabbable mouse grabber return mouse grbbr
|
returns the current mouse grabber or
|
public boolean is frame mouse binding in use integer mask return frame actions is shortcut in use mask
|
returns true if the given binding binds a frame mouse action
|
public pvector right vector return frame x axis
|
returns the normalized right vector of the camera defined in the world
|
public boolean is frame mouse action binded scene mouse action action return frame actions is action mapped action
|
returns true if the given frame mouse action is binded
|
public void set frame mouse binding integer mask scene mouse action action if is frame mouse binding in use mask mouse action a frame mouse binding mask papplet println warning overwritting binding which was previously associated to a frame actions set binding mask action
|
binds the frame mouse action to the given binding
|
protected void set mouse grabber mouse grabbable mouse grabber mouse grbbr mouse grabber mouse grabber is an iframe mouse grabber instanceof interactive frame
|
directly defines the
|
public quaternion orientation return frame orientation
|
returns the camera orientation defined in the world coordinate system
|
public void remove frame mouse binding integer mask frame actions remove binding mask
|
removes the frame mouse action binding
|
public void remove all click bindings click actions remove all bindings
|
removes all camera mouse click bindings
|
public boolean is in mouse grabber pool mouse grabbable mouse grabber return mouse grabber pool contains mouse grabber
|
returns true if the mouse grabber is currently in the
|
public boolean is click binding in use scene button button return click actions is shortcut in use new click binding button
|
returns true if the given binding binds a click action
|
public void set orientation quaternion q frame set orientation q frame update fly up vector
|
sets the camera
|
public boolean is click binding in use integer mask scene button button return click actions is shortcut in use new click binding mask button
|
returns true if the given binding binds a click action
|
public void add in mouse grabber pool mouse grabbable mouse grabber if is in mouse grabber pool mouse grabber mouse grabber pool add mouse grabber
|
adds the mouse grabber in the
|
public void set kind kind k if k knd last frame update scene parent frame count knd k
|
sets the kind of the camera proscene or standard
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.