Text shape node. More...
#include <Inventor/VRMLnodes/SoVRMLText.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
SoVRMLText () | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoMFString | string |
SoSFNode | fontStyle |
SoSFFloat | maxExtent |
SoMFFloat | length |
SoSFBool | solid |
The SoVRMLText node specifies a two-sided, flat text string object positioned in the X-Y plane of the local coordinate system based on values defined in the fontStyle field (see SoVRMLFontStyle node).
NOTE: This class does not exist in Open Inventor 10.0 and later.This section may reference portions of the VRML97 specification that are not present in this help file. The complete VRML97 spec is available at http://www.web3d.org .
The SoVRMLText node specifies a two-sided, flat text string object positioned in the X-Y plane of the local coordinate system based on values defined in the fontStyle field (see SoVRMLFontStyle node). Text nodes may contain multiple text strings specified using the UTF-8 encoding as specified by the ISO 10646-1:1993 standard (see http://www.iso.org/iso/home.htm). Due to the drastic changes in Korean Jamo language, the character set of the UTF-8 will be based on ISO 10646-1:1993 plus pDAM 1 - 5 (including the Korean changes). The text strings are stored in visual order.
The text strings are contained in the string field. The fontStyle field contains one SoVRMLFontStyle node that specifies the font size, font family and style, direction of the text strings, and any specific language rendering techniques that must be used for the text.
The maxExtent field limits and scales all of the text strings if the length of the maximum string is longer than the maximum extent, as measured in the local coordinate space. If the text string with the maximum length is shorter than the maxExtent, then there is no scaling. The maximum extent is measured horizontally for horizontal text (SoVRMLFontStyle node: horizontal =TRUE) and vertically for vertical text (SoVRMLFontStyle node: horizontal =FALSE). The maxExtent field must be >= 0.0.
The length field contains an MFFloat value that specifies the length of each text string in the local coordinate space. If the string is too short, it is stretched (either by scaling the text or by adding space between the characters). If the string is too long, it is compressed (either by scaling the text or by subtracting space between the characters). If a length value is missing--for example, if there are four strings but only three length values--the missing values are considered to be 0.
For both the maxExtent and length fields, specifying a value of 0 indicates to allow the string to be any length.
Textures are applied to text as follows. The texture origin is at the origin of the first string, as determined by the justification. The texture is scaled equally in both S and T dimensions, with the font height representing 1 unit. S increases to the right, and T increases up.
ISO 10646-1:1993 Character Encodings
Characters in ISO 10646 are encoded in multiple octets. Code space is divided into four units, as follows:
+-------------+-------------+-----------+------------+ | Group-octet | Plane-octet | Row-octet | Cell-octet | +-------------+-------------+-----------+------------+
The ISO 10646-1:1993 allows two basic forms for characters:
1. UCS-2 (Universal Coded Character Set-2). Also known as the Basic Multilingual Plane (BMP). Characters are encoded in the lower two octets (row and cell). Predictions are that this will be the most commonly used form of 10646.
2. UCS-4 (Universal Coded Character Set-4). Characters are encoded in the full four octets.
In addition, three transformation formats (UCS Transformation Format (UTF) are accepted: UTF-7, UTF-8, and UTF-16. Each represents the nature of the transformation - 7-bit, 8-bit, and 16-bit. The UTF-7 and UTF-16 can be referenced in the Unicode Standard 2.0 book.
The UTF-8 maintains transparency for all of the ASCII code values (0...127). It allows ASCII text (0x0..0x7F) to appear without any changes and encodes all characters from 0x80.. 0x7FFFFFFF into a series of six or fewer bytes.
If the most significant bit of the first character is 0, then the remaining seven bits are interpreted as an ASCII character. Otherwise, the number of leading 1 bits will indicate the number of bytes following. There is always a 0 bit between the count bits and any data.
First byte could be one of the following. The X indicates bits available to encode the character.
0XXXXXXX only one byte 0..0x7F (ASCII) 110XXXXX two bytes Maximum character value is 0x7FF 1110XXXX three bytes Maximum character value is 0xFFFF 11110XXX four bytes Maximum character value is 0x1FFFFF 111110XX five bytes Maximum character value is 0x3FFFFFF 1111110X six bytes Maximum character value is 0x7FFFFFFF
All following bytes have this format: 10XXXXXX
A two byte example. The symbol for a register trade mark is "circled R registered sign" or 174 in ISO/Latin-1 (8859/1). It is encoded as 0x00AE in UCS-2 of the ISO 10646. In UTF-8 it is has the following two byte encoding 0xC2, 0xAE.
See "Concepts - Lighting Model" for details on VRML lighting equations and how SoVRMLAppearance, SoVRMLMaterial and textures interact with lighting.
The SoVRMLText node does not perform collision detection.
Shape Antialiasing type is SoShape::TEXT.
string | [] |
fontStyle | NULL |
length | [] |
maxExtent | 0.0 |
solid | FALSE |
metadata | NULL |
SoMFString | set_string |
SoSFNode | set_fontStyle |
SoMFFloat | set_length |
SoSFFloat | set_maxExtent (Note: Not implemented) |
SoSFNode | set_metadata |
SoMFString | string_changed |
SoSFNode | fontStyle_changed |
SoMFFloat | length_changed |
SoSFFloat | maxExtent_changed (Note: Not implemented) |
SoSFNode | metadata_changed |
SoVRMLText::SoVRMLText | ( | ) |
Constructor.
static SoType SoVRMLText::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoVRMLGeometry.
virtual SoType SoVRMLText::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoVRMLGeometry.
An SoVRMLFontStyle node that specifies the font size, font family and style, direction of the text strings, and and specific language rendering techniques.
The length of each text string in the local coordinate space.
(Note: Not implemented) Limits and scales all the text strings if the length of the maximum string is longer than the maximum extent.
If TRUE, only the front face of the text is displayed.
(The back face is culled.) If FALSE, both sides are displayed. This functionality is not implemented.
NOTE: field available since Open Inventor 5.0NOTE 2: This field is not compatible with VRML97. If you specify a non-default value for this field, when this node is written to a VRML file, the file will contain this incompatible field and standard VRML97 file readers will not be able to read it.
Text strings.