AGI STK Objects 11Send comments on this topic.
SetLocationType Method (IAgSensor)
See Also  Example
LocationType
Windows






Windows & Linux

Description

The sensor's location type, a member of the AgESnLocation enumeration.

Syntax

[Visual Basic .NET]
Public Sub SetLocationType( _
   ByVal LocationType As AgESnLocation _
) 
[C#]
public void SetLocationType(
   AgESnLocation LocationType
);
[Managed C++]
public: void SetLocationType(
   AgESnLocation LocationType
);
[Java]
public  setLocationType(
   AgESnLocation LocationType
);
[Unmanaged C++]
public: HRESULT SetLocationType(
   AgESnLocation LocationType
);

Parameters

LocationType
MemberValueDescription
eSnFixed0Fixed: the location of the sensor is defined using a fixed displacement vector with respect to the parent objects body frame.
eSn3DModel13D Model: the location of the sensor is defined using the sensor's 3D Graphics Vertex Offset properties.
eSn3DModelWithScale23D Model with Scale: the location of the sensor is defined using the sensor's 3D Graphics Vertex Offset properties. Location is computed using the scaled model defined for visualization.
eSnCenter3Center: the sensor is located at the center of its parent object.
eSnLocationCrdnPoint4Point: the sensor's location is based upon a Vector Geometry Tool point.

Example

Define location from Vector Geometry Tool point
[C#]Copy Code
// Set location type to VGT 
sensor.SetLocationType(AgESnLocation.eSnLocationCrdnPoint); 
 
// Get IAgLocationCrdnPoint interface 
IAgLocationCrdnPoint vgtPoint = sensor.LocationData as IAgLocationCrdnPoint; 
 
// point sensor to an already existing object 
vgtPoint.PointPath = "Facility/Facility1 Center"
 

Define location from Vector Geometry Tool point
[Visual Basic .NET]Copy Code
' Set location type to VGT
sensor.SetLocationType(AgESnLocation.eSnLocationCrdnPoint)

' Get IAgLocationCrdnPoint interface
Dim vgtPoint As IAgLocationCrdnPoint = TryCast(sensor.LocationData, IAgLocationCrdnPoint)

' point sensor to an already existing object
vgtPoint.PointPath = "Facility/Facility1 Center"

See Also

© 2018 Analytical Graphics, Inc. All Rights Reserved.