directionConfirmGlobal Class
Item Index
Methods
- dir_addVectorFromMouse
- dir_addVectorToPair
- dir_changeCurrentPair
- dir_confirmPair
- dir_deconfirmPair
- dir_dehighlight
- dir_doDrag
- dir_doMouseDown
- dir_doMouseLeave
- dir_doMouseUp
- dir_doMouseUp
- dir_fixOpacity
- dir_getDir
- dir_getDirectionFromMouse
- dir_grab
- dir_grabExtension
- dir_highlight
- dir_initAxisLines
- dir_insertAssemblyPairs
- dir_insertVectorView
- dir_justDont
- dir_linkPair
- dir_linkParts
- dir_loadParts
- dir_parseData
- dir_readMultipleFiles
- dir_recieveData
- dir_removeVectorView
- dir_remVectorFromPair
- dir_renderXML
- dir_sendData
- dir_updateAxisLines
- dir_vecEntryUpdate
- dir_whoIsLeft
- doPartDrag
- part_doMouseDown
- part_doMouseLeave
- part_doMouseUp
- part_doZoom
- part_justDont
Methods
dir_addVectorFromMouse
-
mouseX -
mouseY
Adds a vector to the currently displayed pair based off of camera position, mouse X and mouse Y
Parameters:
-
mouseXFloatThe X position of the mouse
-
mouseYFloatThe Y position of the mouse
Returns:
dir_addVectorToPair
-
theButton
Inserts a blank vector widget into the vector view element
Parameters:
-
theButtonHTML ElementThe "add vector" button
Returns:
dir_changeCurrentPair
-
theButton
Given an HTML element corresponding to a "focus" button, makes the corresponding pair of parts to be displayed
Parameters:
-
theButtonHTML ElementThe confirm button of the element to be moved
Returns:
dir_confirmPair
-
theButton
Given an HTML element corresponding to a "confirm" button, moves the parent element to the confirmed section of the webpage
Parameters:
-
theButtonHTML ElementThe confirm button of the element to be moved
Returns:
dir_deconfirmPair
-
theButton
Given an HTML element corresponding to a "unconfirm" button, moves the parent element to the unconfirmed section of the webpage
Parameters:
-
theButtonHTML ElementThe unconfirm button of the element to be moved
Returns:
dir_dehighlight
-
thePair
dir_dehighlights the given pair of parts
Parameters:
-
thePairObjectThe pair object to be dir_dehighlighted
Returns:
dir_doDrag
-
theEvent
Given a mousedrag event, rotates the camera or adds a vector to the currently displayed pair, depending upon whether or not the left or right mouse button is depressed
Parameters:
-
theEventMouseup event
Returns:
dir_doMouseDown
-
theEvent
Given a mousedown event, sets corresponding internal button states for mouse-related controls
Parameters:
-
theEventMousedown event
Returns:
dir_doMouseLeave
-
theEvent
Given a mouseleave event, sets corresponding internal button states for mouse-related controls
Parameters:
-
theEventMouseup event
Returns:
dir_doMouseUp
-
theEvent
Given a mousewheel event, changes the distance of the camera from the center of the scene
Parameters:
-
theEventMouseup event
Returns:
dir_doMouseUp
-
theEvent
Given a mouseup event, sets corresponding internal button states for mouse-related controls
Parameters:
-
theEventMouseup event
Returns:
dir_fixOpacity
-
theSlider
Sets the opacity of each (non-dir_highlighted) mesh object to the value of the slider element provided
Parameters:
-
theSliderObjectThe slider which is to be referenced when setting object opacity
Returns:
dir_getDir
-
theVec
Finds and returns the index of the direction in the list of usable vector directions which best matches the given vector
Parameters:
-
theVecVector3The vector to be searched with
Returns:
The index of the best matching direction in the list of usable vector directions
dir_getDirectionFromMouse
-
mouseX -
mouseY
Maps a given mouse X position and mouse Y position to a point on a unit hemisphere facing towards the user then returns the index of the closest valid direction
Parameters:
-
mouseXFloat -
mouseYFloat
Returns:
dir_grab
-
theTree -
theMember
Given a jQuery object and a string, returns the first child of the given element with a tag equivalent to the given string.
Parameters:
-
theTreeJQuery ObjectThe jQuery object whose child is to be returned
-
theMemberStringThe name of the tag being searched
Returns:
The first child with the given tag. If such a child does not exist, null is returned.
dir_grabExtension
-
theName
Accepts a string and outputs the string of all characters following the final '.' symbol in the string. This is used internally to extract file extensions from file names.
Parameters:
-
theNameStringThe file name to be processed
Returns:
the extension in the given file name. If no extension is found, the 'undefined' value is returned.
dir_highlight
-
thePair
dir_highlights the given pair of parts
Parameters:
-
thePairObjectThe pair object to be dir_highlighted
Returns:
dir_initAxisLines
()
Void
Initializes the lines for the XYZ compass in the display
Returns:
dir_insertAssemblyPairs
()
Void
Populates the webpage with graphical representations of the assembly pairs stored in the global variable assemblyPairs
Returns:
dir_insertVectorView
-
theButton
Inserts the vector view into the webpage
Parameters:
-
theButtonHTML ElementThe vector viewing button
Returns:
dir_justDont
-
theEvent
Prevents the default response of the given event (used to prevent dropdown menus when right clicking on the display).
Parameters:
-
theEventEvent ObjectThe event to suppress the default response of.
Returns:
dir_linkPair
-
a -
b -
vec
Accepts two strings, a and b, and a vector, vec, and outputs a constructed part pair object if the two strings correspond to two extant parts
Parameters:
-
aStringThe first part name
-
bStringThe second part name
-
vecVector3The vector to be added to the pair
Returns:
The resulting pair object
dir_linkParts
()
Void
Links together the pairs of parts corresponding to the strings present in the namePairs array.
Returns:
dir_loadParts
()
Void
Called internally upon every recieved fileload event. Checks if every file reader in the array "fileReaders" has fully read each of their files. If so, then the function converts all recieved stl files into threeJS models and executes "dir_renderParts".
Returns:
dir_parseData
()
Void
Populates the webpage with data stored int the global variable theSML
Returns:
dir_readMultipleFiles
-
evt
Accepts a fileinput event, presumably from a file upload event listener, and assigns functions to each file reader listed in the event to be called upon the full loading of that given reader's files
Parameters:
-
evtEventA fileinput event, to be given by a fileinput event listener
Returns:
dir_recieveData
-
theXMLFile -
theSTLFiles
The function which handles the actual dir_rendering of the solution file animation and loading in the models
Parameters:
-
theXMLFileString -
theSTLFilesObject
Returns:
dir_removeVectorView
-
theButton
Removes the vector view from the webpage
Parameters:
-
theButtonHTML ElementThe vector viewing button
Returns:
dir_remVectorFromPair
-
theButton
Removes a vector widget from the vector view element
Parameters:
-
theButtonHTML ElementThe "remove" button of the widget to be removed
Returns:
dir_renderXML
()
Void
Processes the information in the webpage into an XML string and inserts a download link for the data into the top of the page
Returns:
dir_sendData
-
theXMLText
Is called whenever the user submits the part table and every entry has been properly filled out.
Parameters:
-
theXMLTextStringThe contents of the disassembly directions in the webpage, as a string in XML formatting
Returns:
dir_updateAxisLines
()
Void
Updates the lines for the XYZ compass in the display
Returns:
dir_vecEntryUpdate
-
theInput
Updates a vector to match the values in its corresponding widget
Parameters:
-
theInputHTML ElementAn input element of the vector's widget
Returns:
dir_whoIsLeft
-
theReaders
Outputs through the console the list of FileReaders in theReaders which have not yet completed their loading
Parameters:
-
theReadersFileReader Object ListThe list of FileReaders to be checked
Returns:
doPartDrag
-
theEvent
Given a mousedrag event, rotates the camera or adds a vector to the currently displayed pair, depending upon whether or not the left or right mouse button is depressed
Parameters:
-
theEventMouseup event
Returns:
part_doMouseDown
-
theEvent
Given a mousedown event, sets corresponding internal button states for mouse-related controls
Parameters:
-
theEventMousedown event
Returns:
part_doMouseLeave
-
theEvent
Given a mouseleave event, sets corresponding internal button states for mouse-related controls
Parameters:
-
theEventMouseup event
Returns:
part_doMouseUp
-
theEvent
Given a mouseup event, sets corresponding internal button states for mouse-related controls
Parameters:
-
theEventMouseup event
Returns:
part_doZoom
-
theEvent
Given a mousewheel event, changes the distance of the camera from the center of the scene
Parameters:
-
theEventMouseup event
Returns:
part_justDont
-
theEvent
Prevents the default response of the given event (used to prevent dropdown menus when right clicking on the display).
Parameters:
-
theEventEvent ObjectThe event to suppress the default response of.
