RHINO network camera Manual do Utilizador Página 91

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 101
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 90
91
Sample Code
Here is a simple example showing how to render an adjustable Sun-cycle study using the plugin's animation capability
through RhinoScript:
Option Explicit
Sub Maxwell_SunStudy()
Dim Maxwell
' create the ScriptObject
Set Maxwell = CreateObject("Maxwell.Script.ScriptObject")
' successfully created?
If Maxwell Is Nothing Then
Rhino.Print("Unable to create Maxwell.Script.ScriptObject.")
Exit Sub
End If
' successfully connected?
If Not Maxwell.IsConnected Then
Rhino.Print("Unable to connect to the current Maxwell scene.")
Exit Sub
End If
' enable sun and set physical sky active
Maxwell.Environment.SunEnabled = True
Maxwell.Environment.EnvironmentType = "PhysicalSky"
' no objects will move, so cache meshes
Maxwell.PluginOptions.CacheMXSMeshes = True
' loop vars
Dim endTime, frameLength
' set start time
Maxwell.DateAndTime.TimeOfDay = 7
' set end time
endTime = 19.5
' set frame interval
frameLength = 0.1
' activate the plugin's animation loop
Maxwell.Rendering.BeginAnimation()
' loop
While Maxwell.DateAndTime.TimeOfDay < endTime
' increment
Maxwell.DateAndTime.TimeOfDay = Maxwell.DateAndTime.TimeOfDay + frameLength
' write frame to disk
Maxwell.Rendering.RenderToMxs()
Wend
' done
Maxwell.Rendering.EndAnimation()
End Sub
Maxwell_SunStudy
Vista de página 90
1 2 ... 86 87 88 89 90 91 92 93 94 95 96 ... 100 101

Comentários a estes Manuais

Sem comentários