DirectAnimation Animated Header --DAStatic Functions Relevant to DAGeometry Objects DirectAnimation Animated Header --DAStatic Functions Relevant to DAGeometry Objects* Microsoft DirectAnimation SDK
*Index  *Topic Contents
*Previous Topic: DAStatic Properties Relevant to DAFontStyle Objects
*Next Topic: DAStatic Properties Relevant to DAGeometry Objects

DAStatic Functions Relevant to DAGeometry Objects



ImportGeometry

DAStatics Class

Creates a DAGeometry by synchronously importing the given .X file. Synchronous loads are blocking calls, which means that ticking will not continue on any model until all synchronous downloads are completed. These downloads should be small and listed before asynchronous downloads. Use asynchronous downloads for more complex images and sounds. See ImportGeometryAsync for a description of the asynchronous import function.

lib.ImportGeometry(
  url
  )

Parameters
url
The pathname (a string) of the file to be downloaded.
Return Values

Returns the DAGeometry object.


ImportGeometryAsync

DAStatics Class

Asynchronously imports the given .X file. Asynchronous downloads should be listed after synchronous ones and used for more complex sounds and images. For a description of the synchronous import function, see ImportGeometry.

lib.ImportGeometryAsync(
  url,
  geoStandIn
  )

Parameters
url
The pathname (a string) of the geometry to be downloaded.
geoStandIn
The geometry to use while the contents at url are still being downloaded. This argument cannot be null.
Return Values

Returns the DAImportationResult object, which has the following relevant properties:


SoundSource

DAStatics Class

Creates a DAGeometry object that contains sound. The bounding box is the empty bounding box, where the maximum coordinate is less than the minimum coordinate.

lib.SoundSource(
  sound
  )

Parameters
sound
The DASound object that contained within the geometry.
Return Values

Returns the DAGeometry object.


SpotLightAnim

DAStatics Class

Creates a spotlight geometry. A spotlight is a positioned, directed light source initially located at the origin and directed along the negative z-axis. Examples of real-world spotlights include desklamps, headlights, and flashlights. The bounding box is the empty bounding box, where the maximum extent is less than the minimum extent.

The fullcone parameter specifies the half-angle of the region that will receive the full intensity of the spotlight. This parameter can have values from 0.00 to pi.

The cutoff parameter specifies the half-angle of the region past which surfaces will receive no illumination. This parameter can have values from the value of fullcone to pi.

lib.SpotLightAnim(
  fullcone,
  cutoff
  )

Parameters
fullcone
The DANumber object specifying the angle in radians from the main spotlight axis for which surfaces will receive full illumination from the light. This must be an animated number.
cutoff
The DANumber object specifying the angle in radians from the main spotlight axis past which surfaces will receive no illumination from the light. This must be an animated number.
Return Values

Returns the DAGeometry object.

Remarks

Surfaces receive illumination from the spotlight in the following manner:

These rules are illustrated in the following diagram:

Spotlight

Remarks

The following diagram shows how the intensity of the spotlight changes in relationship to the angle:

Intensity


SpotLight

DAStatics Class

Same as SpotLightAnim except that cutoff is a non-animated number (a double). Note that fullcone is still an animated number (a DANumber).

lib.SpotLight(
  fullcone,
  cutoff
  )


UnionGeometry

DAStatics Class

Creates a DAGeometry object by combining the given geometries. The new geometry contains all elements of the original geometries. The bounding box of a set of unioned geometries is simply the union of the bounding boxes of each of the geometries.

lib.UnionGeometry(
  g1,
  g2
  )

Parameters
g1 and g2
The DAGeometry objects.
Return Values

Returns the DAGeometry object.


UnionGeometryArray

DAStatics Class

Creates a geometry behavior by combining the geometries in the array. The new geometry contains all elements of the original geometries. The bounding box of a set of unioned geometries is simply the union of the bounding boxes of each of the geometries.

lib.UnionGeometryArray(
  geoArray
  )

Parameters
geoArray
The array of DAGeometry objects.
Return Values

Returns the DAGeometry object.

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page