DAZ Script |
---|
DzDebugViewUtil () |
DAZ Script | |
---|---|
void | addLine ( Number channel, DzVec3 startPosWS, DzVec3 endPosWS ) |
void | addPoint ( Number channel, DzVec3 posWS ) |
void | clearChannels () |
void | clearChannelsFromScene () |
void | createLineChannel ( Number channel, Color color, DzTimeRange range=DzTimeRange ) |
void | createPointChannel ( Number channel, Color color, DzTimeRange range=DzTimeRange ) |
void | postDebugData () |
Provides the ability to post three dimensional debugging information, such as points and/or lines, to the scene and thereby cause it to be drawn within a view of the scene - e.g., in a viewport.
Each instance of this object maintains a list of points and/or lines.
Each set of points and/or lines is defined in terms of a “channel.” Each channel is identified by a number - point channels and line channels are defined independent of one another, but may use the same identifier to establish a weak association between them.
Each channel is assigned a color at creation.
Basic workflow is to create a point/line channel, add points/lines to the channel, then post the debug data.
Example:
(function(){ var vecOrigin = new DzVec3( 0, 0, 0 ); var oViewUtil = new DzDebugViewUtil(); oViewUtil.createLineChannel( 0, Color( 255, 0, 0 ) ); oViewUtil.addLine( 0, vecOrigin, new DzVec3( 20, 0, 0 ) ); oViewUtil.createLineChannel( 1, Color( 0, 255, 0 ) ); oViewUtil.addLine( 1, vecOrigin, new DzVec3( 0, 20, 0 ) ); oViewUtil.createLineChannel( 2, Color( 0, 0, 255 ) ); oViewUtil.addLine( 2, vecOrigin, new DzVec3( 0, 0, 20 ) ); oViewUtil.postDebugData(); })();
Attention:
Since:
void : addLine( Number channel, DzVec3 startPosWS, DzVec3 endPosWS )
Adds a line to the specified channel.
Parameter(s):
void : addPoint( Number channel, DzVec3 posWS )
Adds a point to the specified channel.
Parameter(s):
void : clearChannels()
Clears the point and line channels for this object (i.e., local).
void : clearChannelsFromScene()
Clears the point and line channels for this object from the scene (i.e., global).
void : createLineChannel( Number channel, Color color, DzTimeRange range=DzTimeRange )
Creates a channel to use for drawing lines in the scene.
Parameter(s):
void : createPointChannel( Number channel, Color color, DzTimeRange range=DzTimeRange )
Creates a channel to use for drawing points in the scene.
Parameter(s):
void : postDebugData()
Posts the point and line channel data for this object (i.e., local) to the scene (i.e., global).