ParallelGraphics
Home  »  Developer Zone  »  Products  »  Cortona VRML Client  »  VRML Extensions  »  Three-Dimensional Text
Up to VRML Extensions

AdvancedAppearance 

Animated GIF 

BumpMap 

Collision Detection 

CortonaExtrusion 

CubeEnvironment 

DirectX 9.0 Shaders 

Drag & Drop 

EventUtilities 

Flash animations 

FlashMovie 

FontStyle 

Inline Extension 

Interpolator Nodes 

Keyboard Input 

Layers and 2D Nodes 

MipMap 

NavigationInfo 

NURBS 

OrderedGroup 

Panel and HTMLText 

QuickTime 

SFVec2f Interpolator 

SphereEnvironment 

Splines 

Three-Dimensional Text 

TextureTransform3 

TransformSensor 

ZGroup 


Subscribe to Newsletter
 


Google Searchsite search:

 

%(domain)s %(domain)s
Install Cortona VRML Client!

Outline 3D

Try RobinZone!


Three-Dimensional Text
The Text3D node
Scene size: 1.2KB
Incorporate 3D text into your VRML world and format it with any True Type font installed in your Windows system.


Node description
Text3D {
 exposedField MFString string []
 exposedField SFNode fontStyle NULL
 exposedField MFFloat length []	# [0, inf)
 exposedField SFFloat maxExtent 0	# [0, inf)
 exposedField SFFloat depth 0.1	# [0, inf)
 exposedField SFFloat creaseAngle 0	# [0, inf)
 exposedField SFBool solid TRUE   
}
You can incorporate 3D text into your VRML world and format it with any True Type font installed in your Windows system. The Text3D node specifies a 3D text string object that is positioned with its middle vertical plane in the Z=0 plane of the local coordinate system, based on values defined in the fontStyle field. The Text3D nodes may contain multiple text strings using the UTF-8 encoding as specified by ISO 10646-1:1993. The text strings are stored in the order in which the text mode characters are to be produced as defined by the parameters in the FontStyle node. The fields of the Text3D node, with the exception of depth, creaseAngle and solid, are analogous to the ones for the Text node.

 
depth
The depth field contains a SFFloat value that specifies the thickness of each text string in the local coordinate system.

 
creaseAngle
The creaseAngle field affects how default normals are generated. If the angle between the geometric normals of two adjacent faces is less than or equal to the specified value for the crease angle parameter, the edge between the two adjacent faces is smooth-shaded. Otherwise, the appearance of a rendered surface is calculated so that a lighting discontinuity is produced across the edge.

 
solid
The solid field determines whether one or both sides of each polygon should be displayed. If solid is FALSE, each polygon of 3D text will be visible regardless of the viewing direction. If solid is TRUE, this results in one-sided polygon lighting.

Descriptions of the string, fontStyle, length, and maxExtent fields are provided in the VRML97 specification (see 6.47, Text).

Example

#VRML V2.0 utf8

NavigationInfo {
 type "EXAMINE"
}

DEF MainTransform Transform {
 children Shape {

  geometry Text3D {
   string ["@"]
   fontStyle FontStyle {
   justify ["MIDDLE", "MIDDLE"]
   family "Times"
   style "BOLD"
   size 4
   }
   depth 0.5
  }
  appearance Appearance {
   material Material {
    diffuseColor .28 .42 .6
    specularColor .32 .4 .4
    ambientIntensity .05
    shininess .54
    emissiveColor .14 .22 .31
   }
  }
 }
}

DEF MainInterpolator OrientationInterpolator {
 key [ 0 0.5 1 ]
 keyValue [0 1 0 0 0 1 0 3.14 0 1 0 6.28]
}

DEF MainTimer TimeSensor {
 loop TRUE
 cycleInterval 5
}


ROUTE MainTimer.fraction_changed TO MainInterpolator.set_fraction
ROUTE MainInterpolator.value_changed TO MainTransform.rotation

You can see this example in Cortona at top left corner of this page.




Last updated: Sat, 19 Jul 2008
© 2000-2008 ParallelGraphics. All rights reserved. Terms of use.