Description This function sets the configuration parameters for a Ray Fan type Source Primitive. A boolean is returned indicating whether the parameters were successfully applied.
Syntax success = SourcePrimSetParmRayFan( spNode, tFan )
Parameters success (Boolean) Returned boolean indicating whether the parameters were successfully applied to the source node.
spNode As Long Node number of the Ray Fan type Source Primitive being modified.
tFan as T_SOURCEPRIMRAYFAN Data structure containing the configuration parameters of the Ray Fan.
Example The example below demonstrates how to add a Ray Fan type Source Primitive using the T_SOURCEPRIMRAYFAN data structure.
Sub Main
Dim spNode As Long Dim spType As String Dim tEnt As T_ENTITY
'String specifying the type of SP being created spType = "Ray Fan"
'Generic entity information InitEntity( tEnt ) tEnt.name = spType tEnt.Description = "Added via scripting"
'Add the node spNode = AddSourcePrim( spType, tEnt ) Print "Source primitive added at node number " & spNode
'Configure the parameters Dim success As Boolean Dim tFan As T_SOURCEPRIMRAYFAN tFan.AxisY = 1 '1=True, fan is along Y-axis tFan.numRays = 40 'Number of rays across diameter tFan.PowerWatts = 1.0 'Total power of the source in units of Watts tFan.RaySpec = 0 '0 = "Along direction", 1 = "From position" tFan.ReverseDir = 0 '0 = dont reverse, 1 = reverse rays tFan.semi = 2 'Semi-aperture of the ray fan tFan.Vec = "0,0,1" 'Ray direction vector string success = SourcePrimSetParmRayFan( spNode, tFan )
'Update the document Update
End Sub
See Also Source Primitive Script Commands
|