KiCad PCB EDA Suite
|
Defines the generic material appearance of a scenegraph object. More...
#include <sg_appearance.h>
Public Member Functions | |
void | unlinkChildNode (const SGNODE *aNode) noexcept override |
Remove references to an owned child. | |
void | unlinkRefNode (const SGNODE *aNode) noexcept override |
Remove pointers to a referenced node. | |
SGAPPEARANCE (SGNODE *aParent) | |
virtual | ~SGAPPEARANCE () |
virtual bool | SetParent (SGNODE *aParent, bool notify=true) override |
Set the parent SGNODE of this object. | |
bool | SetEmissive (float aRVal, float aGVal, float aBVal) |
bool | SetEmissive (const SGCOLOR *aRGBColor) |
bool | SetEmissive (const SGCOLOR &aRGBColor) |
bool | SetDiffuse (float aRVal, float aGVal, float aBVal) |
bool | SetDiffuse (const SGCOLOR *aRGBColor) |
bool | SetDiffuse (const SGCOLOR &aRGBColor) |
bool | SetSpecular (float aRVal, float aGVal, float aBVal) |
bool | SetSpecular (const SGCOLOR *aRGBColor) |
bool | SetSpecular (const SGCOLOR &aRGBColor) |
bool | SetAmbient (float aRVal, float aGVal, float aBVal) |
bool | SetAmbient (const SGCOLOR *aRGBColor) |
bool | SetAmbient (const SGCOLOR &aRGBColor) |
SGNODE * | FindNode (const char *aNodeName, const SGNODE *aCaller) noexcept override |
Search the tree of linked nodes and return a reference to the first node found with the given name. | |
bool | AddRefNode (SGNODE *aNode) noexcept override |
bool | AddChildNode (SGNODE *aNode) noexcept override |
void | ReNameNodes (void) override |
Rename a node and all its child nodes in preparation for write operations. | |
bool | WriteVRML (std::ostream &aFile, bool aReuseFlag) override |
Writes this node's data to a VRML file. | |
bool | WriteCache (std::ostream &aFile, SGNODE *parentNode) override |
Write this node's data to a binary cache file. | |
bool | ReadCache (std::istream &aFile, SGNODE *parentNode) override |
Reads binary format data from a cache file. | |
S3D::SGTYPES | GetNodeType (void) const noexcept |
Return the type of this node instance. | |
SGNODE * | GetParent (void) const noexcept |
Returns a pointer to the parent SGNODE of this object or NULL if the object has no parent (ie. | |
bool | SwapParent (SGNODE *aNewParent) |
Swap the ownership with the given parent. | |
const char * | GetName (void) |
void | SetName (const char *aName) |
const char * | GetNodeTypeName (S3D::SGTYPES aNodeType) const noexcept |
void | AssociateWrapper (SGNODE **aWrapperRef) noexcept |
Associate this object with a handle to itself. | |
void | DisassociateWrapper (SGNODE **aWrapperRef) noexcept |
Remove the association between an IFSG* wrapper object and this object. | |
void | ResetNodeIndex (void) noexcept |
Reset the global SG* node indices in preparation for write operations. | |
void | addNodeRef (SGNODE *aNode) |
Add a pointer to a node which references this node, but does not own. | |
void | delNodeRef (const SGNODE *aNode) |
Remove a pointer to a node which references this node, but does not own. | |
bool | isWritten (void) noexcept |
Return true if the object had already been written to a cache file or VRML file. | |
Public Attributes | |
float | shininess |
float | transparency |
SGCOLOR | ambient |
SGCOLOR | diffuse |
SGCOLOR | emissive |
SGCOLOR | specular |
Protected Attributes | |
std::list< SGNODE * > | m_BackPointers |
nodes which hold a reference to this. | |
SGNODE * | m_Parent |
Pointer to parent node; may be NULL for top level transform. | |
S3D::SGTYPES | m_SGtype |
Type of Scene Graph node. | |
std::string | m_Name |
name to use for referencing the entity by name. | |
bool | m_written |
Set to true when the object has been written after a ReNameNodes(). | |
Private Attributes | |
SGNODE ** | m_Association |
Handle to the instance held by a wrapper. | |
Defines the generic material appearance of a scenegraph object.
Definition at line 37 of file sg_appearance.h.
SGAPPEARANCE::SGAPPEARANCE | ( | SGNODE * | aParent | ) |
Definition at line 34 of file sg_appearance.cpp.
References SGNODE::AddChildNode(), ambient, diffuse, SGNODE::GetNodeType(), SGNODE::m_Parent, SGNODE::m_SGtype, SGCOLOR::SetColor(), S3D::SGTYPE_APPEARANCE, S3D::SGTYPE_SHAPE, shininess, and transparency.
|
virtual |
Definition at line 59 of file sg_appearance.cpp.
|
overridevirtualnoexcept |
Implements SGNODE.
Definition at line 208 of file sg_appearance.cpp.
|
inherited |
Add a pointer to a node which references this node, but does not own.
Such back-pointers are required to ensure that invalidated references are removed when a node is deleted.
aNode | is the node holding a reference to this object. |
Definition at line 170 of file sg_node.cpp.
References SGNODE::m_BackPointers.
Referenced by SGFACESET::addNode(), SGSHAPE::addNode(), SGFACESET::ReadCache(), and SGSHAPE::ReadCache().
|
overridevirtualnoexcept |
Implements SGNODE.
Definition at line 199 of file sg_appearance.cpp.
|
noexceptinherited |
Associate this object with a handle to itself.
The handle is typically held by an IFSG* wrapper and the pointer which it refers to is set to NULL upon destruction of this object. This mechanism provides a scheme by which a wrapper can be notified of the destruction of the object which it wraps.
Definition at line 207 of file sg_node.cpp.
Referenced by S3D::AssociateSGNodeWrapper(), IFSG_APPEARANCE::Attach(), IFSG_COLORS::Attach(), IFSG_COORDINDEX::Attach(), IFSG_COORDS::Attach(), IFSG_FACESET::Attach(), IFSG_NORMALS::Attach(), IFSG_SHAPE::Attach(), IFSG_TRANSFORM::Attach(), IFSG_APPEARANCE::IFSG_APPEARANCE(), IFSG_COLORS::IFSG_COLORS(), IFSG_COORDINDEX::IFSG_COORDINDEX(), IFSG_COORDS::IFSG_COORDS(), IFSG_FACESET::IFSG_FACESET(), IFSG_NORMALS::IFSG_NORMALS(), IFSG_SHAPE::IFSG_SHAPE(), IFSG_TRANSFORM::IFSG_TRANSFORM(), IFSG_APPEARANCE::NewNode(), IFSG_COLORS::NewNode(), IFSG_COORDINDEX::NewNode(), IFSG_COORDS::NewNode(), IFSG_FACESET::NewNode(), IFSG_NORMALS::NewNode(), IFSG_SHAPE::NewNode(), and IFSG_TRANSFORM::NewNode().
|
inherited |
Remove a pointer to a node which references this node, but does not own.
aNode | is the node holding a reference to this object. |
Definition at line 185 of file sg_node.cpp.
References SGNODE::GetNodeType(), SGNODE::m_BackPointers, and SGNODE::m_SGtype.
Referenced by SGFACESET::unlinkNode(), SGSHAPE::unlinkNode(), SGFACESET::~SGFACESET(), and SGSHAPE::~SGSHAPE().
|
noexceptinherited |
Remove the association between an IFSG* wrapper object and this object.
Definition at line 225 of file sg_node.cpp.
Referenced by IFSG_APPEARANCE::Attach(), IFSG_COLORS::Attach(), IFSG_COORDINDEX::Attach(), IFSG_COORDS::Attach(), IFSG_FACESET::Attach(), IFSG_NORMALS::Attach(), IFSG_SHAPE::Attach(), IFSG_TRANSFORM::Attach(), IFSG_NODE::Destroy(), IFSG_APPEARANCE::NewNode(), IFSG_COLORS::NewNode(), IFSG_COORDINDEX::NewNode(), IFSG_COORDS::NewNode(), IFSG_FACESET::NewNode(), IFSG_NORMALS::NewNode(), IFSG_SHAPE::NewNode(), IFSG_TRANSFORM::NewNode(), and IFSG_NODE::~IFSG_NODE().
|
overridevirtualnoexcept |
Search the tree of linked nodes and return a reference to the first node found with the given name.
The reference is then typically added to another node via AddRefNode().
aNodeName | is the name of the node to search for. |
aCaller | is a pointer to the node invoking this function. |
Implements SGNODE.
Definition at line 173 of file sg_appearance.cpp.
Referenced by SGSHAPE::FindNode().
|
inherited |
Definition at line 146 of file sg_node.cpp.
References getNodeName(), SGNODE::m_Name, and SGNODE::m_SGtype.
Referenced by SCENEGRAPH::addNode(), SGFACESET::addNode(), SGSHAPE::addNode(), IFSG_NODE::GetName(), SCENEGRAPH::ReNameNodes(), ReNameNodes(), SGCOLORS::ReNameNodes(), SGCOORDS::ReNameNodes(), SGFACESET::ReNameNodes(), SGINDEX::ReNameNodes(), SGNORMALS::ReNameNodes(), SGSHAPE::ReNameNodes(), SCENEGRAPH::WriteCache(), WriteCache(), SGCOLORS::WriteCache(), SGCOORDS::WriteCache(), SGFACESET::WriteCache(), SGINDEX::WriteCache(), SGNORMALS::WriteCache(), SGSHAPE::WriteCache(), SCENEGRAPH::WriteVRML(), WriteVRML(), SGCOLORS::WriteVRML(), SGCOORDS::WriteVRML(), SGFACESET::WriteVRML(), SGNORMALS::WriteVRML(), and SGSHAPE::WriteVRML().
|
noexceptinherited |
Return the type of this node instance.
Definition at line 104 of file sg_node.cpp.
Referenced by SCENEGRAPH::addNode(), SGFACESET::addNode(), SGSHAPE::addNode(), IFSG_APPEARANCE::Attach(), IFSG_COLORS::Attach(), IFSG_COORDINDEX::Attach(), IFSG_COORDS::Attach(), IFSG_FACESET::Attach(), IFSG_NORMALS::Attach(), IFSG_SHAPE::Attach(), IFSG_TRANSFORM::Attach(), SGNODE::delNodeRef(), S3D::GetMatIndex(), S3D::GetModel(), IFSG_NODE::GetNodeType(), S3D::GetSGNodeType(), IFSG_APPEARANCE::NewNode(), IFSG_COLORS::NewNode(), IFSG_COORDINDEX::NewNode(), IFSG_COORDS::NewNode(), IFSG_FACESET::NewNode(), IFSG_NORMALS::NewNode(), IFSG_SHAPE::NewNode(), IFSG_TRANSFORM::NewNode(), SCENEGRAPH::ReadCache(), SGFACESET::ReadCache(), SGSHAPE::ReadCache(), SCENEGRAPH::SCENEGRAPH(), SCENEGRAPH::SetParent(), SetParent(), SGCOLORS::SetParent(), SGCOORDS::SetParent(), SGFACESET::SetParent(), SGINDEX::SetParent(), SGNORMALS::SetParent(), SGSHAPE::SetParent(), SGAPPEARANCE(), SGCOLORS::SGCOLORS(), SGCOORDINDEX::SGCOORDINDEX(), SGCOORDS::SGCOORDS(), SGFACESET::SGFACESET(), SGINDEX::SGINDEX(), SGNORMALS::SGNORMALS(), SGSHAPE::SGSHAPE(), SGNODE::SwapParent(), SCENEGRAPH::unlinkNode(), and S3D::WriteVRML().
|
noexceptinherited |
Definition at line 164 of file sg_node.cpp.
References node_names.
Referenced by IFSG_NODE::GetNodeTypeName(), IFSG_APPEARANCE::NewNode(), IFSG_COLORS::NewNode(), IFSG_COORDINDEX::NewNode(), IFSG_COORDS::NewNode(), IFSG_FACESET::NewNode(), IFSG_NORMALS::NewNode(), IFSG_SHAPE::NewNode(), and IFSG_TRANSFORM::NewNode().
|
noexceptinherited |
Returns a pointer to the parent SGNODE of this object or NULL if the object has no parent (ie.
top level transform).
Definition at line 110 of file sg_node.cpp.
Referenced by IFSG_NODE::GetParent(), S3D::GetSGNodeParent(), IFSG_APPEARANCE::NewNode(), IFSG_COLORS::NewNode(), IFSG_COORDINDEX::NewNode(), IFSG_COORDS::NewNode(), IFSG_FACESET::NewNode(), IFSG_NORMALS::NewNode(), IFSG_SHAPE::NewNode(), IFSG_TRANSFORM::NewNode(), SCENEGRAPH::WriteCache(), WriteCache(), SGCOLORS::WriteCache(), SGCOORDS::WriteCache(), SGFACESET::WriteCache(), SGINDEX::WriteCache(), SGNORMALS::WriteCache(), and SGSHAPE::WriteCache().
|
inlinenoexceptinherited |
Return true if the object had already been written to a cache file or VRML file.
For internal use only.
Definition at line 220 of file sg_node.h.
References SGNODE::m_written.
Referenced by SCENEGRAPH::WriteCache(), SGFACESET::WriteCache(), and SGSHAPE::WriteCache().
|
overridevirtual |
Reads binary format data from a cache file.
To read a cache file, open the file for reading and invoke this function from a new SCENEGRAPH node.
Implements SGNODE.
Definition at line 350 of file sg_appearance.cpp.
References ambient, diffuse, emissive, S3D::ReadColor(), shininess, specular, and transparency.
Referenced by SGSHAPE::ReadCache().
|
overridevirtual |
Rename a node and all its child nodes in preparation for write operations.
Implements SGNODE.
Definition at line 217 of file sg_appearance.cpp.
References SGNODE::GetName(), SGNODE::m_Name, and SGNODE::m_written.
Referenced by SGSHAPE::ReNameNodes().
|
noexceptinherited |
Reset the global SG* node indices in preparation for write operations.
Definition at line 238 of file sg_node.cpp.
References node_counts, and S3D::SGTYPE_END.
Referenced by S3D::ResetNodeIndex(), SCENEGRAPH::WriteCache(), and S3D::WriteVRML().
bool SGAPPEARANCE::SetAmbient | ( | const SGCOLOR & | aRGBColor | ) |
Definition at line 167 of file sg_appearance.cpp.
References ambient, and SGCOLOR::SetColor().
bool SGAPPEARANCE::SetAmbient | ( | const SGCOLOR * | aRGBColor | ) |
Definition at line 159 of file sg_appearance.cpp.
References ambient, and SGCOLOR::SetColor().
bool SGAPPEARANCE::SetAmbient | ( | float | aRVal, |
float | aGVal, | ||
float | aBVal | ||
) |
Definition at line 153 of file sg_appearance.cpp.
References ambient, and SGCOLOR::SetColor().
bool SGAPPEARANCE::SetDiffuse | ( | const SGCOLOR & | aRGBColor | ) |
Definition at line 128 of file sg_appearance.cpp.
References diffuse, and SGCOLOR::SetColor().
bool SGAPPEARANCE::SetDiffuse | ( | const SGCOLOR * | aRGBColor | ) |
Definition at line 120 of file sg_appearance.cpp.
References diffuse, and SGCOLOR::SetColor().
bool SGAPPEARANCE::SetDiffuse | ( | float | aRVal, |
float | aGVal, | ||
float | aBVal | ||
) |
Definition at line 114 of file sg_appearance.cpp.
References diffuse, and SGCOLOR::SetColor().
bool SGAPPEARANCE::SetEmissive | ( | const SGCOLOR & | aRGBColor | ) |
Definition at line 108 of file sg_appearance.cpp.
References emissive, and SGCOLOR::SetColor().
bool SGAPPEARANCE::SetEmissive | ( | const SGCOLOR * | aRGBColor | ) |
Definition at line 100 of file sg_appearance.cpp.
References emissive, and SGCOLOR::SetColor().
bool SGAPPEARANCE::SetEmissive | ( | float | aRVal, |
float | aGVal, | ||
float | aBVal | ||
) |
Definition at line 94 of file sg_appearance.cpp.
References emissive, and SGCOLOR::SetColor().
|
inherited |
Definition at line 155 of file sg_node.cpp.
References getNodeName(), SGNODE::m_Name, and SGNODE::m_SGtype.
Referenced by SCENEGRAPH::ReadCache(), SGFACESET::ReadCache(), SGSHAPE::ReadCache(), and IFSG_NODE::SetName().
|
overridevirtual |
Set the parent SGNODE of this object.
aParent | [in] is the desired parent node |
Implements SGNODE.
Definition at line 64 of file sg_appearance.cpp.
References SGNODE::AddChildNode(), SGNODE::GetNodeType(), SGNODE::m_Parent, S3D::SGTYPE_SHAPE, and SGNODE::unlinkChildNode().
Referenced by SGSHAPE::addNode(), and SGSHAPE::~SGSHAPE().
bool SGAPPEARANCE::SetSpecular | ( | const SGCOLOR & | aRGBColor | ) |
Definition at line 147 of file sg_appearance.cpp.
References SGCOLOR::SetColor(), and specular.
bool SGAPPEARANCE::SetSpecular | ( | const SGCOLOR * | aRGBColor | ) |
Definition at line 140 of file sg_appearance.cpp.
References SGCOLOR::SetColor(), and specular.
bool SGAPPEARANCE::SetSpecular | ( | float | aRVal, |
float | aGVal, | ||
float | aBVal | ||
) |
Definition at line 134 of file sg_appearance.cpp.
References SGCOLOR::SetColor(), and specular.
|
inherited |
Swap the ownership with the given parent.
This operation may be required when reordering nodes for optimization.
aNewParent | will become the new parent to the object; it must be the same type as the parent of this instance. |
Definition at line 116 of file sg_node.cpp.
References SGNODE::AddChildNode(), SGNODE::AddRefNode(), SGNODE::GetNodeType(), SGNODE::m_Parent, SGNODE::unlinkChildNode(), and SGNODE::unlinkRefNode().
Referenced by SGFACESET::WriteCache(), and SGSHAPE::WriteCache().
|
overridevirtualnoexcept |
Remove references to an owned child.
This is invoked by the child upon destruction to ensure that the parent has no invalid references.
aNode | is the child which is being deleted. |
Implements SGNODE.
Definition at line 185 of file sg_appearance.cpp.
|
overridevirtualnoexcept |
Remove pointers to a referenced node.
This is invoked by the referenced node upon destruction to ensure that the referring node has no invalid references.
aNode | is the node which is being deleted. |
Implements SGNODE.
Definition at line 192 of file sg_appearance.cpp.
|
overridevirtual |
Write this node's data to a binary cache file.
The data includes all data of children and references to children. If this function is invoked by the user, parentNode must be set to NULL in order to ensure coherent data.
Implements SGNODE.
Definition at line 304 of file sg_appearance.cpp.
References ambient, diffuse, emissive, SGNODE::GetName(), SGNODE::GetParent(), SGNODE::m_Parent, SGNODE::m_written, shininess, specular, transparency, SGNODE::WriteCache(), and S3D::WriteColor().
Referenced by SGSHAPE::WriteCache().
|
overridevirtual |
Writes this node's data to a VRML file.
This includes all data of child and referenced nodes.
Implements SGNODE.
Definition at line 227 of file sg_appearance.cpp.
References ambient, diffuse, emissive, S3D::FormatFloat(), SGCOLOR::GetColor(), SGNODE::GetName(), SGNODE::m_written, red, shininess, specular, and transparency.
Referenced by SGSHAPE::WriteVRML().
SGCOLOR SGAPPEARANCE::ambient |
Definition at line 76 of file sg_appearance.h.
Referenced by formatMaterial(), S3D::GetModel(), ReadCache(), SetAmbient(), SGAPPEARANCE(), WriteCache(), and WriteVRML().
SGCOLOR SGAPPEARANCE::diffuse |
Definition at line 77 of file sg_appearance.h.
Referenced by formatMaterial(), S3D::GetModel(), ReadCache(), SetDiffuse(), SGAPPEARANCE(), WriteCache(), and WriteVRML().
SGCOLOR SGAPPEARANCE::emissive |
Definition at line 78 of file sg_appearance.h.
Referenced by formatMaterial(), ReadCache(), SetEmissive(), WriteCache(), and WriteVRML().
|
privateinherited |
Handle to the instance held by a wrapper.
Definition at line 233 of file sg_node.h.
Referenced by SGNODE::SGNODE(), and SGNODE::~SGNODE().
|
protectedinherited |
nodes which hold a reference to this.
Definition at line 226 of file sg_node.h.
Referenced by SGNODE::addNodeRef(), SGCOORDS::CalcNormals(), SGNODE::delNodeRef(), and SGNODE::~SGNODE().
|
protectedinherited |
name to use for referencing the entity by name.
Definition at line 229 of file sg_node.h.
Referenced by SCENEGRAPH::FindNode(), SGFACESET::FindNode(), SGSHAPE::FindNode(), SGNODE::GetName(), SCENEGRAPH::ReadCache(), SCENEGRAPH::ReNameNodes(), ReNameNodes(), SGCOLORS::ReNameNodes(), SGCOORDS::ReNameNodes(), SGFACESET::ReNameNodes(), SGINDEX::ReNameNodes(), SGNORMALS::ReNameNodes(), SGSHAPE::ReNameNodes(), and SGNODE::SetName().
|
protectedinherited |
Pointer to parent node; may be NULL for top level transform.
Definition at line 227 of file sg_node.h.
Referenced by SGCOORDS::CalcNormals(), SCENEGRAPH::FindNode(), SGFACESET::FindNode(), SGSHAPE::FindNode(), SCENEGRAPH::SCENEGRAPH(), SCENEGRAPH::SetParent(), SetParent(), SGCOLORS::SetParent(), SGCOORDS::SetParent(), SGFACESET::SetParent(), SGINDEX::SetParent(), SGNORMALS::SetParent(), SGSHAPE::SetParent(), SGAPPEARANCE(), SGCOLORS::SGCOLORS(), SGCOORDINDEX::SGCOORDINDEX(), SGCOORDS::SGCOORDS(), SGFACESET::SGFACESET(), SGINDEX::SGINDEX(), SGNODE::SGNODE(), SGNORMALS::SGNORMALS(), SGSHAPE::SGSHAPE(), SGNODE::SwapParent(), SCENEGRAPH::WriteCache(), WriteCache(), SGCOLORS::WriteCache(), SGCOORDS::WriteCache(), SGFACESET::WriteCache(), SGINDEX::WriteCache(), SGNORMALS::WriteCache(), SGSHAPE::WriteCache(), and SGNODE::~SGNODE().
|
protectedinherited |
Type of Scene Graph node.
Definition at line 228 of file sg_node.h.
Referenced by SGNODE::delNodeRef(), SGNODE::GetName(), SCENEGRAPH::SCENEGRAPH(), SGNODE::SetName(), SGAPPEARANCE(), SGCOLORS::SGCOLORS(), SGCOORDINDEX::SGCOORDINDEX(), SGCOORDS::SGCOORDS(), SGFACESET::SGFACESET(), SGNODE::SGNODE(), SGNORMALS::SGNORMALS(), SGSHAPE::SGSHAPE(), and SGINDEX::WriteVRML().
|
protectedinherited |
Set to true when the object has been written after a ReNameNodes().
Definition at line 230 of file sg_node.h.
Referenced by SGNODE::isWritten(), SCENEGRAPH::ReNameNodes(), ReNameNodes(), SGCOLORS::ReNameNodes(), SGCOORDS::ReNameNodes(), SGFACESET::ReNameNodes(), SGINDEX::ReNameNodes(), SGNORMALS::ReNameNodes(), SGSHAPE::ReNameNodes(), SGNODE::SGNODE(), SCENEGRAPH::WriteCache(), WriteCache(), SGCOLORS::WriteCache(), SGCOORDS::WriteCache(), SGFACESET::WriteCache(), SGINDEX::WriteCache(), SGNORMALS::WriteCache(), SGSHAPE::WriteCache(), SCENEGRAPH::WriteVRML(), WriteVRML(), SGCOLORS::WriteVRML(), SGCOORDS::WriteVRML(), SGFACESET::WriteVRML(), SGNORMALS::WriteVRML(), and SGSHAPE::WriteVRML().
float SGAPPEARANCE::shininess |
Definition at line 74 of file sg_appearance.h.
Referenced by formatMaterial(), S3D::GetModel(), ReadCache(), SGAPPEARANCE(), WriteCache(), and WriteVRML().
SGCOLOR SGAPPEARANCE::specular |
Definition at line 79 of file sg_appearance.h.
Referenced by formatMaterial(), S3D::GetModel(), ReadCache(), SetSpecular(), WriteCache(), and WriteVRML().
float SGAPPEARANCE::transparency |
Definition at line 75 of file sg_appearance.h.
Referenced by formatMaterial(), S3D::GetModel(), ReadCache(), SGAPPEARANCE(), WriteCache(), and WriteVRML().