All Frameworks  Object Hierarchy  This Framework  Indexes   

SWKLineOfSight (Object)

This interface deals with a line of sight of a manikin.

Property Index

Length
Returns the length of the line of sight, in centimeters.
NbDOFs
Returns the number of degrees of freedom on the current line of sight.

Method Index

ApplyPosition
Applies a new relative position for the line of sight.
GetDOF
Returns a specific degree of freedom of the line of sight.
SetPosition
Sets a new absolute position for the line of sight.

Properties


o Property Length() As (Read Only)
Returns the length of the line of sight, in centimeters.
If the the value returned is -1.0, then it means that this line of sight has infinite length.
o Property NbDOFs() As (Read Only)
Returns the number of degrees of freedom on the current line of sight. This property will always be equal to 2. The two degrees of freedom on a line of sight are the up/down movement and the lateral right/lateral left movement.

Methods


o Sub ApplyPosition( piPositionIncrement)
Applies a new relative position for the line of sight.
Parameters:
piPositionIncrement
The new position to combine with the line of sight's current position.
This array must contain 12 numbers, and msut be initialized using the four columns of a transformation matrix. The first nine components represent the rotation matrix.
The last three components represent the translation vector.
Example:
This example sets the segment to a 45-degree rotation around the x axis and at a (10, 20, 30) translation from the origin.
 Dim myPosition(11)
 'Rotation (45 degrees around the x axis)
 myPosition(0)  = 1.000
 myPosition(1)  = 0
 myPosition(2)  = 0
 myPosition(3)  = 0
 myPosition(4)  = 0.707
 myPosition(5)  = 0.707
 myPosition(6)  = 0
 myPosition(7)  = -0.707
 myPosition(8)  = 0.707
 'Translation vector (10,20,30)
 myPosition(9)  = 10.000
 myPosition(10) = 20.000
 myPosition(11) = 30.000
 myManikin.Body.GetItem("LLHeEye").ApplyPosition myPosition
 
o Func GetDOF( piDOFNumber) As
Returns a specific degree of freedom of the line of sight. A line of sight always has exactly two degrees of freedom. and these are numbered 0 and 1.
Parameters:
piDOFNumber
The index of the DOF to retrieve. This parameter must be either 0 or 1.
o Sub SetPosition( piNewPosition)
Sets a new absolute position for the line of sight.
Parameters:
piNewPosition
The new position to place the line of sight.
This array must contain 12 numbers, and msut be initialized using the four columns of a transformation matrix. The first nine components represent the rotation matrix.
The last three components represent the translation vector.
Example:
This example sets the line of sight to a 45-degree rotation around the x axis and at a (10, 20, 30) translation from the origin.
 Dim myPosition(11)
 'Rotation (45 degrees around the x axis)
 myPosition(0)  = 1.000
 myPosition(1)  = 0
 myPosition(2)  = 0
 myPosition(3)  = 0
 myPosition(4)  = 0.707
 myPosition(5)  = 0.707
 myPosition(6)  = 0
 myPosition(7)  = -0.707
 myPosition(8)  = 0.707
 'Translation vector (10,20,30)
 myPosition(9)  = 10.000
 myPosition(10) = 20.000
 myPosition(11) = 30.000
 myManikin.Body.GetItem("LLHeEye").SetPosition myPosition
 

Copyright © 2003, Dassault Systèmes. All rights reserved.