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
DAStatics Class
ImportGeometryCreates 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.
DAStatics Class
ImportGeometryAsyncAsynchronously 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:
- CompletionEvent, which is the event that triggers once the download is complete.
- Geometry, which is the imported DAGeometry object.
- Progress, which is the progress of the download.
- Size, which is the size of the download.
DAStatics Class
SoundSourceCreates 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.
DAStatics Class
SpotLightAnimCreates 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:
- If the surface point is within fullcone radians of the main spotlight axis, the spotlight acts as a pointlight source (including distance attenuation effects).
- If the surface point is greater than fullcone radians, but is within cutoff radians of the main spotlight axis, the surface receives illumination that is attenuated by the angular displacement.
- If the surface point is greater than cutoff radians from the main spotlight axis, it receives no illumination.
These rules are illustrated in the following diagram:
Remarks
The following diagram shows how the intensity of the spotlight changes in relationship to the angle:
DAStatics Class
SpotLightSame 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
)DAStatics Class
UnionGeometryCreates 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.
DAStatics Class
UnionGeometryArrayCreates 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.