Regular API function

simAdjustView / sim.adjustView

Description Adjusts parameters of a view. See also the sim.floatingViewAdd and sim.cameraFitToView functions.
C synopsis simInt simAdjustView(simInt viewHandleOrIndex,simInt associatedViewableObjectHandle,simInt options,const simChar* viewLabel)
C parameters
viewHandleOrIndex: the handle of the view (can also be a floating view), or the index of the view.
associatedViewableObjectHandle: handle of the object that you wish to associate with the view. Must be a viewable object. Can also be -1, in which case the view is emptied
options: bit-coded:
bit0-bit3=the 3D display mode (0=solid rendering, 1=wireframe rendering)
bit4 (16) set=orthogonal projection (otherwise perspective projection)
bit5 (32) set=x/y graph display (otherwise time-graph display)
bit6 (64) set=floating view is removed at simulation end
bit7 (128) set=floating view is ignored during a scene save operation
bit8 (256) set=the view is not modified. The return value of the function indicates if the view still exists (2), or does not exist anymore (1). No error is generated.
bit9 (512) set=the view is not modified. The return value of the function represents the object associated with the view.
bit10 (1024) set=x/y graph has x view size proportional to y view size.
viewLabel: a label that will be displayed at the top of a floating view. If nullptr is specified, then the name of the associated viewable object is taken as label.
C return value
A value >0 in case of success
Lua synopsis int result=sim.adjustView(int viewHandleOrIndex,int associatedViewableObjectHandle,int options,string viewLabel=nil)
Lua parameters
Similar to the C-function counterpart
Lua return values
Similar to the C-function counterpart