Index Topic Contents | |||
Previous Topic: Static Fields Relevant to FontStyleBvr Objects Next Topic: Static Fields Relevant to GeometryBvr Objects |
Static Methods Relevant to GeometryBvr Objects
Statics Class
importGeometryCreates a geometry behavior by synchronously importing the given VRML or .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 below for a description of the asynchronous import method.
public static GeometryBvr importGeometry(
URL url
);Parameters
- url
- The fully-qualified pathname of the file to be downloaded. This parameter is of type java.net.URL.
Return Values
Returns the GeometryBvr object.
Statics Class
importGeometryCreates a geometry behavior by asynchronously importing the given VRML or .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 method, see above.
public static GeometryBvr importGeometry(
URL url,
GeometryBvr geoStandIn,
DXMEvent[] ev,
NumberBvr[] progress,
NumberBvr[] size
);Parameters
- url
- The fully-qualified pathname of the geometry to be downloaded. This parameter is of type java.net.URL.
- geoStandIn
- The geometry to use while the contents at url are still being downloaded. This argument cannot be null.
- ev
- The event to trigger once the download is complete. This argument can be null.
- progress
- A NumberBvr that goes from 0 to 1, tracking the progress of the download. For files downloaded via http, progress is reported as the percentage of the file that has been downloaded. For other protocols, the value may simply start at 0 and change to 1 once the download is complete. This argument can be null.
- size
- The size of the geometry, in bytes. The value begins at -1 and will change to the true size if it is available. This argument can be null.
Return Values
Returns the GeometryBvr object.
Statics Class
soundSourceCreates a geometry behavior that contains the given sound behavior. The bounding box is the empty bounding box, where the maximum coordinate is less than the minimum coordinate.
public static GeometryBvr soundSource(
SoundBvr sound
);Parameters
- sound
- The SoundBvr object.
Return Values
Returns the GeometryBvr object.
Statics Class
spotLightCreates 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 desk lamps, 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.
public static GeometryBvr spotLight(
NumberBvr fullcone,
NumberBvr cutoff
);Parameters
- fullcone
- The NumberBvr object specifying the angle in radians from the main spotlight axis for which surfaces will receive full illumination from the light.
- cutoff
- The NumberBvr object specifying the angle in radians from the main spotlight axis past which surfaces will receive no illumination from the light. This parameter can also be of type double.
Return Values
Returns the GeometryBvr 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 point light 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.
Remarks
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:
Statics Class
unionCreates a geometry behavior 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.
public static GeometryBvr union(
GeometryBvr g1,
GeometryBvr g2
);Parameters
- g1 and g2
- The GeometryBvr objects.
Return Values
Returns the GeometryBvr object.
Statics Class
unionArrayCreates 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.
public static GeometryBvr unionArray(
GeometryBvr[],
geometries
);Parameters
- geometries
- The array of GeometryBvr objects.
Return Values
Returns the GeometryBvr object.
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.