Heilan X3D Browser

PaintingBackground

Type

ChildNode.

Description

Originally to be used with the Ashitaka instrument. Whenever it receives a splodgePos, or splodgePosCol event, it draws a blob on its texture, according to the current colour, or the colour passed in. This texture is then drawn as a background to the scene. It can also be stretched.

Attributes

colour SFVec3f (input) Sets the current painting colour.

splodgePos SFVec3f (input) Draws a splodge at the passed-in position (assuming the position is within the viewing window.

splodgePosCol MFVec3f (input) Same as splodgePos, only a second SFVec3f is passed in to set the colour to draw the splodge as. It will accept any number of splodgePos's and colours.

fDStretch SFFloat (input) Stretches the texture along the forward diagonal (/).

bDStretch SFFloat (input) Stretches the texture along the backward diagonal (\).

Example Use

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE X3D>
<X3D profile="Full">
	<Scene>
		<NavigationInfo type="ANY" headlight="FALSE"/>

		<PaintingBackground DEF="backg"/>

		<Transform DEF="temp" translation="0.0 0.0 0.0">
			<DirectionalLight DEF="lightDir" color="1.0 1.0 1.0" direction="-0.25 0.5 1.0"/>
			<DirectionalLight DEF="lightDir2" color="0.25 0.4 0.25" direction="0.0 -1.0 1.0"/>

			<Shape>
				<Ashitaka DEF="bob"/>
			</Shape>
		</Transform>

		<ROUTE fromNode="bob" fromField="quadsPosCol" toNode="backg" toField="splodgePosCol"/>
		<ROUTE fromNode="bob" fromField="wobble1" toNode="backg" toField="bDStretch"/>
		<ROUTE fromNode="bob" fromField="wobble2" toNode="backg" toField="fDStretch"/>

	</Scene>
</X3D>